Introduction

As the demand for efficient electrical energy storage continues to grow, electric double-layer capacitors (EDLCs), or supercapacitors, are emerging as promising devices for bridging energy needs across various sectors. Owing to their high power density, supercapacitors can be of particular importance for applications in electric vehicles, smart power grids and intermittent energy demands in light of managing the transition from fossil fuels to renewable energy1. A comprehensive molecular-scale understanding of electric double layer formation is therefore considered essential for optimising the performance of supercapacitors and driving their successful integration in a wider range of applications2,3,4,5,6,7.

To date, activated carbons are predominantly used as supercapacitor electrode materials due to their high share of microporosity (i.e., pores smaller than 2 nm), chemical stability, electrical conductivity, low cost and overall sustainability, as they can be derived from waste organic materials8. While organic electrolyte solvents are often preferred in technical applications due to their higher electrochemical stability window9, water as a solvent offers the advantages of easy handling under ambient conditions, high ion mobility, low cost, reversible redox activity, and overall environmental friendliness10,11. However, gaining a mechanistic understanding of activated carbon-based aqueous supercapacitors is often challenging due to their disordered pore structures and complex electrode-electrolyte interactions, which hinder straightforward data interpretation12. To address these challenges, model materials with well-defined and tunable properties are highly valuable for investigating the mechanisms of charge storage. Metal-organic frameworks (MOFs) stand out as a promising class of such materials due to their highly ordered nanoporous structures and chemically tunable properties. Traditionally, MOFs have been limited by poor electrical conductivity, restricting their use in ion storage devices. However, recent advances have introduced a class of electrically conductive MOFs characterised by 2D π-d conjugated layers that stack into honeycomb-like structures13,14.

One prominent example is the Ni3(2,3,6,7,10,11-hexaiminotriphenylene)2 (Ni3(HITP)2) MOF, introduced by Sheberla et al.15, which showed promising capacitance values on par with or even superior to conventional carbon electrodes16,17,18. The ordered pore structures, tunable surface chemistries, and well-defined functional groups of MOFs such as Ni3(HITP)2 provide an exciting opportunity to systematically explore how electrode architecture, pore geometry, and chemical functionality influence charge storage behaviour. Insights gained from such studies not only improve our understanding of MOF-based systems but could also help uncover more general principles of charge storage that can inform the development of next-generation supercapacitor materials more broadly. Recent research efforts have explored the influence of particle morphology on electrochemical behaviour using conductive MOFs17, as well as the effects of cation size5 on EDL formation, suggesting that cation dynamics primarily govern EDL formation in MOFs5,19. Despite these advancements, critical knowledge gaps remain. The detailed mechanisms underlying local ion rearrangement in the pore space, the interplay between electrosorption behaviour and functional groups, and the structural changes that occur during charge and discharge cycles remain poorly understood.

In situ Small-Angle Scattering of X-rays (SAXS) or neutrons (SANS) together with Wide-Angle X-ray Scattering (WAXS) and X-ray transmission (XRT) have proven effective in analysing complex multi-component ion storage systems such as electric double-layer capacitors (EDLCs)12,20,21,22,23,24 or batteries25,26. More specifically, the transmission signal can be used to track global ion and solvent concentration changes22,24, and the combination with SAXS/WAXS enables the investigation of local confinement-induced changes such as ion desolvation12. Advanced approaches such as contrast variation by combining SAXS and SANS22 or by employing anomalous SAXS (ASAXS)23 allow for a unique separation of component- or ion-specific scattering contributions. Nevertheless, the scattering signal from EDLCs is generally composed of contributions from the nanoporous solid electrodes, the electrolyte solvent in- and outside the pores, as well as cations and anions with dynamic local and global concentrations, which often requires new ways of data treatment by, e.g., combining experimental results with computational modelling12. In this context, sharp Bragg peaks originating from highly ordered pores, such as in MOFs, allow for a more direct interpretation of changes in the scattering signal towards physical phenomena, such as ion rearrangement and pore swelling, in real-time. Recent work on in situ ion electrosorption in MOFs27 and carbons23,28, as well as previous work on gas adsorption in carbons and silica29,30,31,32,33 generally highlights small-angle scattering as a powerful method for studying guest-host interactions in ordered nanoporous systems, with the prospect to better understand fundamentals of charge storage behaviour in EDLCs. While SAXS and SANS are complementary in terms of scattering contrast, SAXS at synchrotron radiation sources allows unique operando studies with high time resolution and small beams that permit using realistic cell geometries.

In this study, we employ SAXS/WAXS/XRT to investigate Ni3(HITP)3 MOF-based supercapacitors operated with aqueous electrolytes and different charging protocols. We track subtle structural changes of the MOF framework, including wetting- and electrosorption-induced pore swelling, while also assessing whether ion intercalation takes place. Furthermore, the approach allows for real-time, i.e., operando investigation of a full EDLC device. This delivers critical information on local ion rearrangement within pores in response to an applied cell voltage, providing insights into how the immobilisation of specific anions drives cation-dominated charge storage. The observed anion-pinning effects may offer a general strategy to tune supercapacitor charging mechanisms and performance.

Results and discussion

Characterisation of dry Ni3(HITP)2 electrodes

The nanoscale origin of the electrochemical behaviour of Ni3(2,3,6,7,10,11-hexaiminotriphenylene)2 Ni3(HITP)2 metal-organic framework (MOF) based supercapacitors was assessed by small-angle X-ray scattering (SAXS) and wide-angle X-ray scattering (WAXS). Before addressing operando changes of the scattering patterns with electrolyte present, it is essential to first establish a comprehensive understanding of the MOF structure and related scattering features in the dry state of the electrode. Figure 1 displays the scattering signal of the neat Ni3(HITP)2 MOF electrode in the SAXS (Fig. 1a)) and the WAXS region (Fig. 1b)).

