Pseudocapacitive E ﬀ ect of Carbons Doped with Di ﬀ erent Functional Groups as Electrode Materials for Electrochemical Capacitors

: In this study, RF-based un-doped and nitrogen-doped aerogels were produced by polymerisation reaction between resorcinol and formaldehyde with sodium carbonate as catalyst and melamine as the nitrogen source. Carbon / activated carbon aerogels were obtained by carbonisation of the gels under inert atmosphere (Ar) followed by activation of the carbons under CO 2 at 800 ◦ C. The BET analysis of the samples showed a more than two-fold increase in the speciﬁc surface area and pore volume of carbon from 537 to 1333 m 2 g − 1 and 0.242 to 0.671 cm 3 g − 1 respectively after nitrogen doping and activation. SEM and XRD analysis of the samples revealed highly porous amorphous nanostructures with denser inter-particle cross-linked pathways for the activated nitrogen-doped carbon. The X-Ray Photoelectron Spectroscopy (XPS) results conﬁrmed the presence of nitrogen and oxygen heteroatoms on the surface and within the carbon matrix where improvement in wettability with the drop in the contact angle from 123 ◦ to 80 ◦ was witnessed after oxygen and nitrogen doping. A steady drop in the equivalent series (RS) and charge transfer (RCT) resistances was observed by electrochemical measurements after the introduction of nitrogen and oxygen heteroatoms. The highest speciﬁc capacitance of 289 Fg − 1 with the lowest values of 0.11 Ω and 0.02 Ω for RS and RCT was achieved for nitrogen and oxygen dual-doped activated carbon in line with its improved surface chemistry and wettability, and its enhanced conductivity due to denser inter-particle cross-linked pathways. of functional on the of functional


