Abstract
Ions play a fundamental role in solid-liquid interface processes, whether as essential or undesirable components, highlighting the need for precise and quantitative real-time monitoring. Electrochemical sensors are identified as promising tools, particularly for field-deployable applications. However, conventional electrochemical sensing is inherently restricted to redox-active species and is often single use, constraining its scope. This study presents electrochemical impedance spectroscopy as an alternative for ion detection, utilizing physico-chemical interactions at the electrode-electrolyte interface. We introduce a first-principles model that describes the interfacial impedance behavior and shows how ion specific processes shape the impedance response. Based on this framework, an extensive dataset is compiled, and a machine learning model is trained to predict electrolyte composition with consistent accuracy, demonstrating detection limits at the parts-per-billion level. The findings indicate that this method has considerable potential as a real-time method for ion sensing, providing a perspective on selectivity and sensitivity beyond traditional electrochemical approaches. This work could serve as a foundation for advanced models of impedance behavior, and development of impedance-based sensors with applicability in complex environments, including biological fluids and industrial liquids.
Similar content being viewed by others
Introduction
Real-time monitoring of chemical changes in solutions is a crucial aspect for addressing pressing challenges in diverse fields1. Applications such as detecting contaminants in water, analyzing biomarkers in biological fluids, and ensuring the accuracy of processes as well as the safety of consumables require analytical techniques that are not only accurate and sensitive but rapid, cost-effective, and non-invasive2,3,4. Electrochemical sensors have emerged as promising candidates due to their affordability, simplicity, and suitability for miniaturization5,6. However, conventional amperometric-potentiometric electrochemical sensors primarily depend on redox reactions, making them unsuitable for substances that do not undergo redox processes. Additionally, these sensors involve electron transfer mechanisms that degrade the electrode surface over time, reducing their reusability and shortening their operational lifespan7. Moreover, these sensors carry the risk of altering the solution composition during measurements8,9. However, alternating current (AC) techniques, like electrochemical impedance spectroscopy (EIS), offer deeper insights into electrode-electrolyte interface dynamics. Under small-amplitude conditions that preserve linearity, EIS can probe the interfacial structure with minimal and reversible perturbation. This allows for the characterization and quantification of electrolyte composition while mitigating the possible irreversible compositional changes and limitations often associated with direct current (DC) methods10.
When a solid electrode contacts an electrolyte, an interface known as the electric double layer (EDL), a structured arrangement of ions, counter-ions, and solvent molecules forms11. The structure of the EDL depends on properties of both the electrode, such as roughness and work function, and the electrolyte, including composition and concentration12,13,14,15. While significant progress has been made in characterizing the EDL under non-faradaic conditions (i.e., in the absence of any redox reaction), its microscopic structure and its correlation with frequency domain electrochemical signals is not fully understood11,16.
In recent studies, EIS has been increasingly explored for ion detection17. Many of these investigations have employed simplified metrics such as solution conductivity18,19,20 or EDL capacitance17. To enhance selectivity, strategies involving ion-selective membranes20 or surface functionalization21,22,23, have been adopted. While these methods can enhance sensing, they also introduce additional complexity and reduce sensor durability. Some approaches also integrate complementary techniques or rely on external calibration to aid in interpreting EIS data18,19,24,25. Recent advancements have begun to explore the use of full-spectrum impedance data in membrane-free systems, signaling progress toward more comprehensive sensing strategies. However, there remains significant potential to further exploit the frequency-dependent characteristics of impedance for richer interpretation of the electrode-electrolyte interface.
EIS provides rich, multidimensional insights into interfacial processes26 enabling the assessment of the electrolyte composition on the EDL. While it does not directly identify chemical species, it contains information on how physicochemical properties, such as ionic mobility, permittivity, and interfacial structure, affect the system’s electrical response27. It is highly convoluted by the complex, coupled EDL responses of the multiple components in the electrified interface. Therefore, the accurate interpretation of EIS data hinges on a comprehensive understanding of the EDL under AC conditions28. Traditional methodologies, which often rely on empirical fitting models such as equivalent electrical circuits10,29, fall short of capturing the actual physical and chemical phenomena occurring at the interface30,31. This lack of knowledge hampers the full exploitation of EIS as a versatile tool for electrochemical analysis and raises concerns about the reliability of its data interpretations, as observed responses often appear without a solid theoretical basis.
To address this gap, a comprehensive theoretical framework for EIS must simultaneously capture the static properties of the electrode-electrolyte interface-such as EDL capacitance-and dynamic behavior, including non-ideal impedance phenomena such as constant phase element (CPE)32. Establishing clear connections between these static and dynamic aspects is essential to unravel the intricate relationships between the structural characteristics of the interface and the impedance responses. In this work, we aim to provide such a framework by developing a continuum-based model that integrates fundamental ion properties-such as ion size, mobility, and adsorption-into a unified description of the electrode-electrolyte interface, allowing explicit linkage of structural interfacial changes induced by electrolyte composition to observed impedance behavior.
Results and discussion
Physico-chemical processes at the EDL
Our model is built on the collective behavior of the electrode-electrolyte interface, where ions, counterions, and solvent molecules organize under the influence of electrostatic forces, ion-surface interactions, solvation effects, and thermal motion. Although the exact structure of the EDL remains elusive, computational modeling and experimental analysis14,16,33,34,35 provide critical insights. Despite its complexity, a well-designed continuum model can capture key EDL electrochemical properties35. To understand its impedance response, we first examine the fundamental interfacial processes that govern charge dynamics. Figure 1 presents the modified Gouy-Chapman-Stern (GCS) model, refined as the basis for this study.
a Graphical illustration of the developed model exhibiting the electrode/electrolyte interface under cathodic (left) and anodic (right) potentials. The blue and red curves represent cation and anion concentration profile, respectively, in relation to the (Volta) potential (indicated by the color bar at the top). The background shading reflects the relative permittivity distribution, with corresponding values shown in the color bar. Spheres denote atom types as follows: cations (blue), anions (dark orange), water molecules (red oxygen with two white hydrogens), and electrode atoms (yellow). The cation and anion spheres represent generic ions and are not assigned to specific species. The electrode-electrolyte interface is modeled as a series connection of locally parallel RC elements, each representing a thin layer normal to the electrode surface. This one-dimensional arrangement assumes lateral homogeneity and uniform current distribution across the electrode, valid for flat, small-area electrodes. The spatial profile of each layer’s resistance and capacitance reflects local ion mobility and permittivity, respectively. b Differential capacitance and surface charge density predicted by the developed model - model parameter values are listed in supplementary table S3. c Profiles of permittivity and conductivity at different (Volta) potentials, demonstrating spatial variations at the interface - model parameter values are summarized in the supplementary table S3.
At the electrode surface, the electrostatic potential induces ion accumulation at the interface, forming a depleted region near the electrode known as the Helmholtz (Stern) layer. As illustrated in Fig. 1a, the thickness of this layer is potential-dependent, governed by the competition between electrostatic attraction and hydration effects16. A higher (Volta) potential enhances electrostatic forces, drawing ions closer to the surface while necessitating partial or complete dehydration of their hydration shells. Anions, which exhibit a greater propensity for surface adsorption, undergo significant dehydration under strong electric fields, whereas cations experience only partial suppression of their hydration shells16. This results in a generally thinner Helmholtz layer for anions-determined by their intrinsic ionic radii-compared to cations, whose effective size is dictated by their hydrated radii (more information is provided in the Supplementary Information section S1.2). Additionally, water molecules within the Helmholtz layer align under the influence of the intense local electric field (1–10 V nm−1)33, leading to permittivity saturation in this region (more information is provided in SI section S1.1). The relative permittivity reaches its minimum within the Stern layer. As the distance from the electrode increases, the electric field weakens, leading to a gradual rise in permittivity toward the bulk electrolyte33,36.
Beyond the Helmholtz layer, the interface transitions into a compact layer where ion concentration reaches a maximum, \({C}_{\max }\), constrained by steric effects and determined by the hydration radii of the ions (more information is provided in SI section S1). In this region, the permittivity increases as the electric field weakens, following a trend similar to that of the Helmholtz layer. After the compact layer, a diffuse layer extends into the electrolyte, where ion concentration progressively decreases toward the bulk solution. In these interfacial regions, the electric field declines sharply, and the solvent permittivity recovers to its unsaturated bulk value. Moving away from the interfacial region, the bulk electrolyte is present, where ion concentrations stabilize at their bulk equilibrium value, c0.
Figure 1b illustrates the simulated differential capacitance and surface charge density as functions of the electrode potential. The model successfully reproduces the characteristic camel-shaped differential capacitance curve observed in dilute electrolytes37,38,39. At low (Volta) potentials, capacitance increases as the electric field enhances ion accumulation near the electrode. As the (Volta) potential rises further, the capacitance reaches a peak before declining, forming the characteristic hump of the camel curve. This behavior arises from the saturation of ion density near the electrode and the associated reduction in the local dielectric constant. Notably, the hump at positive (Volta) potentials is more pronounced than at negative (Volta) potentials, as anions can approach the electrode more closely than cations due to differences in hydration properties.
Building on the ability of the refined GCS model in capturing the steady-state structure of the EDL, we extended our analysis to simulate its impedance response. EIS is performed by introducing a small-amplitude AC perturbation around the steady-state condition, ensuring that the system remains within the linear regime and that the perturbation does not significantly alter the interfacial structure40. Under these conditions, the electrochemical impedance, ZEDL, can be formulated as a one-dimensional series of discrete layers normal to the electrode surface. Each layer contributes to the total impedance through ionic conduction (resistive behavior) and/or displacement conduction (capacitive behavior), represented as a local parallel resistor-capacitor (RC) element. This approach assumes lateral homogeneity and uniform current distribution across the electrode surface, which is justified for small, flat electrodes where spatial heterogeneity is minimal41.
The specific capacitance and ionic conductivity of each interfacial layer are determined by its relative permittivity and ion mobility, respectively. The permittivity values are obtained from the steady-state model, while conductivity depends on both ionic concentration and mobility within each region42,43. As shown in the steady-state modeling, ion concentration varies significantly across the interface. In regions of high ionic concentration, the intense local electric field and reduced intermolecular spacing limit the availability of free ions for conduction, as short-range interactions become dominant44. Furthermore, ion mobility decreases due to ion-ion collisions and other short-range interactions45, leading to a sharp increase in resistance and a decline in conductivity as the concentration rises (see SI section S2.1 for details). Figure 1c presents the simulated ionic conductivity and relative permittivity profiles under different (Volta) potentials. At high (Volta) potentials, permittivity saturation occurs due to the strong electric field, while ionic conductivity drops to zero in the Helmholtz and compact layers, reflecting the absence of mobile ions. At lower (Volta) potentials, neither ionic concentration nor permittivity reaches saturation, aligning with the expected physico-chemical behavior at the interface.
Impedance non-ideality: a revised insight into the origin of the CPE
The elctrode/electrolyte interface often exhibits non-ideal capacitive behavior at low frequencies, commonly described by a constant phase element (CPE)32. Despite its ubiquitous presence in electrochemical systems, the fundamental origin of CPE behavior remains a subject of debate. Conventional explanations typically attribute capacitance dispersion to non-uniform current distribution caused by surface roughness, or to spatial variations in interfacial resistance and capacitance arising from surface heterogeneities-including differences in crystallographic orientation, defects, porosity, and even the cell configuration46,47,48. While these factors may contribute to time-constant dispersion, their influence predominantly manifests at higher frequencies, which does not fully account for the observed CPE behavior. Similarly, spatial variations in charge-transfer kinetics across the electrode surface provide only a minor contribution to impedance dispersion32.
To address this discrepancy, our model attributes CPE behavior to the non-uniform distribution of resistance and capacitance resulting from the formation of compact and diffusion layers that extend into the bulk electrolyte - contrasting with conventional surface-based interpretations. It has been demonstrated that under certain conditions, a distribution of time constants arises as a direct consequence of coupled spatial variations in conductivity and permittivity, leading to non-ideal CPE behavior49,50 in a certain range of frequencies. Note that we excluded ion-surface and ion-solvent interactions governing the distribution of relative permittivity to avoid unnecessary complexity. Although the distribution of resistance and capacitance across the interface may not be the sole cause of CPE behavior, it explains the presence of CPE, even in the case of atomically flat blocking electrodes within the double-layer potential window.
Figure 2a illustrates the characteristic frequency (\({f}_{c}=\frac{1}{\tau }=\frac{1}{RC}\)) as a function of distance from the electrode at various (Volta) potentials. At the electrode surface, fc is initially zero, indicating purely capacitive behavior in the absence of free ions within the Helmholtz layer. Notably, within this region, the relative permittivity is at its lowest due to the highly ordered alignment of water molecules under the intense local electric field. As the system transitions into the compact layer, fc remains near zero, as ion conduction is still negligible due to the scarcity of free ions. In this layer, the relative permittivity gradually increases as the electric field weakens across the Helmholtz and compact layers. Upon reaching the diffusion layer, fc begins to rise due to the increasing presence of mobile ions, peaking in the megahertz range where ionic conduction is most pronounced. Therefore, a CPE behavior can be expected across the frequency range from zero to megahertz due to the coupled distribution of conductivity and permittivity in the compact and diffusion layers. Beyond this peak, fc decreases as ion concentration declines, reducing the number of charge carriers available for conduction. In the bulk electrolyte, fc stabilizes at a value dictated by the ionic conductivity of the electrolyte and the bulk permittivity of the solvent. At frequencies beyond this point, EIS ceases to provide information on interfacial ion dynamics, as the impedance response becomes predominantly governed by the intrinsic dielectric properties of the solvent-water in this case. At low potentials relative to the point of zero charge (PZC), the characteristic distribution of time constants in low frequency is absent. CPE behavior becomes evident only when the (Volta) potential surpasses a critical threshold, leading to the formation of a compact layer.
a Profile of fc at the interface for various potentials, showing a distribution ranging from near zero to the megahertz range, attributed to the formation of a compact layer at high potentials. model parameter values are summarized in the supplementary table S3. b Nyquist plot of interface impedance, highlighting CPE behavior at low frequencies; The main plot is displayed with a 10:1 y-to-x axis ratio to emphasize CPE changes, while the inset shows the same plot in an ortho-normed, square format. The color legend is the same as in panel (a) model parameter values are summarized in the supplementary table S3. c Profile of CPE exponent as a function of electrode potential, illustrating potential-dependent CPE behavior compared to experimental CPE exponent for Au/10 mM NaF solution. d Comparison of CPE exponent for different ionic hydration shell sizes, as predicted by the developed model, alongside experimental results for Pt/10mM zinc, cadmium, and lead solution.
Figure 2b presents the impedance response calculated using our model across different (Volta) potentials. Near the PZC, CPE behavior is not observed, as neither permittivity nor conductivity exhibits saturation. However, as the potential increases and ion concentration reaches levels where conductivity becomes maximized, the onset of CPE behavior occurs. Figure 2c further illustrates the effect of electrode potential on the CPE parameter. Around the PZC, the system behaves as an ideal capacitor, but as the (Volta) potential increases, the deviation from ideal capacitive behavior grows, leading to a more pronounced CPE response. At sufficiently high potentials, the non-uniformity in conductivity extends further from the electrode due to the thickening of the compact layer, while permittivity saturation remains confined to this region (Fig. 1c). As a result, the spatial separation between the regions of conductivity and permittivity non-uniformity increases, gradually restoring a more ideal capacitive behavior.
The distinctive nature of the CPE lies in its correlation with the formation of the compact layer and the mobility saturation effect caused by the finite size of ions. Figure 2d presents the predicted CPE exponents as a function of the hydration shell radius of cations. The model predicts that larger hydration shell sizes lead to greater deviations from ideal capacitive behavior, as increased ion size enhances spatial heterogeneity in both conductivity and permittivity, reinforcing the CPE effect. This trend is consistent with experimental observations illustrated in the same figure. It can be seen that the non-ideality for lead ions is more pronounced than for cadmium, which, in turn, has a larger hydration shell radius than zinc.
Frequency-dependent behavior of the EDL: influence of the ion-specific fingerprint
As discussed earlier, the structure of the EDL is strongly influenced by the intrinsic properties of ions. While some properties primarily affect the steady-state behavior of the EDL, many others-such as ion mobility-related parameters-manifest predominantly in AC impedance characteristics.
The general behavior of electrochemical impedance exhibits non-ideal capacitive characteristics at low frequencies and resistive behavior at high frequencies27. At low frequencies, the capacitive response arises from the high time constants of the Helmholtz and compact layers, followed by a decreasing time constant in the diffusion layer. This results in a high CPE impedance at low frequencies51. In this regime, the impedance contribution of layers with lower time constants is overshadowed by the dominant effect of the Helmholtz and compact layers, making their influence negligible in the total impedance. On the other hand, at high frequencies, the oscillation period becomes much shorter than the interfacial time constants, causing the interface to behave as a short circuit. As a result, its impedance becomes negligible compared to the bulk electrolyte resistance, which dominates the total impedance, leading to the observed resistive behavior at high frequencies27.
Our model predicts that in the transition region between low and high frequencies, the diffusion layer time constant falls within a range where the distribution of time constants significantly influences the impedance transition. This intermediate frequency range marks the gradual shift from capacitive to resistive behavior, governed by the interplay between interfacial ion dynamics. The nature of this transition is highly dependent on ion properties such as ionic radius, hydration shell radii, and mobility, which dictate how ions respond to the applied AC perturbation.
Figure 3a, b model the impact of the mobility saturation (B) relative to its reference value on the impedance response for ions of the same hydration shell size. While this parameter is closely related to ion size, it is also affected by ion-solvent and ion-ion interactions. By varying this parameter, the steady-state properties remain unchanged, as the collision parameter influences only the dynamic impedance behavior. Therefore, at low frequencies, the impedance response is unaffected by, as this regime primarily reflects the properties of the Helmholtz and compact layers. However, the effect of it becomes evident during the transition from capacitive to resistive behavior, where it influences the time constants in the diffusion region. In the high-frequency regime, again mobility saturation has no impact on the resistive part of the impedance, as this region is dominated by bulk properties.
a Bode magnitude plot and (b) phase plot from the model, showing the effect of the mobility-saturation (collision) parameter on interfacial impedance. Here, “ΔB/B” denotes the fractional change in the mobility-saturation parameter B relative to its reference value B0, defined as ΔB/B = (B − B0)/B0. Variations in this parameter primarily affect the transition region between the capacitive response of the EDL and the resistive response of the bulk electrolyte. c Bode magnitude plot and (d) phase plot of experimental impedance spectra for 10 mM zinc, cadmium, and lead nitrate solutions, exhibiting trends consistent with the model predictions.
Experimental results for Pb(NO3)2, Cd(NO3)2 and Zn(NO3)2, provided in Figure 3c, d support these findings. Despite their close ionic radii, lead, zinc, and cadmium exhibit distinct impedance behaviors. This difference cannot be attributed to mobility (μ) alone, as the bulk layer impedance (high-frequency regime) is identical for the ions. Additionally, it is not due to ion adsorption or ion-electrode interactions, since the low-frequency impedance (Helmholtz and compact layers) is also similar.
The consistent trend observed for different ions at the transition frequency, both in modeling and experiments, indicates that factors beyond size and basic mobility play a crucial role in shaping the overall impedance response. Variations in ion-solvent interactions, along with differences in how ions engage with the solvent and other ions in solution, directly impact effective mobility. These interactions profoundly influence impedance behavior, particularly in the transition region. While ion-dependent behavior is not entirely unique to each individual ion, the evidence clearly demonstrates that the “ion-specific fingerprint" significantly dictates the interfacial response in the frequency domain. This underscores the capability of impedance response in distinguishing ion types and concentrations with high sensitivity.
Machine learning-assisted EIS for ion detection and quantification
Building on our model’s findings, we expect the dynamic interactions of ions to be reflected in their impedance behavior. To investigate this, we selected Zn2+, Cd2+, and Pb2+-ions with the same charge and similar sizes, yet crucial for environmental monitoring. A comprehensive dataset of over 500 EIS measurements was gathered, encompassing a wide range of compositions, counterions, concentrations, and their combinations (more detail can be found in the methods section and SI section S3 and S4).
While our physicochemical model provides mechanistic insight into how ion properties shape the impedance response, extracting compositional information from measured spectra remains complex. This complexity arises because relevant compositional signatures are embedded within the intricate spectral features, particularly in the presence of multiple ions, making direct interpretation difficult. Inspection of the raw impedance spectra reveals that mixed-ion solutions deviate non-linearly from a simple superposition of the corresponding single-ion responses, with the most informative differences concentrated in the transition-frequency regime. These observations motivate a data-driven approach capable of integrating subtle, distributed cues across the entire spectrum. We therefore developed a machine learning (ML)-based framework to resolve ion identity and concentration directly from full-spectrum EIS measurements.
To expose these discriminative features to the model, we implemented a targeted preprocessing pipeline (further details in Supplementary Information, Section S4.2) designed to amplify composition-dependent structure while suppressing nuisance variance. First, a logarithmic mapping of the real and imaginary impedance compresses the several orders of magnitude dynamic range. This step, commonly employed to visualize impedance spectra, renders ion-specific modulations more apparent across frequency. Next, the real and imaginary parts of the spectra were resampled onto a uniform frequency grid and concatenated into a single vector, ensuring strict comparability between measurements (Fig. 4a shows representative spectra for 10 mmol L1 Zn(NO3)2, Pb(NO3)2, and their combination). A variance-stabilizing power transform was then applied to improve feature normality and reduce skewness, effectively sharpening feature separation - particularly in the transition-frequency region where differences between mixed-ion and single-ion spectra are most pronounced (Fig. 4b). Finally, principal component analysis (PCA) was used to concentrate ion-specific variance while attenuating noise; retaining six components preserved 98% of the variance while yielding a compact data representation. Together, these steps increase the signal-to-overlap ratio in the impedance data, enabling the neural network to identify and quantify ions from full-spectrum EIS with high fidelity.
a Representative impedance spectra for 10 mM Zn(NO3)2, Pb(NO3)2, and their mixture, showing that mixed-ion responses deviate non-linearly from a simple superposition of single-ion spectra, with the most discriminative differences concentrated in the transition-frequency regime. b Effect of preprocessing steps-including logarithmic scaling, uniform resampling, variance-stabilizing power transformation-to feature separability, illustrated for same spectra. c Aggregate prediction error distribution and confusion matrices (using 100 pM as the threshold for ion absence) over all folds and random seeds in repeated cross-validation underscoring the model’s robustness against partitioning bias and experimental variability. d Box plots of prediction accuracy vs. concentration, comparing the aggregate of all folds/seeds (repeated cross-validation) with the top-five performing folds. e Box plots of prediction accuracy by ion type, comparing the aggregate of all folds/seeds (repeated cross-validation) with the top-five performing folds. For box plots in (d, e): the center line represents the median, box limits denote upper and lower quartiles and whiskers indicate 1.5 × the interquartile range. f Sensor stability metrics: reusability error (Milli-Q references before/after each sample) remained below 10% and repeatability error (three back-to-back measurements) below 3%, with no detectable degradation after 250 days of operation.
Figure 4c presents the aggregate distribution of prediction errors, together with the confusion matrices for the test datasets aggregated across all folds and random seeds. Around 75% of predictions exhibit errors below 20%, even with pooling results from repeated cross-validations where biased training splits can occur due to the limited dataset size. While part of the error arises from conventional experimental uncertainties-such as minor deviations in electrolyte composition, potentiostat accuracy, and non-ideal chip configurations-the aggregation across folds and seeds represents a stringent evaluation scenario (more details are provided in the Supplementary Information, Section S4). Even under these conditions, the maximum misclassification rate in ion concentration remains below 15% considering 100 pmol L1 as a threshold for ion absence, underscoring the model’s robustness in distinguishing between ion species and its potential for accurate ion detection and quantification.
The model’s predictive performance, evaluated for samples with correctly predicted presence or absence across different concentration ranges, is shown in Fig. 4d. At the 100 nmol L1 level-corresponding to parts-per-billion (ppb) concentrations relevant to heavy metal ion contamination in drinking water and biological fluids-distinguishing between the presence and absence of ions is more challenging (Fig. 4c). Nevertheless, when present, 75% of predictions fall within 30% error, with an average error below 8%. At the 10 μmol L1 level-equivalent to parts-per-million (ppm) concentrations typical of wastewater discharge and industrial effluents-errors increase slightly, with 75% of predictions remaining below 36% and an average of 13%. At the 10 mmol L1 level, presence/absence classification improves markedly (Fig. 4c), but 75% of predictions stay within a 41% error margin, with an average error of 17%. This increase in error at higher concentrations likely reflects the thinning of the EDL at high ionic strengths, where bulk solution properties dominate over interfacial effects, reducing impedance sensitivity to composition. These results highlight both the robustness of the model across five orders of magnitude in concentration and the importance of electrode design in sustaining sensitivity under high-conductivity conditions.
Figure 4e further validates the model’s robustness across different ionic species, showing a consistent error distribution regardless of ion type. In all cases, 75% of errors remain below 26%, with the average error around 8% within correctly classified samples, reaffirming the model’s reliability in distinguishing and quantifying diverse ions with high precision. Consistent with our note that pooling repeated cross-validations can include biased training splits due to limited sample size, the best-5 folds exhibit a similar median error but a substantially compressed upper tail (lower third quartile (Q3) and upper whisker) compared with the all-fold aggregate. This pattern indicates that large errors are primarily driven by unfavorable/imbalanced partitions rather than model instability: when split bias is minimized, errors tighten while the central tendency remains unchanged. We therefore use the all-fold distribution as our conservative performance estimate and view the best-5 as an optimistic bound, demonstrating the model’s intrinsic capacity and robustness.
Beyond capturing ion-specific impedance signatures, our approach offers a key advantage over conventional DC methods-enhanced stability over extended measurement periods. The absence of redox reactions in our AC-based sensor prevents electrode degradation, ensuring consistent results across independent measurements for each sample. This is reflected in the low reusability error (deviation of Milli-Q (MQ) water reference spectra measured before and after each sample), which remained below 10% across the measurement campaign (Fig. 4f). The repeatability error, calculated from three consecutive back-to-back measurements on the same solution, was below 3%, confirming high short-term consistency. Even after 250 days of operation with only routine rinsing in MQ water, no significant degradation or fouling was observed, underscoring the sensor’s durability. This long-term stability makes it suitable for continuous monitoring applications, where reliability and minimal maintenance are essential.
This study extends electrochemical impedance spectroscopy from a largely empirical method to a mechanistically grounded, predictive platform for real-time ion sensing. Through a first-principles continuum model that explicitly links ion-specific physico-chemical properties-such as ionic radius, hydration shell structure, ion mobility (including mobility saturation), and ion-solvent interactions-to frequency-dependent impedance, we identify the key interfacial processes shaping the observed spectra. In particular, variations in the constant phase element and transition frequency arise from differences in interfacial heterogeneity and the distribution of relaxation times, which are governed by ion-specific properties such as hydration shell structure, mobility, and adsorption behavior within the compact and diffuse layers. These coupled mechanisms - especially how ions interact with the solvent and reorganize the EDL - are responsible for the distinct spectral fingerprints observed across ion types and concentrations. Our results show that non-ideal features in EIS, including but not limited to CPE behavior, are intrinsic signatures of interfacial structure and dynamics, not measurement artifacts. Recognizing and modeling these features enable selective, stable, and reproducible ion detection across a wide concentration range. Coupled with AI-assisted interpretation, this approach achieves detection limits down to the ppb range and remains robust over months of operation, making it promising for applications in environmental monitoring, biomedical diagnostics, and industrial process control.
Methods
Model development
The EIS model was developed using a steady-state/perturbation approach. A modified GCS model was derived for electrified electrode-electrolyte interfaces using continuum models based on local free energy functionals. These models account for non-uniform dielectric constants ϵr(ϕ), ion size effects, and variable ion-surface interactions ψ(x).
The GCS model is driven by minimizing the local free energy, expressed as:
Here, x represents the distance from the electrode surface. The first two terms describe the electrostatic interactions created by the electric potential ϕ(x) and the ionic charge density \({\rho }_{{{{\rm{ion}}}}}(x)={\sum }_{i=1}^{p}{c}_{i}(x){z}_{i}\), where zi and ci denote the ion charge and concentration, respectively. The third term captures the interaction of the external potential ψi(x) with the ions, which can simulate repulsive forces (e.g., Helmholtz layer) or attractive forces (e.g., ion-surface interactions).
The fourth term introduces a grand canonical description of the ions by incorporating their chemical potential μi. The final term represents the entropic contribution to the free energy, where s is the entropy density.
By inserting the entropy density from a lattice gas model (more details in SI S1), ion size effects are introduced, with the maximum ion density defined by cmax, determined by the ion’s hydration shell size.
Minimizing the free energy \({{{\mathcal{F}}}}\) with respect to ϕ(x) yields the modified Poisson-Boltzmann equation:
This second-order differential equation is solved numerically for varying electrode potentials. Numerical solutions provide the electric potential, electric field, dielectric constant, and ion distribution as functions of the distance from the electrode. The model’s results depend on the parameters defined in the free energy expression, with detailed parameter information provided in the supplementary table S3.
The differential capacitance can be calculated based on electrode potential and charge density on the surface using the Gauss law as follow:
To simulate the EIS response of the interface, the DC permittivity profile was extracted from the mean-field model, which relates to the electric field strength and solvent molecule alignment at varying distances from the electrode. Using the relative permittivity and ion concentration from the GCS model, impedance was calculated based on displacement and ionic conductivity.
In dilute solutions, the electrolyte solution conductivity is the sum of individual ion conductivities, expressed as:
Here, σ denotes conductivity, m for ion concentration, and μi is the ion mobility. In highly concentrated regions, high electric fields and close ion proximity reduce the number of free ions contributing to conduction. Beside, ion mobility, the average ion speed per unit electric field, results from the balance between external electric field forces and ion movement resistance, including ion-ion, ion-solvent, and solvent-solvent interactions. As electrolyte concentration increases, molecular distances shrink, intensifying short-range interactions and increasing resistance, thus reducing ion mobility. This behavior is captured by the exponential decline in conductivity.
Using the permittivity profile and conductivity from Eqs. (4), an RC model was employed to extract the EIS response. The interface impedance is expressed as:
Complete details on model parameters and functional forms are provided in the supplementary information.
EIS measurement
Experimental EIS measurements were conducted using a custom-designed sensor. The system consisted of a pair of platinum interdigitated electrodes for impedance measurement and a rectangular platinum electrode serving as a pseudo-reference. The pseudo-reference electrode was included solely to monitor the working electrode’s potential, enabling accurate tracking of electrode fouling, contamination, and overall system stability over time. The impedance was strictly measured between the working and counter electrodes. All electrodes were fabricated on a silicon chip with a silicon nitride isolation layer. Platinum was deposited via physical vapor deposition (PVD), resulting in a flat surface with a roughness of approximately 5nm. The interdigitated design increased the effective surface area, and the 10μm spacing between electrode fingers was optimized to minimize bulk impedance contributions. The fabricated chips were cleaned with isopropanol and ultrapure Milli-Q water, dried, and stored in gel boxes at controlled room temperature (21 ± 1 °C). During measurements, if the reusability error exceeded 10%, the chips were re-cleaned by sequential rinsing with Milli-Q water followed by isopropanol.
Electrolytes were prepared by dissolving lead, cadmium, and zinc salts (Pb(NO3)2, Cd(NO3)2, Zn(NO3)2, PbCl2, CdCl2, ZnCl2, CdSO4, and ZnSO4 ≥99%, Sigma-Aldrich) in MQ water, yielding concentrations of 100 nmol L1, 10 μmol L1, and 10 mmol L1. EIS measurements were conducted under open-circuit potential (OCP) conditions using a potentiostatic sinusoidal excitation (10 mV amplitude, 20 points per decade; 171 data points in total), with a VSP300 potentiostat (Bio-Logic) housed within a Faraday cage equipped with a temperature control unit to minimize environmental noise. All experiments were performed at a controlled temperature of (21 ± 1 °C). Prior to each measurement, a 15-minute stabilization period at OCP was employed to ensure steady-state conditions. MQ water EIS responses were recorded before and after each measurement to verify electrode integrity and confirm the absence of contamination or surface modification. Detailed measurement procedures are provided in the Supplementary Information. All EIS measurements reported in this work were performed using a single fabricated chip. This choice was motivated by the demonstrated long-term stability and reusability of the device, which allowed us to carry out all experiments on the same platform.
Electrochemical measurements for CPE behavior as a function of electrode potential were performed using an SP-200 potentiostat (Bio-Logic). A vertical electrochemical cell with a 3.5 cm2 opening area (Redox.me) was employed. The working electrode was confined to a 1 mm2 exposed area, ensuring precise control over the active electrochemical surface. The working electrode consisted of a polycrystalline gold electrode with a (111) orientation (1.1 × 1.1 cm2, Arrandee).Prior to use, the Au electrodes were annealed with a butane flame for 2 min and cooled in a nitrogen atmosphere. They were subsequently immersed in HCl solution (10 mM) at open-circuit conditions for approximately 10 min to remove surface reconstruction and contamination. Finally, the electrodes were extensively rinsed with ultrapure water (18.2 MΩ ⋅ cm, Milli-Q) to eliminate residual Cl− ions. A platinum wire served as the counter electrode (redox.me), and a saturated Ag/AgCl leakless electrode (ET072, Edaq) was used as the reference electrode. The working and counter/reference electrodes were housed in separate compartments of the electrochemical cell. The electrolytes for CPE measurements were prepared by dissolving sodium fluoride (NaF, ≥ 99%, Sigma-Aldrich) in ultrapure water (≥ 18.2 MΩ, Milli-Q). Since the adsorption of hydrated ions such as Na+ and F− on the electrode surface is limited, NaF has been chosen for the analysis. Prior to use, the electrochemical cell was cleaned by sonication in isopropanol (IPA) for 15 minutes, followed by thorough rinsing with ultrapure water. EIS measurements were conducted using single potential electrochemical impedance spectroscopy (SPEIS) within a potential range from −0.1 V to 0.8 V versus Ag/AgCl, on a single Au electrode in one experimental series. The measurements were performed over a frequency range of 0.5 Hz to 1 MHz using a potentiostatic sinusoidal excitation (10 mV amplitude, 20 points per decade) under the quasi-stationary potential determined by the SPEIS potential step. CPE values were obtained by fitting the impedance response incrementally, starting from the lowest frequency with the CPE impedance expression 1/[Q(jω)n] and extending the fit frequency by frequency until the relative error is below 3%.
AI-assisted ion detection
A supervised machine learning framework was developed to infer ion identity and concentration directly from full-spectrum electrochemical impedance measurements. Raw spectra were preprocessed to enhance composition-dependent features and suppress nuisance variance: the real and imaginary components were logarithmically transformed to compress the several orders of magnitude dynamic range, resampled onto a uniform frequency grid to ensure comparability across experiments, concatenated into a single feature vector, and variance-stabilized using a power transform. Dimensionality was then reduced via principal component analysis, with components retained to preserve 98% of the variance while concentrating ion-specific information. The resulting low-dimensional feature set was provided as input to an ensemble of fully connected neural networks, with dropout regularization incorporated to mitigate overfitting. Training was performed using a composite loss function that combined mean-squared error with a soft constraint enforcing overall charge neutrality.
Model performance was assessed using 5-fold cross-validation repeated across multiple random seeds to account for partitioning bias, which is particularly important for limited datasets. This procedure ensured that the reported performance reflected both the intrinsic capability of the model and its robustness to variations in training/test composition. Accuracy was quantified using the coefficient of determination (R2) and relative error distributions across ion species and concentration regimes.
Further methodological details, including network architecture, hyperparameters, and preprocessing rationale, are provided in the Supplementary Information (Section S4).
Data availability
All data generated and used in this study are available in the 4TU.ResearchData repository at https://doi.org/10.4121/fd5d845a-70aa-452f-b662-e72e1e057f34.v152. Source Data are provided with this paper. Additional data related to this work are available from the corresponding authors upon request. Source data are provided with this paper.
Code availability
All developed code used in this study is available in the 4TU.ResearchData repository at https://doi.org/10.4121/086b2944-01bf-4f7c-ba34-f75d19e154d0.v153. Additional data related to this work are available from the corresponding authors upon request.
References
Schwarzenbach, R. P., Egli, T., Hofstetter, T., von Gunten, U. & Wehrli, B. The challenge of micropollutants in aquatic systems. Science 313, 1072–1077 (2006).
Bansod, B., Kumar, T., Thakur, R., Rana, S. & Singh, I. A review on various electrochemical techniques for heavy metal ions detection with different sensing platforms. Biosens. Bioelectron. 94, 443–455 (2017).
Atkinson, J., et al. Real-time bioelectronic sensing of environmental contaminants. Nature 611, 548–553 (2022).
Kim, J. et al. Wearable biosensors for healthcare monitoring. Nat. Biotechnol. 37, 389–406 (2019).
Lahari, S. A. et al. Iot integrated and deep learning assisted electrochemical sensor for multiplexed heavy metal sensing in water samples. npj Clean. Water 8, 10 (2025).
Romele, P. et al. Multiscale real-time and high-sensitivity ion detection with complementary organic electrochemical transistor amplifier. Nat. Commun. 11, 3743 (2020).
Sempionatto, J. et al. Wearable chemical sensors for biomarker discovery in the omics era. Nat. Rev. Chem. 6, 899–915 (2022).
Russo, M. J. et al. Antifouling strategies for electrochemical biosensing: Mechanisms and performance toward point of care based diagnostic applications. ACS Sens. 6, 1482–1507 (2021).
Barhoum, A. et al. Modern designs of electrochemical sensor platforms for environmental analyses: Principles, nanofabrication opportunities, and challenges. Trends Environ. Anal. Chem. 38, e00199 (2023).
Vivier, V. & Orazem, M. E. Impedance analysis of electrochemical systems. Chem. Rev. 122, 11131–11168 (2022).
Wu, J. Understanding the electric double-layer structure, capacitance, and charging dynamics. Chem. Rev. 122, 10821–10859 (2022).
Xue, S., Garlyyev, B., Auer, A., Kunze-Liebhäuser, J. & Bandarenka, A. S. How the nature of the alkali metal cations influences the double-layer capacitance of cu, au, and pt single-crystal electrodes. J. Phys. Chem. C. 124, 12442–12447 (2020).
Li, L., Liu, Y.-P., Le, J.-B. & Cheng, J. Unraveling molecular structures and ion effects of electric double layers at metal water interfaces. Cell Rep. Phys. Sci. 3, 100759 (2022).
Ojha, K., Doblhoff-Dier, K. & Koper, M. T. M. Double-layer structure of the pt(111)–aqueous electrolyte interface. Proc. Natl Acad. Sci. USA 119, e2116016119 (2022).
Xue, S. et al. Impact of pt(hkl) electrode surface structure on the electrical double layer capacitance. J. Am. Chem. Soc. 146, 3883–3889 (2024).
Shin, S. J. et al. On the importance of the electric double layer structure in aqueous electrocatalysis. Nat. Commun. 13, 174 (2022).
Korek, E.-M., Teotia, R., Herbig, D. & Brederlow, R. Electrochemical impedance spectroscopy for ion sensors with interdigitated electrodes: Capacitance calculations, equivalent circuit models and design optimizations. Biosensors 14, 241 (2024).
Altana, A. et al. Textile-integrated organic electrochemical transistor for selective ion detection via electrical impedance spectroscopy. IEEE Sens. Lett. 8, 1–4 (2024).
Sagiroglu, M. Z., Demirel, E. D. & Mutlu, S. Accurate ion type and concentration detection using two bare electrodes by machine learning of non faradaic electrochemical impedance measurements of an automated fluidic system. J. Electroanalytical Chem. 961, 118256 (2024).
Day, C. et al. Impedance-based sensor for potassium ions. Analytica Chim. Acta 1034, 39–45 (2018).
Aicher, M., Grothe, H. & Wolf, B. A novel thin film impedance ca ion sensor for drinking water. Sens. Actuators B: Chem. 244, 1103–1112 (2017).
Gokul, D., Catton, E., Cheng, K. Y. & Mathew, M. T. Electrochemical biosensor to detect implant derived metal ions: A mice model. J. Bio Tribo Corros. 9, 28 (2023).
Panagopoulou, C. et al. Non faradaic impedimetric detection of heavy metal ions via a hybrid nanoparticle dnazyme biosensor. Biosensors 14, 321 (2024).
Lee, M.-h, Won, J., Chung, S., Kim, S. & Park, S. S. Rapid detection of ionic contents in water through sensor fusion and convolutional neural network. Chemosphere 294, 133746 (2022).
Tseng, H., Cucchi, M., Weissbach, A., Leo, K. & Kleemann, H. Membrane free, selective ion sensing by combining organic electrochemical transistors and impedance analysis of ionic diffusion. ACS Appl. Electron. Mater. 3, 3898–3903 (2021).
Gaberšček, M. Understanding li-based battery materials via electrochemical impedance spectroscopy. Nat. Commun. 12, 6513 (2021).
Lazanas, A. C. & Prodromidis, M. I. Electrochemical impedance spectroscopy - a tutorial. ACS Meas. Sci. Au 3, 162–193 (2023).
Abbas, Y., van Smeden, L., Verschueren, A., Zevenbergen, M. & Oudenhoven, J. Modeling electrochemical impedance spectroscopy using time-dependent finite element method. Sensors 24, 7264 (2024).
Lukács, Z. & Kristóf, T. A generalized model of the equivalent circuits in the electrochemical impedance spectroscopy. Electrochim. Acta 363, 137199 (2020).
Mei, B.-A., Munteshari, O., Lau, J., Dunn, B. & Pilon, L. Physical interpretations of nyquist plots for edlc electrodes and devices. J. Phys. Chem. C. 122, 194–206 (2018).
Maradesa, A. et al. Advancing electrochemical impedance analysis through innovations in the distribution of relaxation times method. Joule 8, 1958–1981 (2024).
Lasia, A. The origin of the constant phase element. J. Phys. Chem. Lett. 13, 580–589 (2022).
Le, J.-B., Fan, Q., Li, J. & Cheng, J.-B. Molecular origin of negative component of helmholtz capacitance at electrified pt(111)/water interface. Sci. Adv. 6, eabb1219 (2020).
Li, C.-Y. et al. In situ probing electrified interfacial water structures at atomically flat surfaces. Nat. Mater. 18, 697–701 (2019).
Ilgen, A. et al. Bridging molecular-scale interfacial science with continuum-scale models. Nat. Commun. 15, 5326 (2024).
Fumagalli, L. et al. Anomalously low dielectric constant of confined water. Science 360, 1339–1342 (2018).
Gu, C. et al. Differential capacitance of ionic liquid and mixture with organic solvent. Electrochim. Acta 367, 137517 (2021).
López-García, J. J., Horno, J. & Grosse, C. Differential capacitance of the diffuse double layer at electrode-electrolyte interfaces considering ions as dielectric spheres: Part i. binary electrolyte solutions. J. Colloid Interface Sci. 496, 531–539 (2017).
Wang, X., Liu, K. & Wu, J. Demystifying the stern layer at a metal–electrolyte interface: Local dielectric constant, specific ion adsorption, and partial charge transfer. J. Chem. Phys. 154, 124701 (2021).
Wang, S. et al. Electrochemical impedance spectroscopy. Nat. Rev. Methods Prim. 1, 41 (2021).
de Maubeuge, H. L. Influence of geometric variables on the current distribution uniformity at the edge of parallel plate electrodes. Electrochim. Acta 56, 10603–10611 (2011).
Çetin, M. Electrolytic conductivity, debye-hückel theory, and the onsager limiting law. Phys. Rev. E 55, 2814–2817 (1997).
Avni, Y., Andelman, D. & Orland, H. Conductance of concentrated electrolytes: Multivalency and the wien effect. J. Chem. Phys. 157, 154502 (2022).
Yamada, Y. et al. Advances and issues in developing salt-concentrated battery electrolytes. Nat. Energy 4, 269–280 (2019).
Kalikin, N. N. & Budkov, Y. A. Modified debye-hückel-onsager theory for electrical conductivity in aqueous electrolyte solutions: Account of ionic charge nonlocality. J. Chem. Phys. 161, 174502 (2024).
Pajkossy, T. & Jurczakowski, R. Electrochemical impedance spectroscopy in interfacial studies. Curr. Opin. Electrochem. 1, 53–58 (2017).
Jorcin, J.-B., Orazem, M. E., Pébère, N. & Tribollet, B. Cpe analysis by local electrochemical impedance spectroscopy. Curr. Opin. Electrochem. 1, 56–63 (2017).
Córdoba-Torres, P. Relationship between constant-phase element (cpe) parameters and physical properties of films with a distributed resistivity. Electrochim. Acta 225, 592–604 (2017).
Musiani, M., Orazem, M. E., Pébère, N., Tribollet, B. & Vivier, V. Constant-phase-element behavior caused by coupled resistivity and permittivity distributions in films. J. Electrochem. Soc. 158, C424 (2011).
Hirschorn, B. et al. Constant-phase-element behavior caused by resistivity distributions in films: I. theory. J. Electrochem. Soc. 157, C452–C457 (2010).
Orazem, M. E. & Tribollet, B. A tutorial on electrochemical impedance spectroscopy. ChemTexts 6, 12 (2020).
Mohseni Armaki, A. et al. Source data for: Ion sensing based on frequency-dependent physico-chemical processes at electrode/electrolyte interfaces. 4TU.ResearchData Includes raw & processed EIS data, model outputs, analysis code, and source data for manuscript figures (2025).
Mohseni Armaki, A. et al. Code for: Ion sensing based on frequency-dependent physico-chemical processes at electrode/electrolyte interfaces. 4TU.ResearchData Python and MATLAB scripts for data processing, modeling, and figure generation (2025).
Acknowledgements
This work was supported by Hypersoniq B.V. and Stichting TKI HTSM (grant no. 3ME 21-014 awarded to P.T.). The experimental activities conducted at KWR Water Research Institute were supported by the Top Consortia for Knowledge and Innovation (TKI) allowance of the Ministry of Economic Affairs (grant no. 2020KWR016, institutional funding to KWR). The authors acknowledge A. Ajoodani for valuable discussions on the AI-driven aspects of this work, S. Bavili for contributions to the initial experimental validation, W. van der Zon for technical support and guidance, P. Thakolkaran for contributions to data preprocessing in the machine-learning framework, and J. van den Broeke and X. Tian for their valuable discussions. The authors acknowledge the use of VESTA 3 [Momma & Izumi, J. Appl. Cryst. 44, 1272-1276 (2011)] for rendering the molecular models used in this work.
Author information
Authors and Affiliations
Contributions
P.T., A.M. and M.A. supervised the overall research project. P.T. and M.A. conceptualized the research and developed the study. M.A. and P.T. designed and developed the sensor used in the study. Y.G. designed and implemented the machine-learning prediction model under the supervision of S.K. R.S. conducted the impedance measurements under the supervision of P.B.S.; A.M.A. executed the research by developing the theoretical model, performing the theoretical analysis, validating the model, designing and executing the experiments, and wrote the manuscript with input from all authors. P.T. acquired the funding. All authors contributed to data interpretation and manuscript preparation.
Corresponding author
Ethics declarations
Competing interests
P. Taheri and M. Ahmadi are inventors of a patent application (European Patent, application no. P133617EP00, EP4260053A2) related to component measurement in fluids using impedance spectroscopy. All remaining authors declare no competing interests.
Peer review
Peer review information
Nature Communications thanks Jong-Sook Lee and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. A peer review file is available.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Source data
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Mohseni Armaki, A., Guo, Y., Ahmadi, M. et al. Ion sensing based on frequency-dependent physico-chemical processes at electrode/electrolyte interfaces. Nat Commun 16, 10874 (2025). https://doi.org/10.1038/s41467-025-65918-2
Received:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1038/s41467-025-65918-2