Fig. 1: Scattering profiles of the dry Ni₃(HITP)₂ MOF electrode in a) SAXS and b) WAXS regions represented by a full black line.
figure 1

We define “SAXS” and “WAXS” here pragmatically by the q-ranges covered by the two detectors used to collect the signal, with an overlap between 14 and 16 nm−1. The dashed black line in (a) shows the single-step form factor model |F(q)cyl.|2 for infinitely long monodisperse cylindrical pores with diameter D = 1.39 nm. Vertical grey lines represent in-plane (hk0) peaks, orange dash-dotted lines indicate out-of-plane (hkl, l ≠ 0) peaks, and dashed red lines mark stacking peaks (00 l). In-plane peaks from the atomic-scale carbon triphenylene structure are marked by dotted green lines (c-hk0). For clarity, the vertical grey lines in the WAXS pattern are only shown up to 18 nm−1 (see SI, Supplementary Fig. S1 for full picture). The PTFE-binder peak at q = 12.4 nm−1 is not related to the MOF structure. The inset in b, visualised using Mercury 3.751, shows the top-view and AB-stacked side view of Ni₃(HITP)₂ with some sets of exemplary families of planes. The zoomed-in section of the inset shows the detailed structure with labelled elements.

The inset in Fig. 1b displays the real space structural model (top view and side view) of an AB stacked Ni3(HITP)2 model as reported in ref. 15. The most obvious structural features of this system are the layered structure and the regular arrangement of cylindrical pores perpendicular to the layers on a 2D hexagonal lattice. To better understand the structural features of the MOF and to facilitate comparison with literature, we classify the expected X-ray diffraction peaks into four distinct categories: (i) peaks arising from the 2D pore lattice (vertical gray lines indicating in-plane hk0 reflections), (ii) peaks from the layered structure of the MOF, which give rise to stacking peaks 00 l (dashed red lines in Fig. 1b), (iii) mixed reflections (hkl, with h or k ≠ 0, and l ≠ 0, orange dash-dotted lines in Fig. 1a), and (iv) peaks attributed to the carbon structure of the triphenylene linker, which produce two broad reflections labelled c-100 and c-110 (green dotted lines in Fig. 1b). To clearly distinguish between these groups, an example from each category - in-plane pore (solid grey line), layer stacking (red dashed line), mixed (orange dash-dotted line), and triphenylene carbon (green dotted line) - is illustrated in the inset of Fig. 1b. The peak near q = 12.4 nm−1 in Fig. 1a originates from the 5 wt.% PTFE binder in the Ni3(HITP)2 electrode and is not related to the MOF structure, but acts as a useful internal standard.