Introduction
Power generation using renewable energy from wind, tidal and solar as sustainable sources of energy with low or even zero emissions requires efficient energy storage technologies to overcome their intermittent nature of energy supply for our future energy demands. Electrochemical energy storage technologies such as batteries and supercapacitors with suitable operational parameters (i.e., energy density, power density and cycle life) will play a key role with this by responding to the actual characteristics of energy supply through peak shaving and voltage regulation and also by fulfilling the energy requirements of upcoming systems when a long-term flat voltage energy supply or a short term power supply is required [1]. Among different energy storage technologies, electrochemical capacitors also known as supercapacitors or ultra-capacitors are considered a promising technology for applications needing high power densities, long cycle life and excellent reversibility [2,3]. However, the technology suffers from inferior energy densities when compared with electrochemical batteries [4,5]. This is mainly attributable to a limited surface charge storage at the electrode/electrolyte interface in comparison to bulk Faradaic charge accumulation occurring in electrochemical batteries [2,6]. The energy density of an electrochemical capacitor can be calculated by Equation (1).
where "E" is energy density, "C" is the specific capacitance and "V" is operating voltage. The specific capacitance of an electrochemical capacitor is obtained by Equation (2).
where "S" is the specific surface area of active material, "D" is double layer thickness and " " is the relative permittivity of the solution. According to Equation (1), the energy density of an electrochemical capacitor can be improved by improving either its operating voltage or its specific capacitance. The former depends on the electrochemical window of the electrolyte used in the device and different electrolytes with wide electrochemical windows such as organic electrolyte and ionic liquids have been investigated to improve the energy density of the electrochemical capacitors but they limit the power density of the device due to their limited kinetic and diffusional effects [7][8][9]. The latter, given by Equation (2), can be improved either by introducing new electrode materials with higher charge storage capability through pseudocapacitive charge storage or by controlling and improving the porosity parameters (i.e., S and D) of the electroactive material [10]. Transition metal oxide-based active materials store energy pseudocapacitively and exhibit a higher specific capacitance and consequently a higher energy density when compared with traditional carbon-based electrode materials that store energy in the form of electric double-layer capacitance (EDLC) [10][11][12][13]. However, transition metal oxides suffer from higher equivalent series resistance (ESR) which results in their lower power density [6,14]. The energy density of an electrochemical capacitor can be improved without compromising its power density by introducing functional groups on the surface or within the matrix of highly porous carbon-based active material [4,15].
Numerous carbonaceous materials such as graphene [16], carbon nanotubes [17], carbon tnanofibers [18] and activated carbon [19,20] have been widely used as electrodes in supercapacitors. However, activated carbon is the most commonly adopted electrode material in commercial applications due to its outstanding properties such as large specific surface area, controlled porosity, high electric conductivity, cost-effectiveness, chemical inertness and ease of process-ability [21]. Carbon-based materials have inferior specific capacitance since the entire capacitance is contributed through physical charge storage with the formation of an electric double layer associated with the porous structure of the active material [13]. Higher specific capacitance can be achieved by introducing functional groups on the surface [22] or within the core of the active material [23] where total capacitance is the sum of EDLC (through the formation of the electric double layer at electrode/electrolyte interface physically) and Faradaic pseudo-capacitance (contributed by heteroatoms capable of storing electric charge through fast and fully reversible Faradaic reactions at the electrode/electrolyte interface accompanied by electronic charge transfer) of carbon [4,[23][24][25]. Specific surface area (SSA) and pore size distribution (PSD) are two fundamental parameters with a substantial effect on the EDLC of the cell [26]. For the maximum EDLC contribution, large SSA with optimised pore size is desirable since higher SSA results in a higher level of charge storage across the electrode/electrolyte interface whereas the optimized pore structure of active material can boost the electrolyte ions mobility [27,28]. Moreover, heteroatoms doping helps in improving the overall Energies 2020, 13, 5577 3 of 21 performance of the supercapacitor cell by contributing through pseudo-capacitance and by enhancing ion transfer kinetics (by improving electrode/electrolyte wettability) [21].
As discussed above capacitive performance of an aqueous supercapacitor can be maximised by adjusting the following electrode's parameters: (a) by optimising its pore size to increase electrolyte ions mobility (b) by increasing its specific surface area to maximise the ability of charge storage (c) through heteroatoms doping for its improved pseudocapacitive effects, wettability and electron transfer. In this work, we report the synthesis of polymeric carbons with controlled porosity (SSA and PSD) through the synthesis of a polymeric gel by polycondensation reaction between resorcinol and formaldehyde its subsequent carbonization at 800 • C. The material was used as electroactive material for the fabrication of electrodes used in an electrochemical cell with 6M KOH electrolyte where a specific capacitance of 136 Fg −1 obtained at the scan rate of 5 mVS −1 . A further increase in the specific surface area of the carbon was achieved through its physical activation resulting in the improvement of specific capacitance to 197 Fg −1 . Nitrogen and oxygen heteroatoms were introduced within the carbon matrix using melamine during the polymerization process and on the surface of the carbon during the activation process under CO 2 respectively. Oxygen and nitrogen functional groups assisted in improving the wettability and capacitive performance of the material with the lowest contact angle of 80 degrees and the highest specific capacitance of 289 Fg −1 obtained at the scan rate of 5 mVS −1 . Additionally, a significant drop in the equivalent series resistance RS and the charge transfer resistance RCT to the corresponding lowest values of 0.11 Ω and 0.02 Ω was observed when the oxygen and nitrogen co-doped carbon sample was used as the electroactive material in the cell.

Synthesis of Resorcinol/Formaldehyde (RF) and Nitrogen-Doped Resorcinol/Formaldehyde (MRF) Aerogels
RF aerogels were prepared by polycondensation reaction between resorcinol (R) and formaldehyde (F) where sodium carbonate (C) was used as the polycondensation catalyst with the molar ratios of R/F and R/C kept at 0.5 and 100 respectively with a ratio of resorcinol to water (W) of R/W = 0.1 g mL −1 according to the procedure explained elsewhere [19,28].
Nitrogen-doped resorcinol/formaldehyde aerogels (MRF) were synthesised using melamine (M) as the source of nitrogen with the same R/F, R/C and R/W ratios used for the synthesis of un-doped aerogel samples and a resorcinol to melamine (R/M) molar ratio of 80 according to a detailed synthesis procedure given in [23].

Carbonization of RF and MRF Aerogels
Both un-doped (RF) and nitrogen-doped (MRF) aerogel samples were carbonized at 800 • C for 3 h under Ar. In each experiment, a gel sample weighing 3 g was loaded into a ceramic boat, placed in the middle of a tubular furnace and purged with Ar for 30 min at 30 • C prior to the start of the carbonization program. The furnace temperature was initially raised to 150 • C at a heating rate of 5 • C min −1 and maintained at this temperature for 30 min followed by increasing it to 450 • C at the same heating rate and holding it for another 30 min. The furnace temperature was finally increased to the final carbonization temperature of 800 • C at 10 • C min −1 and the sample was kept at this temperature for 180 min. Subsequently, the furnace was cooled down naturally to room temperature. The entire carbonization programme was performed under Ar flowing at 240 mL min −1 . The obtained carbon samples are called RFC 100-800 and MRFC100-800-80 where the numbers 100, 800, and 80 stand for the R/C ratio, carbonization temperature and R/M ratio respectively.

Activation of RFC and MRFC Carbon Aerogels
Samples of both un-doped (RFC) and nitrogen-doped (MRFC) carbon aerogels were activated by physical activation at 800 • C where CO 2 was used as the activation agent. In each experiment, 3 g of a carbon aerogel sample was loaded into a ceramic boat, placed in the middle of a tubular furnace and purged with Ar for 30 min at 30 • C prior to the start of the heating programme. The temperature was raised to 800 • C at 10 • C min −1 and the sample was maintained at this temperature for 5min under Ar in order to stabilise its temperature. The gas was then immediately switched from Ar to CO 2 and the sample was kept at 800 • C under CO 2 flowing at 240 mL min −1 for 120 min. Finally, the gas was switched back to Ar and the sample was cooled down naturally to the room temperature under Ar flowing at 240 mL min −1 . The obtained activated carbon samples are called RFCA100-800-800 and MRFCA100-800-800-80 where the numbers 100, 800, 800, and 80 stand for the R/C ratio, carbonization temperature, activation temperature and R/M ratio respectively.
Schematic representation procedures adopted for the synthesis of carbons and activated carbons for both un-doped and N-doped carbon aerogels samples are shown in Figures 1 and 2  Samples of both un-doped (RFC) and nitrogen-doped (MRFC) carbon aerogels were activated by physical activation at 800 °C where CO2 was used as the activation agent. In each experiment, 3 g of a carbon aerogel sample was loaded into a ceramic boat, placed in the middle of a tubular furnace and purged with Ar for 30 min at 30 °C prior to the start of the heating programme. The temperature was raised to 800 °C at 10 °C min −1 and the sample was maintained at this temperature for 5min under Ar in order to stabilise its temperature. The gas was then immediately switched from Ar to CO2 and the sample was kept at 800 °C under CO2 flowing at 240 mL min −1 for 120 min. Finally, the gas was switched back to Ar and the sample was cooled down naturally to the room temperature under Ar flowing at 240 mL min −1 . The obtained activated carbon samples are called RFCA100-800-800 and MRFCA100-800-800-80 where the numbers 100, 800, 800, and 80 stand for the R/C ratio, carbonization temperature, activation temperature and R/M ratio respectively.
Schematic representation procedures adopted for the synthesis of carbons and activated carbons for both un-doped and N-doped carbon aerogels samples are shown in Figures 1 and 2 respectively.

Physical/Chemical Characterization Techniques
The porous structure of the carbon/activated carbon aerogel samples was characterized by a Tristar adsorption/desorption analyser (Micromeritics) at 77 K. All samples were evacuated overnight in a vacuum oven at 80 °C followed by purging with nitrogen at 300 °C for 120 min using a Flow-prep system (Micromeritics) prior to the porosity measurements. The specific surface area of the samples was calculated by (BET) method whereas Barrett Joyner Herenda (BJH) and t-plot methods were used for the analysis of their mesoporosity and microporosity respectively [29]. The adsorption branch of the isotherms was used for determining pore size distributions by BJH method. The total pore volume was calculated from the adsorbed volume of N2 at P/P0 = 0.99 [30].
A CAM 200 goniometer system manufactured by KSV Ltd. was used for the determination of contact angle. In this system, video images are captured and analysed automatically by CAM software. All measurements were carried out using 6M KOH as a probing liquid.  Samples of both un-doped (RFC) and nitrogen-doped (MRFC) carbon aerogels were activated by physical activation at 800 °C where CO2 was used as the activation agent. In each experiment, 3 g of a carbon aerogel sample was loaded into a ceramic boat, placed in the middle of a tubular furnace and purged with Ar for 30 min at 30 °C prior to the start of the heating programme. The temperature was raised to 800 °C at 10 °C min −1 and the sample was maintained at this temperature for 5min under Ar in order to stabilise its temperature. The gas was then immediately switched from Ar to CO2 and the sample was kept at 800 °C under CO2 flowing at 240 mL min −1 for 120 min. Finally, the gas was switched back to Ar and the sample was cooled down naturally to the room temperature under Ar flowing at 240 mL min −1 . The obtained activated carbon samples are called RFCA100-800-800 and MRFCA100-800-800-80 where the numbers 100, 800, 800, and 80 stand for the R/C ratio, carbonization temperature, activation temperature and R/M ratio respectively.
Schematic representation procedures adopted for the synthesis of carbons and activated carbons for both un-doped and N-doped carbon aerogels samples are shown in Figures 1 and 2 respectively.

Physical/Chemical Characterization Techniques
The porous structure of the carbon/activated carbon aerogel samples was characterized by a Tristar adsorption/desorption analyser (Micromeritics) at 77 K. All samples were evacuated overnight in a vacuum oven at 80 °C followed by purging with nitrogen at 300 °C for 120 min using a Flow-prep system (Micromeritics) prior to the porosity measurements. The specific surface area of the samples was calculated by (BET) method whereas Barrett Joyner Herenda (BJH) and t-plot methods were used for the analysis of their mesoporosity and microporosity respectively [29]. The adsorption branch of the isotherms was used for determining pore size distributions by BJH method. The total pore volume was calculated from the adsorbed volume of N2 at P/P0 = 0.99 [30].
A CAM 200 goniometer system manufactured by KSV Ltd. was used for the determination of contact angle. In this system, video images are captured and analysed automatically by CAM software. All measurements were carried out using 6M KOH as a probing liquid.

Physical/Chemical Characterization Techniques
The porous structure of the carbon/activated carbon aerogel samples was characterized by a Tristar adsorption/desorption analyser (Micromeritics) at 77 K. All samples were evacuated overnight in a vacuum oven at 80 • C followed by purging with nitrogen at 300 • C for 120 min using a Flow-prep system (Micromeritics) prior to the porosity measurements. The specific surface area of the samples was calculated by (BET) method whereas Barrett Joyner Herenda (BJH) and t-plot methods were used for the analysis of their mesoporosity and microporosity respectively [29]. The adsorption branch of the isotherms was used for determining pore size distributions by BJH method. The total pore volume was calculated from the adsorbed volume of N 2 at P/P 0 = 0.99 [30].
A CAM 200 goniometer system manufactured by KSV Ltd. was used for the determination of contact angle. In this system, video images are captured and analysed automatically by CAM software. All measurements were carried out using 6 M KOH as a probing liquid.
Energies 2020, 13, 5577 5 of 21 X-ray diffractometer (SIEMENS-D500) was used to perform X-ray diffraction measurements where the crystal structure of the samples was characterised using voltage and current of 40 kV and 30 mA respectively with Cu Kα radiation.
Structural properties and surface morphology of all samples were characterised using scanning electron microscopy (SEM). The SEM micrographs of the carbons were acquired at the magnifications of 100, 50, and 10 µm using a Hitachi S-4100 SEM.
X-Ray Photoelectron Spectroscopy (XPS) was used to quantify the elemental composition of both un-doped and N-doped samples. In XPS measurements a Specs Phoibos 100 MCD-5 (5 single channel electron multiplier) hemispherical analyser was used by employing a Specs XR-50 X-ray source with Mg Kα (1253.6 eV) beam. Casa XPS software was used to analyse the recoded measurements while all spectra were calibrated using the binding energy of adventitious C1s peak at 284.8 eV as the reference.

Electrochemical Measurement Techniques
Carbon electrodes with a thickness of 100-150 microns were fabricated by mixing a sample of carbons/or activated carbons (un-doped/or N-doped) as electroactive material with Kynar as a binder and Cabot carbon black as the conductivity enhancer in 80/10/10 wt% in acetone for 2 h under a vigorous magnetic stirring followed by rolling the resultant paste into a thin sheet on an aluminium foil. The electrochemical performance of the electrodes was evaluated by a Voltalab40 radiometer analytical potentiostat (model-PGZ301) using a two-electrode sandwich-type symmetric electrochemical cell with a 6 M KOH solution as the electrolyte. The cell was stabilized under open circuit for 15 min prior to each electrochemical measurement. Cyclic voltammetry (CV) was used to assess the capacitive performance of active material in the potential range of 0.5 to 1 V at scan rates of 5, 10 and 15 mVs −1 . Electrochemical impedance spectroscopy (EIS) measurements were performed to analyse the resistive behaviour of the samples at AC amplitude of 10 mV in the frequency range of 100 KHz to 50 Hz. All measurements were performed at room temperature.
The specific capacitance of the cell was calculated from the discharge CV curves by the following equation: where "I" is the average discharge current in A and dV/dt is the scan rate in mVs −1 . The specific capacitance Csp of a single electrode in Fg −1 was calculated using Equation (4) where m is the mass of the carbon as the electroactive material used in the electrode formulation.

BET Analysis
Nitrogen adsorption-desorption isotherms of the samples are shown in Figure 3. BET curves of the samples mainly show combined type I and type IV isotherms, with high nitrogen intake at lower P/P0 (≤0.02) and hysteresis loops at higher relative pressures (0.4 ≤ P/P0 ≤ 1.0). This indicates the transformation from microporosity to mesoporosity within the carbon porous structure with nitrogen doping and activation since higher N 2 intake at lower relative pressure represents the existence of microporosity whereas the appearance of the hysteresis loops at higher relative pressure indicates mesoporosity within the carbon samples [27]. The sample RFC100 possesses a typical type I isotherm with a sharp increase in the volume of N 2 in the low-pressure region, without the presence of any significant hysteresis loop in higher pressure region. This is indicative of a predominantly microporous structure as confirmed by the data given in Table 1 which show a level of microporosity of 90% Energies 2020, 13, 5577 6 of 21 for the sample [31,32]. Physical activation of this sample under CO 2 (RFCA100-800) results in the development of mesopososity within the sample structure with an increase in the level of mesoporosity to 28% and subsequent increase in its specific surface area (from 537 to 678 m 2 ) and pore volume (from 0.242 to 0.371 cm 3 g −1 ) presumably due to opening of closed pores and widening of the micropores during the activation process.
of the micropores during the activation process.
Nitrogen adsorption isotherm of the N-doped carbon (MRFC100-800-80) shows a significant increase in nitrogen intake by the sample at low relative pressures followed by the appearance of a hysteresis loop at a relative pressure of 0.4 ≤ P/P0 ≤ 0.6. The porous parameters of the carbons given in Table 1 show that nitrogen doping results in a significant increase in the specific surface area (from 537 to 841 m 2 ) and pore volume (from 0.242 to 0.430 cm 3 g −1 ) of the carbon with 34% mesoporosity for the sample. This might be due to an increase in the number of gelation nuclei by the addition of melamine into the gel solution [23]. Physical activation of the sample under CO2 results in the evolution of its porous structure with a significant increase in its surface area to 1333 m 2 and its pore volume to 0.671 cm 3 g −1 with 44% mesoporosity. Table 1 also shows a slight increase in average pore size from 1.80 nm to 2.21 nm after nitrogen doping which can be attributed to the diffusion of nitrogen functional groups within the gel structure [33]. Pore size distribution (PSD) curves for un-doped and N-doped carbon/activated carbon samples are shown in Figure 4. Detailed analysis of pore size distribution (PSD) curves illustrates that all samples are mainly microporous with the pore size distribution centred around 2 nm and most of the distribution is in the microporous region.  Nitrogen adsorption isotherm of the N-doped carbon (MRFC100-800-80) shows a significant increase in nitrogen intake by the sample at low relative pressures followed by the appearance of a hysteresis loop at a relative pressure of 0.4 ≤ P/P0 ≤ 0.6. The porous parameters of the carbons given in Table 1 show that nitrogen doping results in a significant increase in the specific surface area (from 537 to 841 m 2 ) and pore volume (from 0.242 to 0.430 cm 3 g −1 ) of the carbon with 34% mesoporosity for the sample. This might be due to an increase in the number of gelation nuclei by the addition of melamine into the gel solution [23]. Physical activation of the sample under CO 2 results in the evolution of its porous structure with a significant increase in its surface area to 1333 m 2 and its pore volume to 0.671 cm 3 g −1 with 44% mesoporosity. Table 1 also shows a slight increase in average pore size from 1.80 nm to 2.21 nm after nitrogen doping which can be attributed to the diffusion of nitrogen functional groups within the gel structure [33]. Pore size distribution (PSD) curves for un-doped and N-doped carbon/activated carbon samples are shown in Figure 4. Detailed analysis of pore size distribution (PSD) curves illustrates that all samples are mainly microporous with the pore size distribution centred around 2 nm and most of the distribution is in the microporous region. Detailed porosity parameters consisting of specific surface area, total volume, micropore and mesopore volumes and their percentages, and average pore size of all samples are given in Table 1. The microstructure of un-doped and N-doped carbon and activated carbon aerogel samples is characterized by SEM. SEM micrograms of samples at different magnifications are shown in Figure  5. Both un-doped and N-doped carbon/activated carbon aerogel samples show a highly amorphous structure with extremely irregular particle morphological architecture giving rise to high specific surface area and pore volume as shown by BET analysis.
The low-resolution micrographs of the carbon sample (a and e) show mostly homogeneous structure with the presence of microcavities whereas the surface of all activated carbon sample (b and f) display the formation of a spongy layer on the surface of carbon with the presence of micro-cavities leading to a high surface area. Additionally, the micrographs of nitrogen-doped carbon sample (c  Detailed porosity parameters consisting of specific surface area, total volume, micropore and mesopore volumes and their percentages, and average pore size of all samples are given in Table 1.

Scanning Electron Microscopy (SEM) Analysis
The microstructure of un-doped and N-doped carbon and activated carbon aerogel samples is characterized by SEM. SEM micrograms of samples at different magnifications are shown in Figure 5. Both un-doped and N-doped carbon/activated carbon aerogel samples show a highly amorphous structure with extremely irregular particle morphological architecture giving rise to high specific surface area and pore volume as shown by BET analysis.
The low-resolution micrographs of the carbon sample (a and e) show mostly homogeneous structure with the presence of microcavities whereas the surface of all activated carbon sample (b and f) display the formation of a spongy layer on the surface of carbon with the presence of micro-cavities leading to a high surface area. Additionally, the micrographs of nitrogen-doped carbon sample (c and g) exhibit a denser surface with filled inter-particle spaces in comparison to the more open structure of the un-doped sample. This can be credited to the smaller particle sizes formed with the introduction of melamine at the gelation stage which results in additional nucleation sites and can be the reason behind the higher specific surface area of the nitrogen-doped carbon sample given in Table 1. Activation of this sample results in the formation of further microcavities and a high level of porosity in its structure as indicated by the micrographs of d and h. The SEM images (i-l) with higher magnification reveals the expected granular structures in a random packing for the un-doped carbon attained through the

Contact Angle Measurements
Application of carbon as electrode material for electrochemical capacitors rely on its wettability with electrolyte. Therefore, contact angle measurements were performed as a key characterization technique to characterize electrode/electrolyte interactions and to elucidate the intrinsic electrolyte wettability of the electrode surface. The contact angle directly provides information on the interaction energy between the surface and the liquid and determines the level of wettability of a solid with a probing liquid. The contact angle of flat surfaces is determined from a drop of a suitable liquid resting on a surface using a high-resolution camera with software to capture and analyse the angle formed between the solid/liquid/vapor interfaces. Figure 6 shows the schematic diagram of measured contact angles at a three-phase boundary (solid to liquid to vapour) arisen from a thermodynamic equilibrium between the liquid phase of the droplet (L), the solid phase of the substrate(S), and the gas/vapor phase of the ambient atmosphere (V). In the case of a strong liquid/surface, the droplet will completely spread out on the solid surface and the contact angle will be close to zero degrees. Weaker liquid/solid interactions lead to a contact angle up to 90 • and for situations in which the liquid droplet simply rests on the surface without wetting it to any significant extent the contact angle will be larger than 90 • . The degree of wetting described by the contact angle depends on the energies (or surface tensions) of the interface between phases involved where the total energy is minimized. Thus in addition to offering information about the type of solid surface, i.e., hydrophilic or hydrophobic, interfacial contact angle also gives an estimation of surface energy [34].  Since all samples have similar average pore sizes around 2nm, the data given in Table 2 suggest that a positive effect on wettability (substantial drop in contact angle) and the transformation of carbon aerogel samples surface from hydrophobic to hydrophilic is due to the combined treatment of the electrode material with nitrogen and oxygen heteroatoms. Many pieces of literature have pointed out that improved wettability of nitrogen and oxygen functionalized surfaces can be credited to heterogeneous polar species with an improved affinity towards KOH aqueous solution resulting in improved wettability and ion transportation leading to a lower equivalent series resistance [23,38,39]. Figure 7 shows the images of 6M KOH droplets in contact with electrode surface using Ndoped carbon MRFC100-800-80 and N-doped activated carbon MRFC100-800-800-80 as electroactive material where a considerable drop in contact angle from 103 to 80 degree was observed after the activation of nitrogen-doped carbon aerogel sample. This is mainly due to the introduction of oxygen functionalities in addition to nitrogen heteroatoms resulting in an increase of the hydrophilicity and polar character of the carbon surface [40]. This will be discussed in the XPS analysis of the electrodes below.  In this study, the wettability of the electrodes prepared by using a sample of un-doped/N-doped carbon/activated carbon in their formulation was investigated by contact angle measurements using 6M KOH solution as the probing liquid since the same solution was used as the electrolyte in the electrochemical cell during electrochemical measurements. The measured values of the contact angles are given in Table 2. It can be seen that the wettability of the carbon by KOH solution improves immensely with the drop in the contact angle after the introduction of oxygen through the activation process and incorporation of nitrogen into the carbon structure through nitrogen doping [35,36]. A significant decrease in contact angle from 123 • to 91 • was observed for the sample RFCA100-800-800 after the introduction of oxygen functional groups on the carbon surface through the activation process. A further drop in contact angle to 80 • was recorded for the carbon sample containing both oxygen and nitrogen functional groups obtained by the activation of nitrogen-doped carbon aerogel sample (MRFCA100-800-800-80) as given in Table 2. Wang et al. also observed the same effect of nitrogen and oxygen dual doping on the wettability of the carbons with aqueous electrolytes and argued that functional dopants such as oxygen and nitrogen modify and improve the hydrophilicity of carbon significantly [37]. Table 2. Contact angle measurements of un-doped and nitrogen-doped carbon/activated carbon aerogels carbonized and activated at 800 • C.

Samples Contact Angle (θ)
RFC100-800 123 RFCA100-800-800 91 MRFC100-800-80 103 MRFCA100-800-800-80 80 Since all samples have similar average pore sizes around 2nm, the data given in Table 2 suggest that a positive effect on wettability (substantial drop in contact angle) and the transformation of carbon aerogel samples surface from hydrophobic to hydrophilic is due to the combined treatment of the electrode material with nitrogen and oxygen heteroatoms. Many pieces of literature have pointed out that improved wettability of nitrogen and oxygen functionalized surfaces can be credited to heterogeneous polar species with an improved affinity towards KOH aqueous solution resulting in improved wettability and ion transportation leading to a lower equivalent series resistance [23,38,39]. Figure 7 shows the images of 6M KOH droplets in contact with electrode surface using N-doped carbon MRFC100-800-80 and N-doped activated carbon MRFC100-800-800-80 as electroactive material where a considerable drop in contact angle from 103 to 80 degree was observed after the activation of nitrogen-doped carbon aerogel sample. This is mainly due to the introduction of oxygen functionalities in addition to nitrogen heteroatoms resulting in an increase of the hydrophilicity and polar character of the carbon surface [40]. This will be discussed in the XPS analysis of the electrodes below. doped carbon MRFC100-800-80 and N-doped activated carbon MRFC100-800-800-80 as electroactive material where a considerable drop in contact angle from 103 to 80 degree was observed after the activation of nitrogen-doped carbon aerogel sample. This is mainly due to the introduction of oxygen functionalities in addition to nitrogen heteroatoms resulting in an increase of the hydrophilicity and polar character of the carbon surface [40]. This will be discussed in the XPS analysis of the electrodes below.

X-ray Photoelectron Spectroscopy (XPS) Analysis
The elemental composition of electrodes using the carbon samples as the electroactive material was determined by XPS to gain information on their chemical configurations and assess the role of oxygen and nitrogen on their electrochemical performance. The wide survey scan spectra of prepared carbon electrodes given in Figure 8 shows that all samples are composed of fluorine, carbon, oxygen and smaller quantities of nitrogen. Therefore, high-resolution spectra of all mentioned elements were additionally measured to assess the molar composition of the surface of the sample for the quantification of oxygen and nitrogen content. The appearance of fluorine on XPS spectra is related to the use of polyvinylidene fluoride in Kynar as a binding material for the fabrication of the electrodes. The elemental composition of electrodes using the carbon samples as the electroactive material was determined by XPS to gain information on their chemical configurations and assess the role of oxygen and nitrogen on their electrochemical performance. The wide survey scan spectra of prepared carbon electrodes given in Figure 8 shows that all samples are composed of fluorine, carbon, oxygen and smaller quantities of nitrogen. Therefore, high-resolution spectra of all mentioned elements were additionally measured to assess the molar composition of the surface of the sample for the quantification of oxygen and nitrogen content. The appearance of fluorine on XPS spectra is related to the use of polyvinylidene fluoride in Kynar as a binding material for the fabrication of the electrodes. The elemental composition with % molar concentration of oxygen and nitrogen heteroatoms in electrode made of un-doped and N-doped carbon/activated carbon aerogel samples is summarised in Table 3. The data shows the presence of both oxygen and nitrogen in the carbon where oxygen is introduced on the samples surfaces through the activation process and nitrogen is introduced within The elemental composition with % molar concentration of oxygen and nitrogen heteroatoms in electrode made of un-doped and N-doped carbon/activated carbon aerogel samples is summarised in Table 3. The data shows the presence of both oxygen and nitrogen in the carbon where oxygen is introduced on the samples surfaces through the activation process and nitrogen is introduced within the carbon structure using melamine as a nitrogen source during the gelation process. The low value of contact angle obtained for MRFCA100-800-800-80 carbon could be a result of the presence of both oxygen and nitrogen functional groups improving its wetting behaviour and ionic conduction which is in good agreement with other literature [39,41]. The high-resolution XPS F1s, C1s, O1s and N1s spectra for electrodes using nitrogen-doped carbon (MRFC 100-800-80) and activated nitrogen-doped carbon (MRFCA 100-800-800-80) as electroactive material are shown in Figure 9a-d respectively. The F1s spectra of the electrodes shown in Figure 9a depict peaks at a binding energy of 688 eV which corresponds to the fluorine from PVDF in Kynar used as the binder [42,43]. The peaks on C1s spectra shown in Figure 9b [43][44][45][46][47]. The O1s spectra in Figure 9c show surface oxygen peaks at 532 and 531.7 eV corresponding to the presence of surface oxygen groups and phenolic and carboxyl groups [40]. These groups are related to the activation of carbon and are polar in nature, thus they are responsible for the electrode's hydrophilic behavior [48,49]. Figure 9d shows the low-intensity component of N1s spectra with weak peaks at a binding energy of 400 eV. These peaks are the characteristics of C-N and/or O = C-N types of functionalities in the carbon matrix [50]. Peaks at 401 eV could be related to different forms of quaternary nitrogen atoms including graphitic nitrogen, with nitrogen atom is attached to the carbon layer substituting a carbon atom [51]. All these peaks correspond to the low level of nitrogen in the carbon matrix below 1 mole% nitrogen.

XRD Analysis
XRD spectra of un-doped and N-doped carbon/activated carbons are shown in Figure 10. All samples have two broader low-intensity peaks commonly assigned to phase planes (002) (2θ = 23 • ) and (100) (2θ = 43.7 • ) respectively representing highly amorphous structures for these types of carbons [23]. The un-doped carbon sample shows significantly stronger peaks around 2θ = 23 • with a gradual drop in its intensity after N-doping and activation. A significant decrease in the intensity of (002) peaks can be probably due to an increased crystallite disorder with more defects in the carbon structure after the nitrogen doping and activation process [52]. Figure 9d shows the low-intensity component of N1s spectra with weak peaks at a binding energy of 400 eV. These peaks are the characteristics of C-N and/or O = C-N types of functionalities in the carbon matrix [50]. Peaks at 401 eV could be related to different forms of quaternary nitrogen atoms including graphitic nitrogen, with nitrogen atom is attached to the carbon layer substituting a carbon atom [51]. All these peaks correspond to the low level of nitrogen in the carbon matrix below 1 mole% nitrogen.   Figure 10. All samples have two broader low-intensity peaks commonly assigned to phase planes (002) (2θ = 23°) and (100) (2θ = 43.7°) respectively representing highly amorphous structures for these types of carbons [23]. The un-doped carbon sample shows significantly stronger peaks around 2θ = 23° with a gradual drop in its intensity after N-doping and activation. A significant decrease in the intensity of (002) peaks can be probably due to an increased crystallite disorder with more defects in the carbon structure after the nitrogen doping and activation process [52].

Cyclic Voltammetry (CV)
Cyclic voltammetry is a commonly used technique for the calculation of capacitive value and also a useful tool for the estimation of electric double layer and pseudo-capacitive charging behaviour of electrode materials [53]. Figure 11a-d shows cyclic voltammograms of un-doped carbon (RFCA100-800), activated carbon (RFCA100-800-800), N-doped carbon (MRFC100-800-80) and N-doped activated carbon (MRFCA100-800-800-80) respectively used as electroactive material with 6 M KOH solution as an electrolyte in a two-electrode symmetrical cell, measured at scan rates of 5, 10 and 15 mV s −1 . The specific capacitance of all samples calculated by Equations (3) and (4) are given in Table 4.   The porosity parameters of the samples given in Table 1 show that all samples have similar pore sizes with an average pore size (APS) of around 2nm. This was found to be the optimum pore size for achieving the highest capacitance of 136 Fg −1 for RFC100-800 carbon using a 6M KOH solution as the electrolyte in our previous study [28]. It has been also demonstrated by other studies that the maximum specific capacitance of electrode material is achieved when its APS is in excellent fit with electrolyte ion size [27,[54][55][56]. An increase in APS results in inferior specific capacitance due to a drop in dielectric constant "ε" (relative permittivity) and increase in "d" (distance between the centre of ion and carbon pore walls) as given by Equation (2) whereas, smaller pore size can result in issues such as electrolyte ions inaccessibility to the internal surface area of the carbon and also kinetic effects due to a limited ionic diffusion [27,57,58]. Improvement of the specific capacitance with activation from 136 to 197 Fg −1 for activated carbon RFCA100-800-800 (Table 4) was realised by enhancing the  The porosity parameters of the samples given in Table 1 show that all samples have similar pore sizes with an average pore size (APS) of around 2nm. This was found to be the optimum pore size for achieving the highest capacitance of 136 Fg −1 for RFC100-800 carbon using a 6 M KOH solution as the electrolyte in our previous study [28]. It has been also demonstrated by other studies that the maximum specific capacitance of electrode material is achieved when its APS is in excellent fit with electrolyte ion size [27,[54][55][56]. An increase in APS results in inferior specific capacitance due to a drop in dielectric constant "ε" (relative permittivity) and increase in "d" (distance between the centre of ion and carbon pore walls) as given by Equation (2) whereas, smaller pore size can result in issues such as electrolyte ions inaccessibility to the internal surface area of the carbon and also kinetic effects due to a limited ionic diffusion [27,57,58]. Improvement of the specific capacitance with activation from 136 to 197 Fg −1 for activated carbon RFCA100-800-800 (Table 4) was realised by enhancing the specific surface area and introducing oxygen functional groups as a result of the activation process while maintaining the average pore size around 2nm. Improved specific surface area "S" results in enhanced specific capacitance according to Equation (2) although the relationship between specific capacitance and the BET specific surface area of the electroactive material is not always linear since the total measured specific surface area of the electrode might not be fully accessed by electrolyte ions. The presence of oxygen functional groups on the surface of carbon is another contributor towards its improved capacitive performance due to the addition of pseudocapacitance through the Faradaic redox reaction originated from fully reversible oxidation/reduction of hydroquinone/quinone groups. Fan et al. has recently reported that the oxygen doubly bound to carbon groups might be responsible for redox reaction which can be a key contributor to pseudocapacitive element in the overall capacitive performance of activated carbon-based electrodes in an electrochemical capacitor since oxygen has electron acceptor characteristics [39].
Similarly, the capacitive performance of the electroactive material can be also improved by the introduction of nitrogen functional groups on the surface or within the carbon matrix [23,37,39]. Nitrogen is one of the most extensively investigated elements added to carbons to improve their capacitance in aqueous electrolytes since its incorporation into carbon is comparatively easier attributable to its similar size and the same number of valence electrons with carbon [59]. Data in Table 4 shows that further enhanced specific capacitance of 208 Fg −1 for N-doped carbon compared to the specific capacitance of 136 Fg −1 obtained for an un-doped carbon aerogel sample with similar porous structure is attained. This higher specific capacitance is the sum of both electric double-layer capacitance and the pseudocapacitance due to redox reactions of nitrogen heteroatoms where the former originates from the increased surface area of the active material (Table 1) and the later instigates from its nitrogen content (Table 2) [60]. A number of studies have shown increased capacitance of nitrogen-doped carbons in alkaline solutions [4,23,39]. In their study of the effects of nitrogen and oxygen functional groups on the electrochemical performance of activated carbon nanotubes in supercapacitors, Liu et al. proposed the Faradaic redox reactions shown in Figure 12 for nitrogen functional groups in alkaline medium [61].
instigates from its nitrogen content (Table 2) [60]. A number of studies have shown increased capacitance of nitrogen-doped carbons in alkaline solutions [4,23,39]. In their study of the effects of nitrogen and oxygen functional groups on the electrochemical performance of activated carbon nanotubes in supercapacitors, Liu et al. proposed the Faradaic redox reactions shown in Figure 12 for nitrogen functional groups in alkaline medium [61]. The highest specific capacitance of 289 Fg −1 was obtained for nitrogen and oxygen dual-doped carbon (MRFCA100-800-800-80) synthesized by the activation of N-doped carbon as compared to the specific capacitance of 208 Fg −1 for non-activated N-doped carbon. This improved capacitive performance can be attributed to the electric double layer contribution of porous carbon and synergic effect of oxygen functional groups present on the surface of carbon as a result of the activation process and nitrogen functional groups introduced into its structure through the addition of melamine as a nitrogen source during the gelation process respectively.
CV curves of un-doped and doped carbon/activated carbon aerogel samples in Figure 11 show largely symmetric and quasi-rectangular shapes. The moderate distortion of the CV curves from an ideal rectangular shape which is typically associated with electric double layer capacitive behaviour can be attributed to the pseudo-capacitance contribution arisen from Faradaic redox reactions involving both oxygen and nitrogen functional groups attached to the carbon surface and fused into The highest specific capacitance of 289 Fg −1 was obtained for nitrogen and oxygen dual-doped carbon (MRFCA100-800-800-80) synthesized by the activation of N-doped carbon as compared to the specific capacitance of 208 Fg −1 for non-activated N-doped carbon. This improved capacitive performance can be attributed to the electric double layer contribution of porous carbon and synergic effect of oxygen functional groups present on the surface of carbon as a result of the activation process and nitrogen functional groups introduced into its structure through the addition of melamine as a nitrogen source during the gelation process respectively.
CV curves of un-doped and doped carbon/activated carbon aerogel samples in Figure 11 show largely symmetric and quasi-rectangular shapes. The moderate distortion of the CV curves from an ideal rectangular shape which is typically associated with electric double layer capacitive behaviour can be attributed to the pseudo-capacitance contribution arisen from Faradaic redox reactions involving both oxygen and nitrogen functional groups attached to the carbon surface and fused into its inner network respectively [62,63]. All carbon samples show a steady drop in specific capacitance with an increase in scan rate due to limited ion mobility at higher scan rates [64].

Electrochemical Impedance Spectroscopy (EIS)
Electrochemical impedance spectroscopy (EIS) is a suitable technique to analyse capacitive/resistive behaviour and charge transfer kinetics of an electroactive material. Nyquist plots of the cell using un-doped and N-doped carbon/activated carbons as the electroactive material obtained in the frequency range of 100 KHz to 50 Hz with an AC wave amplitude of 10 mV are shown in Figure 13. All Nyquist plots show an incomplete semicircle in higher frequency region (inset) related to charge transfer and polarization resistance (RCT) where smaller diameters correspond to faster kinetics representing a faster transport process. The equivalent series resistance (Rs) as a combination of the current collector resistance, ionic resistance of the electrolyte, and the electrode/electrolyte interfacial resistance can be calculated from the high-frequency intercept of EIS spectra to the real axis [63,65] whereas, the nearly vertical line in low-frequency region (absence of semicircle) depicting Warburg like behaviour signifies mainly capacitive behaviour with low ion diffusion resistance within highly porous media [66,67].
The resistive behaviour of the cell was further investigated in detail by fitting the experimental impedance data with the depicted equivalent circuit model given as an inset in Figure 14 for the quantitative analysis of the EIS spectra using "Zview" software. It can be seen that there is a good agreement between the experimental and fitted curves shown in Figure 14.
faster kinetics representing a faster transport process. The equivalent series resistance (Rs) as a combination of the current collector resistance, ionic resistance of the electrolyte, and the electrode/electrolyte interfacial resistance can be calculated from the high-frequency intercept of EIS spectra to the real axis [63,65] whereas, the nearly vertical line in low-frequency region (absence of semicircle) depicting Warburg like behaviour signifies mainly capacitive behaviour with low ion diffusion resistance within highly porous media [66,67]. The resistive behaviour of the cell was further investigated in detail by fitting the experimental impedance data with the depicted equivalent circuit model given as an inset in Figure 14 for the quantitative analysis of the EIS spectra using "Zview" software. It can be seen that there is a good agreement between the experimental and fitted curves shown in Figure 14.
Numerical values of the equivalent series resistance, RS, and the charge transfer resistance, RCT, as the barrier between the anodic and cathodic current flows through the cell are given in Table 5. These elements are also shown in the equivalent circuit embedded as an inset in Figure 14.  A decline in the equivalent series resistances from 0.81 Ω to 0.30 Ω and a slight increase in charge transfer resistance from 0.29 Ω to 0.40 Ω were observed after activation of un-doped carbon aerogel sample RFC100-800. The drop in equivalent series resistance after activation can be credited to improved wettability and change in surface chemistry of the electrode due to the introduction of oxygen surface functional groups [39] for activated carbon aerogel (RFCA100-800-800) whereas a Numerical values of the equivalent series resistance, RS, and the charge transfer resistance, RCT, as the barrier between the anodic and cathodic current flows through the cell are given in Table 5. These elements are also shown in the equivalent circuit embedded as an inset in Figure 14. A decline in the equivalent series resistances from 0.81 Ω to 0.30 Ω and a slight increase in charge transfer resistance from 0.29 Ω to 0.40 Ω were observed after activation of un-doped carbon aerogel sample RFC100-800. The drop in equivalent series resistance after activation can be credited to improved wettability and change in surface chemistry of the electrode due to the introduction of oxygen surface functional groups [39] for activated carbon aerogel (RFCA100-800-800) whereas a slight increase in charge transfer resistance after physical activation can be attributed to an increase in porosity of the carbon as shown in Table 1, affecting its electric conductivity [28]. Furthermore, a gradual drop in equivalent series and charge transfer resistances was witnessed after the introduction of both oxygen and nitrogen functional groups on the surface and within the carbon matrix with the lowest measured equivalent series and charge transfer resistances of 0.11 Ω and 0.02 Ω respectively for oxygen and nitrogen dual-doped sample as shown in Table 5. This decline in overall resistive behaviour of samples after oxygen and nitrogen doping can also be linked to the modification of surface chemistry resulting in enhanced conductivity and electron transfers due to improved wetting behaviour for oxygen and nitrogen co-doped activated carbon aerogel sample (MRFCA100-800-800-80) in contact with 6M KOH electrolyte solution (with the lowest recorded contact angle of 80 • ) as shown in Table 2 [68]. All samples show excellent capacitive behaviour with very low solution and charge transfer resistances particularly the oxygen and nitrogen dual-doped sample MRFCA100-800-800-80 exhibiting the lowest equivalent series and charge transfer resistances can be adopted as a suitable electroactive material for aqueous electrolyte electrochemical capacitors.

Conclusions
Highly porous nanostructured un-doped/N-doped carbon and activated carbon aerogels were produced with an average pore size of~2 nm. The carbons were used as electroactive material with a 6M KOH solution as the electrolyte in an electrochemical cell. Cyclic voltammetry measurements of the cell showed a significant improvement in its specific capacitance after activation and nitrogen doping of the carbon used as electroactive material in its electrode formulation. It was shown that incorporation of nitrogen and oxygen functional groups witnessed by XPS analysis of the materials, transforms the surface of the electrode from a hydrophobic to hydrophilic surface with steady improvement in electrode/electrolyte wettability and decrease in contact angle from 123 • obtained for un-doped carbon aerogel to 80 • for nitrogen and oxygen co-doped carbon aerogel sample. This resulted in a significant increase in the specific capacitance of the cell, with the highest specific capacitance of 289 Fg −1 attained for nitrogen and oxygen dual-doped sample MRFCA100-800-800-80 which is attributed to both EDLC and pseudocapacitive contributions originated from the highest specific surface area of the carbon and also the presence of nitrogen/oxygen functional groups within the carbon matrix and on its surface respectively. EIS measurements also showed a strong relationship between surface chemistry and equivalent series/charge transfer resistances for un-doped and nitrogen-doped carbon/activated carbon aerogel samples. The surface modification of the carbons through activation and nitrogen doping resulted in the lowest equivalent series and charge transfer resistances obtained for the electrode fabricated by using N-doped activated carbon sample as electroactive material in electrochemical capacitor cell, making this sample an ideal and cost-effective candidate for aqueous-based electrochemical capacitors. Funding: This work was financially supported by EPRSC/BEIS (EP/R021503/1, North East Centre for Energy Materials -NECEM).

Conflicts of Interest:
The authors declare no conflict of interest.