All in-plane peaks (indices hk0), corresponding to the 2D hexagonal (P6mm) arrangement of cylindrical pores (grey solid lines in Fig. 1a, b, appear at the expected q-positions with a pore-centre to pore-centre distance a = 2.20 nm. The stacking peaks (002 and 004, red dashed lines in Fig. 1b) correspond to a layer spacing of c = 0.33 nm. Surprisingly, no peaks with mixed indices, i.e., with h or k ≠ 0, and l ≠ 0 are observed in the SAXS pattern (see orange dash-dotted vertical lines in Fig. 1a). The absence of mixed-index peaks strongly suggests that the layers are not perfectly stacked in a conventional AB or AA pattern to form a 3D crystal. Instead, the scattering signal resembles a so-called ‘turbostratic’ stacking34,35, where the layer spacing is regular, but the in-plane positional correlations between the layers lack long-range order, leading to the absence of peaks with mixed indices. This interpretation is further supported by the asymmetry of the c-100 peak from the carbon structure within the framework, a characteristic feature of turbostratic carbons, as described in ref.35. This finding is consistent with ref.36, which characterises the stacking of Ni3(HITP)2 as ‘near-eclipsed’. We have undertaken atomistic simulations of the MOF structure, which reveals a very small energy difference between AB and stacked layer configurations (SI Supplementary Fig. S2 and Supplementary Note S1). Hence, our results strongly indicate a Ni3(HITP)2 structure where the layers exhibit no long-range positional order in the stacking direction, reflecting the absence of a well-defined stacking sequence.

In addition to the stacking characteristics, the pore diameter of D ≈ 1.39 nm was determined from the SAXS data in Fig. 1a by analysing the experimental data with a single-step form factor model of infinitely long monodisperse cylindrical pores with circular cross-section29,33,37,38 (dashed black line in Fig. 1a). The regular arrangement of identical pores gives rise to sharp Bragg peaks at distinct positions, with their height being proportional to the pore form factor (see Eq. 4 in Materials and Methods). This model explains particularly the low intensities observed for the (110) and (300) in-plane reflections, as these nearly coincide with the form factor minima for pores of this diameter. Surprisingly, this simple approach reproduces the intensities of the diffraction peaks in the SAXS regime very well, although it does neither consider the inhomogeneous electron density distribution in the MOF structure nor the fact that the pores are not perfectly cylindrical in shape. We note that a more advanced (numerical) form factor model, which includes the circularly non-symmetric electron density of the MOF pore walls, leads to a very similar radially averaged form factor (see SI, supplementary Note S4 and Supplementary Fig. S5). The mean pore diameter of 1.39 nm from the form factor models was found to perfectly align with Ar@87 K gas sorption data evaluated using a zeolite non-local density functional theory (NLDFT) kernel for cylindrical pores on the adsorption branch (see SI Supplementary Fig. S3). The sample’s specific surface area (SSA) was assessed using Ar@87 K gas sorption analysis and resulted in a Brunauer–Emmett–Teller (BET) area of 390 m2/g.

Characterisation of wetted Ni3(HITP)2 electrodes

After establishing the structural model of the dry Ni3(HITP)2 MOF electrode, attention is now directed towards its behaviour upon the addition of (aqueous) electrolytes. The data presented in Fig. 2 were recorded on a flat-plane detector, allowing the continuous acquisition of a very wide q-range using a single detector. While the resolution of this experimental set-up using a single detector is limited, the extended q-range is particularly useful for quantitatively considering the scattering contribution of the bulk electrolyte within the wetted electrode. Figure 2a compares the scattering signal of the dry electrode (full black line) to its wetted state in the presence of pure water (light blue full line) and of aqueous 1 M NaTFSI (full orange line). For reference, the recorded scattering signals from bulk liquid water and 1 M NaTFSI (aq.) bulk liquid electrolyte at the same temperature are shown with corresponding dotted lines.

Fig. 2: Scattering profiles of wetted Ni3(HITP)2 electrodes.
figure 2

a Comparison of the dry Ni₃(HITP)₂ electrode (solid black line) with its wetted state using pure H₂O (solid light blue line) and 1 M NaTFSI (solid orange line). The corresponding bulk electrolyte signals for H₂O and 1 M NaTFSI (aq.) are shown as blue and orange dotted lines, respectively. b Scattering profiles from the wetted electrodes with bulk liquid contributions subtracted. The inset illustrates that the shift of the stacking peak indicates an increased layer spacing upon wetting (not to scale), while deviations in the in-plane peak intensities relative to the dry MOF suggest an inhomogeneous electrolyte distribution within the pore, i.e., a higher ion concentration close to the pore walls.

The characteristic diffraction peaks of the Ni3(HITP)2 MOF remain visible in the wetted state, although strong diffuse scattering contributions from the bulk-liquids are dominant, particularly at larger q above 13 nm−1 (Fig. 2a). Figure 2b shows the data after the bulk liquid contributions were subtracted from the wetted electrode data. It is evident that the 002 stacking-peak at approximately 18 nm−1 clearly shifts towards smaller q values for the MOF soaked in H2O or 1 M NaTFSI (aq.), indicating an increase in the layer stacking distance by 1.44 % in the wetted state. In contrast, the positions of the in-plane (hk0) peaks remain largely unchanged, suggesting that noticeable dimensional changes of the MOF occur predominantly along the stacking direction. Since this is true for both pure water and aqueous 1 M NaTFSI electrolyte, we attribute this effect to a wetting-induced swelling of the MOF in the stacking direction. Aside from the shift in the stacking peak and a slight deviation at low q values (attributed to changes in contrast between MOF particles and their surrounding medium), the bulk-water corrected scattering curve of the H2O filled electrode closely follows that of the neat MOF (Fig. 2b), black and blue lines, respectively). This suggests that the scattering can be interpreted as a combination of bulk H2O and the dry MOF, with a homogeneous distribution of H2O within the pores.

In contrast to pure water wetting, the corrected scattering profile for aqueous 1 M NaTFSI does not resemble a simple sum of the dry MOF signal and the bulk 1 M NaTFSI aqueous solution signal, evident by the drastic change in peak heights as compared to the dry MOF. This indicates the presence of an inhomogeneous electrolyte distribution within the pores, leading to a changed electron density distribution, and consequently a changed scattering form factor, which directly influences the peak intensity. By way of an example, the inset in Fig. 2b illustrates an inhomogeneous distribution of electrolyte in the pore with a higher electrolyte concentration near the pore walls. A quantitative treatment explaining the observed changes in the heights of the peaks will be presented further below.

Scattering profiles similar to that from 1 M NaTFSI (orange line in Fig. 2) were also obtained from electrodes wetted with 1 M KTFSI and 0.1 M NaTFSI (SI Supplementary Fig. S4a). In contrast, scattering patterns closely resembling those of electrodes wetted with pure H₂O (light blue line in Fig. 2) were observed for 1 M RbBr (aq.) and 1 M Na2SO4 (aq.) (SI Supplementary Fig. S4b). This suggests that the observed Bragg peak intensity changes are specifically related to the presence of TFSI- anions, rather than to the presence of electrolyte ions or solvent in the pores in general. Notably, the similarity between the scattering patterns of 1 M NaTFSI (Fig. 2b) and 0.1 M NaTFSI (SI Supplementary Fig. S4a) indicates that presumably a high concentration of TFSI- is inhomogeneously distributed within the pore space, even without an applied cell voltage.

Due to the resolution limitations of the measurements in Fig. 2, it was not possible to accurately fit a form factor model in order to fully characterise the electrolyte distribution. To address this, further high-resolution SAXS measurements were conducted to confirm the electrolyte concentration gradients within the pores and to study the specific ion arrangement in more detail. These experiments were conducted operando during the charging and discharging of a full supercapacitor cell in order to additionally investigate the implications of this inhomogeneous electrolyte distribution for the systems electrochemical behaviour under working conditions.

Specific TFSI- adsorption at 0 V

Figure 3a presents the SAXS signal of the working electrode in the wetted state with 1 M NaTFSI at 0 V (grey), + 0.4 V (red) and − 0.4 V (blue). A hole was punched into the counter electrode enabling to collect the scattering signal for just one electrode specifically20. For reference, the scattering profile from the dry electrode has been added again as a full black line. The bulk electrolyte was not measured for this specific experimental setup and could therefore not be subtracted. The high-resolution SAXS data in Fig. 3a confirm the result from Fig. 2 about noticeably relative Ni3(HITP)2 Bragg peak intensity changes when electrolyte is added. Diffraction peaks near a form factor minimum, such as the 110 and 300 peaks, are particularly sensitive to form factor changes, and thus, to variations of the electron density distribution within the pores. Upon electrolyte addition, the 110 peak completely disappears (i.e., it now perfectly matches the form factor minimum), while the 300 peak gains relative intensity. Moreover, the intensity ratio of the 200 and 210 peaks is roughly inverted (Fig. 3a).

Fig. 3: Effect of anion pinning and applied voltage sequences on the scattering profile of Ni3(HITP)2 electrodes.
figure 3

a SAXS data of Ni3(HITP)2 in the dry state (black) and wetted with 1 M NaTFSI at 0 V (grey), + 0.4 V (red), and − 0.4 V (blue) applied cell voltage. The corresponding best fitting form factors |F(q)cyl.|2 for the dry and filled states are included as dashed and dotted lines, respectively. The inset highlights the 220 and PTFE peaks. b Schematic representation of the pore filling and electron density profiles for the dry and wetted states, indicating the formation of a core-shell electrolyte distribution with a TFSI--rich layer of about ~ 0.25 nm thickness along the MOF pore wall. The top right provides a sketch of a TFSI- ion in cis-configuration showing approximate dimensions with atoms represented as blue for nitrogen (N), orange for sulphur (S), red for oxygen (O), grey for carbon (C), and yellow-green for fluorine (F).c Cyclic voltammograms (CVs) recorded at 1 mV/s before (94 F/g, dark green) and after (104 F/g, light green) the chronoamperometry (CA) steps. d Cell voltage (top panel) showing CV and CA cycles, with time-resolved data for the average relative scattering intensities at low-q between 0.34 and 0.64 nm−1 and relative peak intensities of selected peaks (200, 210, 300, 220 and PTFE).

The simplest possible form factor to explain these changes is a two-step core-shell model according to ref. 33 consisting of three parameters (Fig. 3b). The outer pore diameter remained fixed at D1 = 1.39 nm (as in the dry state), marking the cylindrical MOF pore wall, while an inner diameter of D2 = 0.9 nm forms a shell of approximately 0.25 nm thickness with slightly higher electron density as compared to the rest of the electrolyte-filled pore (Fig. 3b). Table 1 summarises the parameters for the unfilled and filled pore states that best fit the experimental data, while the corresponding form factor models are shown in Fig. 3a) by dashed and dotted lines, respectively. The associated electron densities for individual ions and bulk electrolytes are provided in SI Supplementary Table S1.

Table 1 Diameters and electron densities in the dry and 1 M NaTFSI (aq.) wetted state as resulted from the two-step cylindrical core-shell form factor model

Since none of the other Na-containing electrolytes, but all TFSI-containing electrolytes, showed a change in the form factor (SI Supplementary Fig. S4), this layer of higher electron density observed in NaTFSI electrolyte is interpreted as a TFSI-rich region near the pore wall. The layer thickness of 0.25 nm aligns reasonably well with the short dimension of the roughly prolate ellipsoid-shaped TFSI- ion, measuring about 0.29 nm39. The increased electron density between the bulk pore filling (ρpore) and the interface layer (ρTFSI-rich) computes roughly to an 1 M increase of the TFSI- concentration in this layer. Assuming a bulk electrolyte concentration of 1 M in the rest of the pore, this translates to a TFSI- concentration of about 2 M in the TFSI--rich layer, or in other words, about 20 % of the pore surface occupied by TFSI- ions (see Supplementary Note S3). We acknowledge that while this model provides both a qualitative and quantitative understanding of the observed changes, it oversimplifies the electron density profile. In particular, the MOF pore wall is not homogeneous around its circumference in terms of electron density, limiting the ability to pinpoint specific TFSI- adsorption sites within the pore. A numerical simulation of a form factor model including the radial electron density variations in the MOF, unfortunately, did not provide sufficient accuracy of the radially averaged form factor, which is the only experimentally observable quantity (SI Supplementary Fig. S5 and Supplementary Note S4). Consequently, while the model presented here offers quantitative information about the radial distribution of TFSI- ions, it cannot resolve their exact spatial location along the circumference of the pore, i.e., their specific adsorption sites.

Recent work with NMR, however, postulated possible hydrogen-bond-like interactions of fluorine atoms in electrolyte anions (including TFSI- and BF4-) with the N-H moiety of the MOF linker19. The authors of ref. 16 also briefly note in their supplementary information the presence of BF4 anions trapped in Ni3(HITP)2 pores after using TEABF4/acetonitrile (ACN) electrolyte. Our experimental observation of strong form factor changes for TSFI-, but not for fluorine-free electrolytes (RbBr and Na2SO4, SI Supplementary Fig. S4), supports the hypothesis that fluorine-containing anions form strong hydrogen-bond-like interactions with the N-H group. Additional evidence for similar interactions is provided by our SAXS measurements with other fluorinated anions, BF4- and OTf - (SI Supplementary Fig. S6), which also show clear changes in the (200) and (210) peak intensities due to form factor variation consistent with anion adsorption at the pore walls. As additional proof, we observed a homogeneous electrolyte distribution with LiTFSI/propylene carbonate (PC) electrolyte in Cu3(HHTP)2 electrodes (SI Supplementary Fig. S7), a MOF approximately isostructural to Ni3(HITP)2, which, however, lacks N-H groups in its linker. This further strengthens the conclusion that F···H-N interactions indeed underlie the observed inhomogeneous electrolyte distribution, leading to a higher concentration of adsorbed TFSI- ions near the MOF pore walls.

TFSI- immobilisation at applied cell voltage and cation dominated charge balancing

Building on the understanding of the system at no applied voltage (0 V), we now investigate the systems operando response to an applied external cell voltage. In our custom electrochemical cell for operando SAXS, cyclic voltammetry (CV) data showed a rectangular shape supporting pure capacitive behaviour of the MOF (Fig. 3c). After the CVs, a voltage sequence was then applied with chronoamperometry (CA), i.e., constant voltage at 0 V, + 0.4 V, 0 V, − 0.4 V, and 0 V with 1-hour holds, followed by another set of CV cycles. The applied voltage sequence is depicted in the top panel of Fig. 3d). Following the CA holds, a slightly larger specific capacitance was observed (104 F/g) compared to before the holds (94 F/g). These values are comparable to values previously reported for Ni3(HITP)2 with a similar BET specific surface area using organic electrolyte19, particularly as no carbon black or other conductivity enhancing additive has been added. We attribute the increased specific capacitance by approximately 10% to enhanced wetting, a characteristic effect of electrowetting induced by the applied cell voltage40. While no electrochemical degradation was observed in this study for Ni3(HITP)2 with aqueous 1 M NaTFSI under maximum applied cell voltage of ± 0.4 V, a significant decline in electrochemical performance was observed when the same voltage series was performed between ± 0.6 V (SI Supplementary Fig. S8).

Interestingly, only minute changes are observed in the scattering signal as the voltage is varied, with the averaged scattering curves at constant applied cell voltage nearly coinciding (Fig. 3a, grey, red, and blue full lines). The left zoomed-in inset in Fig. 3a) shows details of the 220 in-plane peak, pointing out subtle differences in peak intensity at contrasting electrode polarisations, which will be discussed further below. The close similarity of the curves indicates only very small changes to the form factor, suggesting that TFSI- ions remain anchored in their position close to the pore wall, being effectively immobilised even against the repelling electrostatic forces at a constant cell voltage of − 0.4 V.

It was shown in previous work that X-ray transmission (XRT) data allow to determine the charge-balancing mechanism in electric-double layer capacitors20,22,24,41. The absence of systematic changes in the X-ray transmission signal with applied cell voltage (SI Supplementary Fig. S9a) indicates that only the light Na+ cations migrate and contribute to charge balancing. If the larger, more strongly X-ray absorbing TFSI- anions were involved, a clear change of the transmitted X-ray intensity with changing TFSI- concentrations would be expected (SI Table TS1 and Supplementary Note S5). In contrast, XRT measurements of the isostructural Cu3(HHTP)2 MOF, which lacks N-H moieties in the linker, using LiTFSI/PC electrolyte show clear voltage-dependent changes (Supplementary Fig. S9b), consistent with both cations and anions participating in charge balancing. This supports the interpretation that, in Ni3(HITP)2, the absence of anion involvement arises from TFSI- immobilisation at N-H sites.

The observation of a purely cation-governed charge balancing is supported by recent experimental findings using electrochemical quartz crystal microbalance (EQCM)19, demonstrating that charge balancing is cation-dominated in Ni3(HITP)2-based supercapacitors using 1 M Net4BF4 in deuterated acrylonitrile solvent (d3ACN). We hypothesise that such cation-dominated charge-balancing mechanism in Ni3(HITP)2 is most likely promoted by the immobilisation of TFSI-, probably at the N-H sites as discussed above. More broadly, this suggests that MOFs containing N-H functional groups may generally favour cation-driven charge storage when used with fluorinated anions. In the present work, this mechanism manifests as pure co-ion expulsion of Na+ at positive voltage and pure counter-ion adsorption of Na+ at negative voltage, as sketched in Fig. 4.

Fig. 4: Schematic representation of the charging and discharging behaviour of Ni3(HITP)2 MOF electrodes with aqueous 1 M NaTFSI electrolyte.
figure 4

The schematic highlights immobilised TFSI- ions near the pore walls, even in the absence of an applied external cell voltage, likely due to hydrogen bond interactions between the fluorine atoms (yellow-green) of TFSI- and the NH groups (blue and light grey) of the MOF linker. Charge balancing is cation-dominated, with co-ion expulsion of Na+ at positive cell voltage and counter-ion adsorption of Na+ at negative cell voltage. The dashed circles in the pore at 0 V indicate the pore diameter (1.39 nm) and the boundary of the TFSI--rich layer (0.9 nm) from the form factor.

To better understand the mechanisms of Na+-driven electric double-layer formation with immobilised TFSI-, changes in the scattering signal at applied voltages were examined in detail. Figure 3d) illustrates the relative changes of scattering intensity at low-q values (second panel from top) and the evolution of in-plane peak intensities for selected Bragg peaks (panels 3–7 from top) as the cell voltage (top panel) is varied. Interestingly, clear systematic variations are observed in the MOF-related intensities with the applied voltage, while the intensity of the PTFE-binder peak, shown in the bottom panel of Fig. 3d) and the right inset of Fig. 3a), remains perfectly constant across applied cell voltages. Since this peak is neither related to the MOF nor the electrolyte, it serves as an internal reference, confirming that the observed small intensity changes are highly reliable.

Most interestingly, the intensity response to changes in applied cell voltage is consistent between cyclic voltammetry (CV) with gradual cell voltage increases and chronoamperometry (CA) with sudden cell voltage jumps, suggesting no mechanistic difference between slow charging and rapid cell voltage changes in this system42,43. The absence of any delay in the scattering response following cell voltage variation and the same levels of peak intensity changes reached in CV’s and in CA’s indicates that charge balancing and ion rearrangement occur very rapidly, as would be expected if only the highly mobile Na+ ions in the aqueous electrolyte contribute to charge balance through electric double-layer formation44,45. These finding highlight the fascinating potential for systems with cation driven charge balancing to maintain high performance even at fast charging rates, addressing a key challenge in the development of MOF-based supercapacitors46.

Reference 27 used in situ Small-Angle Neutron Scattering (SANS) to study a similar Ni3(HITP)2 MOF electrode with NaOTf/dimethylformamide (DMF) electrolyte in a supercapacitor set-up, observing small changes at low q, which they interpreted as ions adsorbing onto the outer surface of the MOF particles. Similarly, we observe systematic changes in scattering intensity at low-q as the voltage is varied (second panel in Fig. 3d). However, we do not discuss this effect further here, as the outer surface of the MOF particles is estimated to contribute less than 10% to the total surface area (Supporting Information Supplementary Fig. S10 and Supplementary Note S6). Given this small contribution from the outer surface compared to the inner surface of the pores, we focus here on the in-pore changes, where we assume the majority of charge balancing to take place. We note, however, that the comparison between outer-surface charge balancing, reflected in the low-q intensity changes (second panel in Fig. 3d), and in-pore charge balancing, indicated by the Bragg peak intensity variations (other panels in Fig. 3d), suggests no dynamic differences, including ion transport, between the charge balancing mechanisms at the outer surface of MOF particles and those occurring within the pores.

There are some additional interesting details in the systematic intensity changes of the different peaks. Some of the peaks increase at positive and decrease at negative cell voltage (e.g., 300 and 220), others show exactly the opposite behaviour (e.g., 200, 210). Unfortunately, in this case our simple form factor model fails when trying to quantify this behaviour as it lacks the required sensitivity. The observed intensity changes of in-plane pore peaks, as shown in Fig. 3d), can tentatively be attributed to a combination of effects, including distortions in the unit cell (discussed later) and changes in the form factor resulting from (slight) variations in the electron density within pores as Na+ adsorbs and desorbs, introducing an additional step in the radial electron density profile. With the Na+ ion being very small, however, the electron density should only change slightly as Na+ adsorbs and desorbs. The precise Na+ adsorption sites within the pore space can therefore not be unambiguously determined through a form factor fitting of a multi-step cylinder. Alternatively, the Na+ ions may be strongly associated with specific adsorption sites which may effectively change the structure factor of the MOF. Although interesting by itself, we abstain however from further attempts to quantify this behaviour since it is beyond the scope of this work.

In situ structural changes of Ni3(HITP)2 electrodes

With the detailed mechanisms of charge balancing established, we finally turn our attention to the structural changes in the MOF electrode. Both the interlayer spacing and the pore centre-to-centre distance exhibited small, yet systematic, contraction and expansion of approximately 0.1% as the electrode polarisation is varied (Fig. 5). The slight ‘breathing’ observed in the MOF aligns with adsorption-induced pore swelling, as was also reported from ion electrosorption in carbon-based electrodes47. Assuming that Na+ is the only ion contributing to the charge balance, the observed expansion upon negative polarisation (counter-ion adsorption) and contraction upon positive polarization (co-ion expulsion) is therefore consistent with the overall finding for the in-plane peak shifts (Fig. 5a). Contrary to the in-plane strain, however, the layer spacing c increases independently of the polarity of the applied cell voltage, showing expansion at both positive and negative cell voltages, though less pronounced at negative cell voltage (Fig. 5b). The origin of this auxetic-like out-of-plane expansion remains unclear. However, since potential Na+ intercalation between layers would result in a much larger increase of layer spacing c, intercalation or other major structural changes upon charging and discharging can be ruled out. This is also consistent with the absence of an intercalation signature in the cyclic voltammogram in Fig. 3c).

Fig. 5: Structural changes of Ni3(HITP)2 electrodes during operation.
figure 5

Evolution of the (a) in-plane lattice parameter a and (b) layer spacing c and the associated strain as a function of applied cell voltage (black thin line). The light colour line in the background shows the measured data, while the thicker darker line represents a smoothed moving point average over 8 data points. The zoomed in section on the bottom left of each plot shows the first 50 min for a more detailed view of the CVs. Corresponding plots for the counter electrode, under reversed polarity, are provided in SI Supplementary Fig. S11.

Notably, after holding at − 0.4 V for 1 h, both the in-plane lattice parameter, a, and the layer spacing, c, exhibit a slight, seemingly irreversible increase. The counter electrode in this symmetric set-up, subjected to the opposite polarity, showed similar non-reversible increases in in-plane lattice parameter and layer spacing already after the initial long-term exposure to negative cell voltage (see SI Supplementary Fig. S11). These findings suggest that while for charge balancing the changes in intensity seem fully reversible and are independent of the polarity of the applied voltage (Fig. 3d)), there are slight irreversible changes after applying a negative bias over prolonged periods of time. We hypothesise that these effects may be associated with degradation in electrochemical performance, potentially impacting the structural integrity and cycling stability of the MOF, which still poses a significant challenge for MOF based devices46. However, a detailed investigation of these processes is beyond the scope of the current work.

Summary

This study provides a detailed mechanistic understanding of charge storage in a Ni3(HITP)2 MOF-based supercapacitor, using in situ Small-Angle X-ray Scattering (SAXS). The MOF serves as a chemically well-defined, structurally ordered model system, allowing us to isolate and study a fundamental local charge balancing mechanism that would otherwise obscured in conventional porous carbons.

We summarise the key electrochemical insights revealed by this model system as follows: Even without applied voltage, fluorinated anions such as TFSI- become adsorbed at the pore walls through specific fluorine-mediated interactions with the N-H moiety of the MOF linker. These fluorinated anions remain immobilised during subsequent charging and discharging, resulting in a charge balancing mechanism that occurs exclusively through mobile cations via co-ion expulsion at positive, and counter-ion adsorption at negative cell polarization. No evidence of ion intercalation between Ni3(HITP)2 sheets is observed. Notably, no mechanistic differences are observed between voltage steps and gradual voltage ramps. Charge balancing proceeds on comparable timescales on both the internal pore walls, which provide a significantly larger surface area, and the outer surface of larger MOF particles. Structurally, both the in-plane layer spacing and layer distance exhibit small reversible changes of around 0.1 % due to adsorption induced swelling or contraction. After holding at negative cell voltage of − 0.4 V for 1 h, a minimal irreversible change is noted.

This work provides fundamental insights into the charge-balancing mechanisms of Ni3(HITP)2-based supercapacitors, and establishes a powerful experimental platform to investigate the relationship between electrode structure, functional groups, and charge storage behaviour. In particular, it highlights how specific anion anchoring, such as fluorinated anions immobilised via functional groups, can drive cation-dominated charging. Future investigations could aim at a better understanding of the underlying mechanisms of electrode degradation during extended cycling or at higher operating voltages, as well as the precise origins of electrode swelling. Finally, this study underscores the value of MOFs as a chemically and structurally well-defined model system for exploring fundamental processes in energy storage, with relevance for the rational design and optimisation of supercapacitors (e.g., activated carbons with specifically tailored surface functionalities) more broadly, beyond the specific performance of MOF-based systems.

Methods

Materials

The investigated electrolyte salts - NaTFSI (97 %), KTFSI (97 %), Na2SO4 (≥ 99.0 %, anhydrous) and RbBr (99.6 % trace metal basis) - were acquired from Sigma Aldrich. Electrolyte solutions were prepared by dissolving the appropriate amount of each salt in Milli-Q lab-grade H2O to achieve concentrations of 1 M or 0.1 M. For the MOF synthesis, NiCl2・6H2O and ethanol were acquired from Sigma Aldrich, aqueous ammonia (NH4OH, 35 % NH3) from Fisher Scientific, and 2,3,6,7,10,11-hexaiminotriphenylene hydrate (H6HITP・xH2O) from Chemextensions. All were used without further modification.

Synthesis of Ni3(HITP)2 and electrode preparation

The MOF was synthesised following the protocol described in ref. 19 without further modification. 323 mg of NiCl2·6H2O (1.36 mmol, 1.5 eq) dissolved in water (20 mL) was added to 487 mg (0.91 mmol, 1 eq) of HATP·6HCl suspended in water 140 mL. Concentrated aqueous ammonia (18 M, 4.5 mL) was added to this reaction mixture. The stirred mixture was heated at 60 °C for 2 h with air bubbling through a needle. The crude Ni3(HITP)2 precipitate was isolated by centrifugation and washed with deionised water and ethanol. The solid product was dried on a Schlenk line at 85 °C for a minimum of 48 h.

Freestanding electrodes were prepared from the synthesised MOF powder and PTFE binder (60 wt.% solution in water, Sigma-Aldrich) following the protocol described in ref. 20 without the addition of carbon black or other additives. The MOF and PTFE binder were mixed in a 95:5 mass ratio using a mortar and pestle, with the addition of lab-grade ethanol, at room temperature and under ambient air atmosphere. The MOF-PTFE slurry was rolled into sheets with a thickness of 200 ± 10 µm using an electric rolling press equipped with micrometre screws. The calendaring sequence progressed through 1 mm, 900 µm, 800 µm, 700 µm, 600 µm, 500 µm, 400 µm, 300 µm, 250 µm, and finally 200 µm, with a 90° rotation between each thickness reduction to minimise any possible preferred orientation or texture of particles. The sheets were dried under vacuum at room temperature. To ensure removal of residual ethanol and moisture, the dried electrode sheets were further heated in a vacuum tube furnace at 105 °C for at least 24 h prior to in situ measurements. Electrode discs were cut from the freestanding sheets using stainless steel punches and assembled into the in situ cell immediately prior to each experiment.

X-Ray scattering

High-resolution total X-ray scattering data shown in Fig. 1b of the dry Ni₃(HITP)₂ MOF were collected at the European Synchrotron Radiation Facility (ESRF) at the ID22 beamline (Grenoble, France)48. The electrode material was loaded into a quartz capillary and measured using a 13-channel Si(111) multi-analyser stage while rotating the sample. The X-ray beam was 1 × 1 mm in size, with an exposure time of 120 s and a photon energy of 29 keV. To prevent beam-induced sample damage, the sample was translated by 1.1 mm between exposures, ensuring fresh material was exposed to the beam. A total of 22 scans were combined to obtain the final dataset. Lower resolution SAXS/WAXS measurements shown in Fig. 2 of the dry and water/electrolyte wetted MOF spanning a large q-range between 2.5–250 nm-1 were also performed at ESRF (ID22 beamline) using a 2D flat-panel PerkinElmer XRD 1611CP3 detector and a photon energy of 60 keV. A beam size of 1 mm × 1 mm was used, with an exposure time of 5 seconds.

High-resolution operando SAXS experiments of the electrolyte-wetted EDLCs at different electrical cell voltages, as shown in Fig. 3, were conducted at the Austrian SAXS beamline at ELETTRA Sincrotrone Trieste (Italy)49. This was done using a custom-built operando electrochemical cell, designed to enable simultaneous small- and wide-angle X-ray scattering (SAXS/WAXS) experiments. This cell, adapted from a design previously used and described in ref. 22, features slit shaped Kapton foil windows (SI Supplementary Fig. S12), allowing X-rays in transmission geometry to scan the electrode area. Circular electrodes (14 mm diameter) with off-centre 3 mm holes were punched from the electrode sheets and stacked in the cell with a glass fibre separator (40 mm diameter, 200 µm thickness, Whatman GF/A). The off-centre holes were arranged not to be congruent, enabling X-rays to independently penetrate each electrode, allowing data collection for both electrodes individually (SI Supplementary Fig. S12). Platinum paper (< 200 nm thickness) was used as a current collector covering the entire electrode area. The total electrode mass (including 5 wt.% PTFE binder) was 20.8 mg for both electrodes combined. A total volume of 400 µl of 1 M NaTFSI (aq.) electrolyte was added before sealing the cell, which was then allowed to soak for 2 h prior to measurement. The cell was assembled at room temperature in ambient atmosphere. After soaking, but before data collection, the electrochemical cell was conditioned by five cycles of cyclic voltammetry (CV) between ± 0.4 V at a scan rate of 10 mV/s. All voltage sequences were applied using a Gamry Interface 1010B potentiostat. All measurements were carried at ambient temperature (~ 20 °C) without climate regulation.

The X-ray beam with a photon energy of 16 keV was focused to a size of 0.5 mm × 2 mm. Data were collected using a Pilatus3 1 M 2D detector (Dectris Ltd., Baden-Dättwil, Switzerland). Exposure time for each SAXS measurement was 20 s, and the sample was moved between two positions to alternately measure the two electrodes individually.

Replicate measurements of the operando experiments were performed at a second facility, P62 at Deutsches Elektronen Synchrotron DESY, Hamburg Germany, to verify reproducibility; data from those measurements are consistent with the results presented here.

All 2D scattering patterns were azimuthally integrated to obtain 1D scattering profiles, showing the intensity versus the length of the scattering vector (\(q=4\pi \sin \theta /\lambda\), \(2\theta\) being the scattering angle and \(\lambda\) the wavelength). Standard data normalisation and correction procedures at the respective beamline include corrections for primary beam intensity changes, sample transmission, and exposure time.

Data treatment

Diffraction peaks in the scattering profiles were fitted using a custom-written script for Python 3 using a Pseudo-Voigt peak shape and a decaying exponential background50. The in-plane lattice parameter describes the pore-centre to pore-centre distance and was calculated according to Eq. 1:

$$a=\frac{4\pi }{{q}_{{hk}0}\sqrt{3}} * \sqrt{{h}^{2}+{k}^{2}+{hk}}$$
(Eq. 1)

Where qhk0 describes the q-position of the in-plane diffraction peak with Miller Indices hk(l = 0). The layer spacing c was calculated from the (002) stacking peak position as in Eq. 2:

$$c=\frac{2\pi }{{q}_{002}}$$
(Eq. 2)

The strain for the lattice parameter a and the layer spacing c was calculated according to Eq. 3:

$${strain}=\frac{l-{l}_{0}}{{l}_{0}}$$
(Eq. 3)

With l, l0 being the actual and the reference values for the in-plane lattice parameter a or the layer spacing c, respectively.

The total scattering intensity I(q) for infinitively long cylinders arranged on a 2D hexagonal lattice can be written as in Eq. 4:

$$I\left(q\right)=K * S\left(q\right) * |F\left(q\right)|^{2}$$
(Eq. 4)

where K is a constant factor, S(q) is the spherically averaged structure-factor described by sharp diffraction peaks at discrete q-values \({q}_{{hk}0}\) defined in Eq. 1, and |F(q)|2 describes the form factor33. According to Eq. 4, the height of each Bragg peak hk0 from the pore lattice is determined by the respective value of \({{|F}\left({q}_{{hk}0}\right)|}^{2}\). The form factor for infinitely long monodisperse cylindrical pores |F(q)cyl.|2 was used here, following the approach first introduced in ref. 38 and adapted by ref. 33 for multistep core-shell cylinders, in which the scattering amplitude F(q) is given by:

$$F(q)=\frac{{\varSigma }_{i=1}^{N}({\rho }_{i}-{\rho }_{i-1}){R}_{i}^{2}Z(q{R}_{i})}{{\varSigma }_{i=1}^{N}({\rho }_{i}-{\rho }_{i-1}){R}_{i}^{2}}$$
(Eq. 5)

Z(qRi) is given by 2J1(qi)/(qRi) with J1 being the Bessel function of the first kind and first order, and ρi and Ri are the electron density and radius of the i-th cylindrical shell, starting from the outermost shell. The integrated intensities of Bragg peaks in the experimental data were analysed with a GUI-based interface, as introduced in ref. 37.

The specific capacitance of the symmetrical two-electrode supercapacitor cell was calculated from cyclic voltammetry according to Eq. 5:

$$C=\frac{4 * {\int }_{t1}^{t2}I\left(t\right){dt}}{\Delta U * {m}_{{total}}}$$
(Eq. 6)

With I(t) describing the current, ΔU the voltage window, and mtotal the combined total mass of both electrodes (including 5 wt.% PTFE binder).