scieee AI-readable full text Open interactive document viewer

Choosing the right electrode representation for modeling real bioelectronic interfaces: a comprehensive guide

Opančar, Aleksandar; Glowacki, Eric Daniel; Derek, Vedran

Abstract

Objective. Producing realistic numerical models of neurostimulation electrodes in contact with the electrolyte and tissue, for use in time-domain finite element method simulations while maintaining a reasonable computational burden remains a challenge. We aim to provide a straightforward experimental-theoretical hybrid approach for common electrode materials (Ti, TiN, ITO, Au, Pt, IrOx) that are relevant to the research field of bioelectronics, along with all the information necessary to replicate our approach in arbitrary geometry for real-life experimental applications. Approach. We used electrochemical impedance spectroscopy (EIS) to extract the electrode parameters in the AC regime under different DC biases. The pulsed electrode response was obtained by fast amperometry (FA) to optimize and verify the previously obtained electrode parameters in a COMSOL Multiphysics model. For optimization of the electrode parameters a constant phase element (CPE) needed to be implemented in time-domain. Main results. We find that the parameters obtained by EIS can be used to accurately simulate pulsed response only close to the electrode open circuit potential, while at other potentials we give corrections to the obtained parameters, based on FA measurements. We also find that for many electrodes (Au, TiN, Pt, and IrOx), it is important to implement a distributed CPE rather than an ideal capacitor for estimating the electrode double-layer capacitance. We outline and provide examples for the novel time-domain implementation of the CPE for finite element method simulations in COMSOL Multiphysics. Significance. An overview of electrode parameters for some common electrode materials can be a valuable and useful tool in numerical bioelectronics models. A provided FEM implementation model can be readily adapted to arbitrary electrode geometries and used for various applications. Finally, the presented methodology for parametrization of electrode materials can be used for any materials of interest which were not covered by this work.

Full text

J. Neural Eng. 21 (2024) 046049 https://doi.org/10.1088/1741-2552/ad6a8b Journal of Neural Engineering OPEN ACCESS RECEIVED 28 February 2024 REVISED 12 July 2024 ACCEPTED FOR PUBLICATION 1 August 2024 PUBLISHED 14 August 2024 Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. PAPER Choosing the right electrode representation for modeling real bioelectronic interfaces: a comprehensive guide Aleksandar Opancˇar1,2, Eric Daniel Głowacki2,∗and Vedran Ðerek1,∗ 1Department of Physics, Faculty of Science, University of Zagreb, Bijenicˇka c. 32, 10000 Zagreb, Croatia 2Bioelectronics Materials and Devices Laboratory, Central European Institute of Technology, Brno University of Technology, Purkyˇ nova 123, 61200 Brno, Czech Republic ∗Authors to whom any correspondence should be addressed. E-mail: [email protected] and [email protected] Keywords: bioelectronics, electrodes, interface, constant phase element, simulation Supplementary material for this article is available online Abstract Objective. Producing realistic numerical models of neurostimulation electrodes in contact with the electrolyte and tissue, for use in time-domain finite element method simulations while maintaining a reasonable computational burden remains a challenge. We aim to provide a straightforward experimental-theoretical hybrid approach for common electrode materials (Ti, TiN, ITO, Au, Pt, IrOx) that are relevant to the research field of bioelectronics, along with all the information necessary to replicate our approach in arbitrary geometry for real-life experimental applications. Approach. We used electrochemical impedance spectroscopy (EIS) to extract the electrode parameters in the AC regime under different DC biases. The pulsed electrode response was obtained by fast amperometry (FA) to optimize and verify the previously obtained electrode parameters in a COMSOL Multiphysics model. For optimization of the electrode parameters a constant phase element (CPE) needed to be implemented in time-domain. Main results. We find that the parameters obtained by EIS can be used to accurately simulate pulsed response only close to the electrode open circuit potential, while at other potentials we give corrections to the obtained parameters, based on FA measurements. We also find that for many electrodes (Au, TiN, Pt, and IrOx), it is important to implement a distributed CPE rather than an ideal capacitor for estimating the electrode double-layer capacitance. We outline and provide examples for the novel time-domain implementation of the CPE for finite element method simulations in COMSOL Multiphysics. Significance. An overview of electrode parameters for some common electrode materials can be a valuable and useful tool in numerical bioelectronics models. A provided FEM implementation model can be readily adapted to arbitrary electrode geometries and used for various applications. Finally, the presented methodology for parametrization of electrode materials can be used for any materials of interest which were not covered by this work. 1. Introduction The use of electronic devices in living systems for both electrical stimulation and recording requires a wide variety of bioelectronic methods and techniques, including single-cell patch-clamp for studying cell membrane properties, microelectrode arrays for cell culture or tissue stimulation and recording, all the way to the central nervous system and peripheral nerve implants for therapeutic and research purposes [1–7]. Stimulators can be external or implanted, wired or wireless, externally, or battery-powered [8– 12], whereas stimulation protocols can be open- or closed-loop, continuous or intermittent, depending on the needs of the application. However, all modalities of electrical stimulation or electrical signal recording require a pair of electrodes as interfaces with the stimulation/recording target, where the current enters or leaves the region. The efficient and safe application of electric current to living cells or © 2024 The Author(s). Published by IOP Publishing Ltd J. Neural Eng. 21 (2024) 046049 A Opancˇar et al tissues for purposes of either research or medical treatment is governed by the properties of the stimulation electrodes [13,14]. Charge transport from the stimulation device to the electrode is electronic in nature, whereas in tissue, it is purely ionic [15]. The electrode/tissue interface is where the transduction of electronic to ionic transport occurs, and the physical properties of the electrodes, together with the stimulation protocol, determine if the electrical coupling will be capacitive, Faradaic, or of a mixed nature [16,17]. A Faradaic electrode will facilitate the charge transfer by a redox reaction, either reducing or oxidizing chemical species in the surrounding environment or the electrode itself, resulting in the release of ions and free radicals, or in corrosion of the electrode. Typically, biphasic current pulsing protocols are applied to maintain charge balance, however, Faradaic charge transfer reactions may not be reversible and can cause net changes in the chemical environment surrounding the electrode [18]. Both processes can result in failure in stimulation and/or recording, as well as unwanted interactions of the living system with species released by redox reactions. Therefore, when designing stimulation devices and stimulation protocols, due attention should be paid to the electrodes, their geometry, and their electrochemical properties. Ultimately, only experiments will conclusively determine the safety and efficacy of the stimulation device, protocol, and electrodes [19,20]. In vitro and in vivo experiments carry a substantial cost of time and resources, as well as an ethical burden, especially when iterations in design need to be statistically verified in large populations of laboratory model [21]. With rapid progress in computational capabilities, the concept of digital twins has been widely exploited to allow purely numerical experiments—simulations of a biological system in a reciprocal interaction with the environment—to supplement and reduce the necessity for real experiments, thus speeding up the research and reducing its financial and ethical burden [22–24]. A comprehensive digital twin simulation should include both the living and electronic sides of the system with a faithfully represented cell or tissue model, as well as the full model of the stimulation device. To fully comply with the requirements, all the digital twin model parameters should be dynamically updated by the real measurements. Finally, all components of the simulation must be individually experimentally verified, and the applicable range of the parameters established. To fully describe electrical stimulation in bioelectronic systems, it is necessary to model the current injection from a bioelectronic device through the electrode, and into the electrolyte, where the current faces three-dimensional objects which may or may not be electrically active as well. Finally, the current is extracted through the return electrode. Provided that a faithful device model exists, it will be directly coupled to the stimulation and return electrodes, via the model of the environment. Several physical and electrochemical processes may occur at the electrode/electrolyte interface, such as formation of capacitive double layers or Faradaic reduction or oxidation processes, which may be further enhanced or limited by the transport of redox active species in the vicinity of the electrode in the electrolyte. Ab initio models considering all the species in the electrolyte, as well as the electrode material properties at the atomistic scale are neither feasible or reasonable with the current computational abilities, at least not for large spatial- and temporal-scale models. To efficiently numerically simulate the electrode response to a voltage stimulus in an electrolyte solution, a model with a minimal number of parameters is desired, considering its geometry, material, and electrochemical properties, especially in spatially extensive threedimensional models where each spatial mesh element has multiple degrees of freedom associated with it. This electrode can then be coupled with other subsystems within a comprehensive numerical simulation. We will show how said electrode properties can be extracted from simple electrochemical measurements, such as electrochemical impedance spectroscopy (EIS) with applied bias and fast amperometry (FA) under constant potential. Using the parameters extracted and estimated from those measurements, the electrode/electrolyte can be faithfully implemented in a three-dimensional time-dependent finite element method multiphysics model, which can be used for arbitrarily shaped electrical stimulation or recording. In particular, it is vital that the model is time domain based opposed to frequency domain to make it in principle compatible to a Hodgkin–Huxley type model which can be used to calculate the neural response. We will compare commonly used parametrizations of the electrode interface materials which are relevant to the field of bioelectronics research (gold, platinum, titanium, indium tin oxide, titanium nitride, and iridium oxide). The electrochemical properties of the material will be modelled as an equivalent Voigt RC circuit with voltage-dependent double layer capacitance and Faradaic resistance, and as the Randles circuit with voltage-dependent charge transfer resistance and constant phase element (CPE) parameters distributed along the electrode surface. We will demonstrate the implementation of both Voigt and Randles distributed equivalent circuits in the time-domain within the COMSOL Multiphysics environment. The parameters for both equivalent circuits will be extracted from the EIS measurements, and we will show that our model faithfully reproduces the measured EIS data in the frequency domain. We will show that the parameters extracted from EIS cannot be directly applied to pulsed stimulation, due to the inability of the EIS measurements to capture transient phenomena that can be present in low duty cycle 2 J. Neural Eng. 21 (2024) 046049 A Opancˇar et al pulsed stimulation, due to transient changes in electrode properties or rapid depletion of redox-reactive species in the vicinity of the electrode when rapidly brought out of the equilibrium, especially when measuring the EIS under bias voltage. We will demonstrate and verify a method for self-consistent correction of the EIS parameters by nonlinear fitting of the equivalent circuit parameters to the fast amperometry measurements (FA), starting from the parameters obtained by the EIS. Finally, we will present the validation of our model by extrapolation to different geometries, changed electrolyte conductivity and stimulation protocols. A number of recent works have tackled the numerical modelling of electrodes in contact with excitable tissues, each of which focused on a unique aspect of the problem, such as the electrode shape optimization [25,26] or the studies of the effective electrical parameters at the stimulation target [27], while some have attempted to take into account also the electrochemical properties of the electrode [24] in the regime where no Faradaic reactions occur. Our attempt, however, includes a comprehensive FEM approach to the electrode impedance, using both distributed linear equivalent circuits and distributed CPE equivalent circuits, with all the parameters being extracted from the measurements and the model further optimized to reproduce the validation stimulation pulses. This approach has enabled us to identify both the materials and the electrical potential windows for which a simplified linear simulation approach may be valid. Furthermore, due to the used process of model validation by using the stimulation pulses, our model has inherent ability to be used as a digital twin, by feeding the measured data dynamically back to the model for validation and parameter optimization [22,23]. To our knowledge, this is the first report of a non-approximate implementation of distributed electrochemical equivalent circuits with constantphase elements in the time domain within the COMSOL Multiphysics FEM environment, as well as a unique comprehensive overview of electrochemical properties for commonly used electrode materials. Ultimately, the electrode model presented can be used to accurately represent an electrode/electrolyte interface used for stimulation or measurement in time domain, within a comprehensive finite element method simulation. 2. Method 2.1. Representation of electrochemical properties of the electrodes by equivalent circuit models Electrodes in numerical simulations involving electrochemistry are typically represented by an equivalent electrical circuit. A concept of estimating electrical equivalent circuit parameters on an electrode to characterize its transport properties is advantageous, because the low number of parameters required for the model can be efficiently and rapidly solved using the state-of-the-art hardware, even with a massive number of degrees of freedom used in a simulation. There are many commonly used equivalent circuits, but two of the simplest and most commonly used are the Voigt circuit and the simplified Randles circuit with a CPE (figure 2) [28,29]. The Voigt circuit (figure 2(a)) has the advantage of having a very clear interpretation of each element, containing an electrolyte resistance in series, with the double layer capacitance and charge transfer resistance in parallel. In addition, its numerical implementation is straightforward both in the time and frequency domains, since all elements can be represented by linear differential equations. On the other hand, the Randles circuit contains a CPE [30]. All equivalent circuit elements are well defined in the frequency domain by their complex impedances, ZR=R,ZC=1 jωCand ZCPE =1 Q(jω)α, with αranging from 0–1 for the capacitive CPE [31,32]. The resulting impedance can be easily evaluated in the frequency domain, but can pose difficulties when implementing time-domain models. It can be seen from the complex impedances that CPE falls somewhere in between the resistor and the capacitor depending on the exponent α, where α =0 reproduces the resistor and α=1 the capacitor with the parameter Qhaving the role of conductance and capacitance respectively. CPE with exponent α between those limiting values has a rather complex physical interpretation, but it models a behaviour very commonly encountered in electrochemistry. The CPE behaviour of the electrode can either be an intrinsic microscopic property of the material, or a global behaviour originating from distribution of reactivity due to interface inhomogeneities such as surface disorder and roughness, electrode porosity, specific ion adsorption, electrode geometry and normal-to-surface distributions of properties in films and coatings [33]. In all the mentioned cases, it results from a 2D variation of properties along the surface of the electrode or 3D variation of properties also in the direction normal to the electrode surface [34]. Putting aside the microscopic properties of the electrode which can lead to a CPE behaviour, even an ideally capacitive electrode will have an apparent CPE behaviour above a certain limiting frequency flim due to the finite size of the electrode and the edge effects, leading to inhomogeneous electric field distribution across the electrode surface [35,36]. Here, the apparent CPE behaviour refers to the fact that CPE exponent αis a function of frequency which is not the case for a normal CPE element. For the disc electrode of radius rthe expression for flim is given by flim =κ 2πCr ,where κis the electrolyte conductivity and Cis the specific capacitance of the electrode [33]. 3 J. Neural Eng. 21 (2024) 046049 A Opancˇar et al For an electrode with a radius of 1 mm, the capacitance Ccan span a range of two orders of magnitude for commonly used materials, from approximately 10 µF cm−2for indium tin oxide (ITO) to 1000 µF cm−2 for iridium (IV) oxide (IrOx). That gives the range of flim from 2.4 kHz to 24 Hz, well within the typical frequency range used in bioelectronics, which makes the effects of flim crucial for consideration of these applications. In our work, we will use both Voigt and Randles equivalent circuits to represent electrochemistry on the electrode surface, to evaluate the optimal conditions in which they may be used. Further, we will consider all of the equivalent circuit parameters to be in principle voltage-dependent. 2.2. Electrode preparation Microscope slides (1 ×1) inch2were cleaned by successive ultrasonication in acetone, isopropanol, Micro-90 detergent, and DI water, and finally treated with oxygen plasma (Diener NANO Plasma Cleaner). All samples were then sputter coated with a 100 nm layer of Ti using a Kaufman ion-beam source (IBS). This Ti acts as a common layer below all studied samples with the exception of ITO, as it has excellent adhesion on glass and is a suitable underlayer for all the studied materials. Platinum or Gold (60 nm) is deposited using DC magnetron sputtering. TiN (60 nm) is reactively sputtered from a Ti target using two IBS, the latter generating a nitrogen ion beam, according to [37]. IrOxwas obtained via DC reactive magnetron sputtering in an Ar/O2plasma (100 nm) according to previous published methods [38]. ITO on glass was used as purchased, from Kintec, 10 Ohm/square. In short, all materials consisted of a thin film deposited by a PVD method of choice on 25.4 ×25.4 mm2cleaned glass substrates. Active electrochemical electrode area was defined by masking the substrates with adhesive polyimide stencils. The electrode area on the stencil was defined by laser cutting a circle with the diameter of 2 mm. Additionally, for validation of extrapolation experiments stencils with diameters of 0.5, 1, 2, 4 and 6 mm were applied on prepared electrodes. 2.3. Electrochemical measurement setup Electrodes were placed in one side of a doubletank electrochemical cell (MM double-tank cell, Redox.me). The working electrode (WE) with an active area of 3.25 mm2was fixed on one side, while the counter electrode (CE) was placed on the other side, separated by 20 mm. The electrolyte used for the measurements (1×PBS) was prepared from Roti-CELL 10x Dulbecco’s Phosphate-Buffered Saline without Ca and Mg by diluting it in 1:9 ratio with DI water according to the manufacturer specifications, giving a 140 mM concentration of Cl-in the final solution. A 10×diluted version of the same electrolyte, 0.1x PBS, was prepared by diluting the 1xPBS in 1:9 ratio with DI water. An Ag/AgCl wire was used as a reference electrode (REF) and placed 5 mm from the WE. The electrodes were connected to the corresponding ports by alligator clips to a PalmSens 4 or Ivium PocketStat2 potentiostat, or alternatively to a combination of a potentiostat and a digital oscilloscope (Pico Technology, Picoscope 4424 A). 2.4. EIS EIS was measured in a 3-electrode setup, using the phosphate-buffered saline (PBS) as an aqueous electrolyte and a platinum CE. Measurements were conducted with PalmSense4 potentiostat at a DC voltage bias VP, ranging from −900 +800 mV in steps of 100 mV vs. Ag/AgCl reference wire, in a frequency range of 100 mHz–100 kHz with 8.5 frequencies per decade (52 frequencies in total per DC bias.) The AC amplitude was set to 10 mV for all measurements. 2.5. FA FA was measured in the same electrochemical cell and under the same conditions as the EIS measurements. Current response to the constant voltage pulses applied to the WE, ranging from −900 +800 mV in steps of 100 mV vs. Ag/AgCl was measured We allowed 1 min between the application of successive voltage pulses to allow the electrode to equilibrate, which we verified by applying the voltage pulse of the same voltage and making sure that the current transients perfectly overlap. Typical electric stimulation protocols involve voltage or current pulses; therefore, the resulting current decay traces are representative for the common stimulation scenarios and were used later for model adjustment and validation. FA measurements were performed using a PalmSens4 potentiostat and a digital oscilloscope or an Ivium PocketStat2 potentiostat. Both models of used potentiostats exhibit an operational feature manifested as a short delay in transient current measurement immediately after a voltage pulse. For PalmSense4 that delay is approximately 110 µs and for PocketStat2 it is around 165 µs. Therefore, when using PalmSens4 the current transients were measured by a digital oscilloscope, measuring a voltage drop on a 100 Ohm resistor placed in series with the potentiostat and the electrochemical cell, while with the PocketStat2 with a longer pre-trigger period the delay could be avoided. 2.6. Cyclic voltammetry (CV) CV scans were performed before the EIS measurements to estimate the capacitive window for each material and after the EIS measurements to ensure that there were no significant changes in electrode performance. In addition to that, in the case of iridium oxide, repeated CV scans were performed 4 J. Neural Eng. 21 (2024) 046049 A Opancˇar et al to electrochemically activate the electrode until we could see a stable cyclic voltammogram. CV scans were performed with Palmsense4 potentiostat from −0.9–0.8 V vs Ag/AgCl reference wire with a scan rate of 1 V s−1. 2.7. Steady-state parameter extraction Measurement of the electrochemical impedance spectra enables the estimation of the equivalent circuit parameters for different electrodes, by numerical fitting of the measurements to a selected equivalent circuit model. Over time, the EIS instrumentation has evolved to the state where portable EIS-enabled potentiostats became a common laboratory commodity, with the included software greatly simplifying the experiments and data evaluation. Thus, our focus is on using simple EIS measurements to model and obtain equivalent circuit parameters for selected electrodes using the appropriate equivalent circuit. To find an equivalent circuit that would accurately predict the electrode behaviour for a wide range of voltages and frequencies, voltage-biased EIS measurements were performed on all the samples. In the simplest approximation, the entire electrode surface is modelled as one equivalent circuit. However, realistic electrodes may not have an equipotential surface or may not be spatially homogeneous—thus, it is advantageous to represent the electrode as a distribution of equivalent circuits. The former approach will be used in modelling the EIS data, while we will use the latter approach in our FEM numerical model. Firstly, we modelled the measured data for each voltage bias VPto a simple RC Voigt circuit (figure 2(a)). A linear RC Voigt circuit is simple to implement in numerical simulations, and thus is widely used. However, it does not consider the reaction kinetics, which cannot be modelled by a simple RC circuit, and may introduce significant errors in a numerical simulation. However, it may be appropriate to model some of the electrode materials in a limited range of applied voltage. Secondly, we modelled the measured data to a Randles circuit with a CPE (figure 2(b)). The Randles circuit with the CPE considers the reaction kinetics and diffusion behaviour and has provided a much better fit for all materials. From the best numerical fit, we obtained the values of RCT (VP),Q(VP)and α(VP),as well as of the electrolyte resistance Rs.From the obtained voltage dependent equivalent circuit parameters RCT (VP), Q(VP)and α(VP)we calculate the distributed electrode parameters (figures 1(b) and (c)). To obtain the Voigt RC parameter from the single Randles equivalent circuit, we follow the approach outlined by Brug et al [30,39] and use the formula: CDL =Q1 αRSRCT RS+RCT (1−α)/α , where the parameters Q,RS,RCT and αare obtained by fitting the measured EIS data to the Randles circuit (figure 2(b)). If we assume that the electrode surface is homogeneous i.e. that the local surface properties are identical for the entire electrode area, then each microscopic surface element has the same local equivalent circuit describing it as in figure 1(c). Since all of the local equivalent circuits are connected in parallel, the admittance of the entire electrode corresponds to the integral of the local circuits’ admittance across the entire electrode area. Ytotal =ˆYsdA=YsˆdA=YsA, where the second equality is due to the homogeneity of the electrode. Thus, we can calculate the local electrode properties for both microscopic electrode descriptions, Randles CPE (QSPEC,σCT,α) and Voigt RC (CSPEC,σCT) by dividing the total electrode admittance by the area of the electrode, obtaining the local electrode parameters: QSPEC =Q A,CSPEC =CDL A,σCT =RCT −1 A. It is important to note that the series electrolyte resistance RSemerges from the geometry of the FEM simulation and the electrolyte conductivity κand is not implemented as an electrode property. For actual simulations, we add an additional 50Ωseries resistance to compensate for the contact resistance of the electrode and 100Ωseries resistance that represents shunt resistor used in the FA measuring setup. We choose the added resistance to replicate high-frequency series resistance measured by EIS. 2.8. COMSOL model implementation The WE, CE and REF, as well as the surrounding electrolyte were implemented in COMSOL Multiphysics 6.0, using the Electric Currents interface of the AC/DC module. We exploited the symmetry of the problem, solving it in 2D axisymmetric geometry, which greatly reduces the complexity of the calculated problem in comparison to the full 3D model. WE and CE were implemented as the 2D boundaries with an appropriate boundary condition distributed along the electrode surface, while the electrolyte was modelled as a 3D isotropic conductive medium characterized by the relative permittivity ϵr=77 and conductivity κ=1.5 Sm−1or 0.15 Sm−1in the case of 1x PBS and 0.1x PBS respectively. The REF electrode is defined as an equipotential region where the electric VREF potential is probed, connected to a very high impedance potentiostat input. The complete geometry with the boundary conditions is shown 5 J. Neural Eng. 21 (2024) 046049 A Opancˇar et al Figure 1. A schematic workflow of methodology for modelling an arbitrary electrode and evaluating the model. Firstly, the electrode is characterized by electrochemical impedance spectroscopy (EIS), with different constant potential (DC) biases extending beyond the limits of the electrochemical window for a given material. In addition, current response to constant voltage pulses for each of the materials is measured by fast amperometry (FA). EIS parameters are fitted to a chosen equivalent circuit electrode representation, with the results implemented as a distributed electrode interface in the 3D FEM software (COMSOL Multiphysics), in the time domain. The current response to a voltage pulse is evaluated from the FEM model, and compared to the FA measurements. The EIS parameters of the model are iteratively optimized to obtain the best fit of a model to the FA measurements. (a) EIS measurements for different DC biases, with Zrepresenting the measured complex impedance (b) fitting of the measured EIS data to the appropriate equivalent circuit, with RCT representing the charge transfer resistance, RSthe electrolyte series resistance, CPE a constant phase element with the CPE parameter Qand the CPE exponent α; (c) calculating the distributed (intensive) electrode parameters for the Randles equivalent circuit electrode representation (CPE parameter QSPEC and the CPE exponent α), or Voigt equivalent circuit CSPEC, and the charge transfer conductance σCT from the single equivalent circuit (extensive) parameters, (d) implementing the distributed parameters in the 3D FEM time-dependent COMSOL model with the control voltage VPdelivered by a potentiostat between the working electrode (WE) and the reference electrode REF, by adjusting the bias between the WE and the counter electrode CE; (e) simulating the current response (CPE FIT and CPE EIS) to the short voltage pulse and comparing to the measurements obtained by Fast amperometry. Figure 2. Schematic representations of (a) Voigt and (b) simplified Randles equivalent circuits, with CDL representing electrochemical double-layer capacitance, RCT charge transfer resistance, RSelectrolyte series resistance, CPE a constant phase element with CPE parameter Qand the CPE exponent α. 6 J. Neural Eng. 21 (2024) 046049 A Opancˇar et al Figure 3. 2D and the corresponding 3D rotated axisymmetric geometry with mesh depicted in the 2D image and denoted boundary conditions and governing equations in the 3D. Current density is visualized by red arrows and lines. in figure 3, showing the 2D and the corresponding 3D rotated axisymmetric geometry. The volume was meshed in COMSOL Multiphysics using the Delaunay Triangular mesh with element size ranging from 0.05 mm on the WE to 0.5 mm on the CE. The Robin boundary condition on the WE is defined by the local normal current density on the WE JWE [40]: ˆ n·J=JWE. The expression for JWE is calculated for every surface mesh element of the WE and has two contributions, capacitive charge density accumulating on the electrode surface σWE and the Faradaic current density transferred across the electrode interface JF: JWE =dσWE dt+JF. JFand σWE are calculated according to the specifics of the equivalent electrical circuit used. For the Voigt RC circuit, σWE is the surface charge density σCof the ideal capacitor given by: σWE =σC=CSPECVWE, where VWE is the voltage on the electrode-electrolyte interface along the WE and CSPEC is the specific capacitance of the electrode which may be a function of VWE. We calculate VWE as the difference of the electric potentials across the electrode-electrolyte interface VWE ≡VM−Vel,where Vel is the electric potential of the electrolyte mesh elements adjacent to the WE and VMis the potential of the metal electrode, which is in our case grounded via the potentiostat circuit. Vel is spatially dependent and calculated for each mesh element adjacent to the electrode surface whereas VMis approximated as equipotential for the entire electrode. This is justified because the conductivity of the electrode metal is much greater than the conductivity of the electrolyte so the difference in electric potential on the electrode side can be neglected compared to the potential variation along the electrode on the electrolyte side of the interface. In case of the Randles circuit, σWE corresponds to the surface charge density of the CPE σCPE which is given by the expression: σWE =σCPE = t ˆ 0 QSPEC Γ(1−α) VWE (t−τ)αdτ t>0;0< α < 1 , (1) where QSPEC and αare CPE parameter and exponent, Γis the gamma function and tis the time from the beginning of the simulation [41]. QSPEC and αmay be functions of VWE. What makes this implementation much more complicated and computationally demanding than the Voigt circuit implementation is the explicit dependence of the integrand on time in the above expression. The explicit time dependence forces us to solve the above integral anew for every mesh element in the electrode for each time step of the solver, which makes the computation much slower and gives rise to additional constraints on the time stepping while solving as well as some difficulties specific to COMSOL outlined in section 2.9 and the supporting information sections 1 and 2. A possible simplification to significantly speed up the computation would be considering only a single CPE element that represents the entire electrode instead of the distributed CPE mesh. That would require solving the integral in equation (1) only once per time step 7 J. Neural Eng. 21 (2024) 046049 A Opancˇar et al instead of solving it for every electrode mesh element. On the other hand, that kind of simplification would not allow us to get the accurate electrode response at frequencies higher than flim or equivalently times shorter than 1/flim as demonstrated in section 5.1 [35,42]. In both cases, the Faradaic current density is given by the Ohms law: JF=σCTVWE, where σCT is the charge transfer conductivity, a function of WE voltage VWE. Sincethe reference electrode is connected to a very high impedance input of a potentiostat we require that there is no net current flowing through the reference electrode surface ∂REF: ˛ ∂REF ˆ n·JdA=0. On the counter electrode such potential VCE is applied that the voltage between WE and REF is precisely the control voltage set by the potentiostat VP. The rest of the boundaries have the Electric insulation boundary condition given by: b n·J=0. The equation for the electric potential in the electrolyte bulk is derived by taking the gradient of the Ampere’s law and considering the identity ∇ · ∇ × B≡0: ∇Jc+∂D ∂t=0. After relating the conduction current density in the electrolyte Jcto electrical field with Ohm’s law with bulk conductivity κ: Jc=κE and taking the constitutive relation for D: D=ϵ0ϵrE, finally, the electric field is connected to the electric potential by a negative gradient: E=−∇V. 2.9. Time-domain implementation of the CPE The additional difficulty with the CPE implementation arises from the fact that coupling of the computed potentials at former time steps back into calculation at current time step via integration is not possible in COMSOL 6.0. to the best of our knowledge. That makes the implementation of integral in equation (1) impossible with available methods for time integration within COMSOL. To circumvent that issue, we needed to make the entire history of the computed potential available at each time step for every mesh element of the electrode. We achieve this by mapping the entire computed history VWE (r,t)into a spatial variable U(r,z,t)that we can then integrate over with spatial integration methods. For this mapping purpose we added the stabilized convection–diffusion equation interface of the COMSOL Mathematics module and constructed a dedicated geometry for potential mapping, depicted in the supporting information figure S1. We define the 1D convection equation for the mapping variable U: ∂U(r,z,t) ∂t+β∂U(r,z,t) ∂z=0 and we set the value of convection coefficient βto −1 m s−1. This means that we will have 1:1 temporal to spatial mapping where U(r,z,t) = U(r,z+βτ,t+τ). We connect the variable Uto the potential VWE with boundary and initial conditions. We define a Dirichlet boundary condition: U(r,0,t) = VWE (r,t) and the initial condition: U(r,z,0) = VWE (r,0) = 0 because we start the simulations with zero voltage on the electrode. The connection of Uto VWE is then given by: WWE (r,τ) = U(r,0,τ) = U(r,z=β(t−τ),t). Finally, by substitution we can rephrase the integral in equation (1) in terms of spatial integration of variable U: σCPE (r,t) = βt ˆ 0 QSPEC Γ(1−α) U(r,z,t) β(t−z/β)αdz t >0;0<α<1. We evaluate this integral using the linproj operator in COMSOL 6.0. Additional details of the implementation can be found in the supporting information sections 1 and 2. The COMSOL model file, pdf report and supporting data can be obtained from the repository[43] referenced in the data availability statement. 2.10. Transient parameter optimization In addition to EIS, we have also measured the current response to constant voltage pulses applied to the electrodes by FA and by using those measurements we evaluate our final electrode model. We cannot expect that the equivalent circuit with parameters obtained from EIS will work perfectly for the fast voltage pulse transients in the time domain, as the biased EIS measurement protocol establishes the DC equilibrium state before starting AC measurement, and thus it may miss some of the dynamic processes 8 J. Neural Eng. 21 (2024) 046049 A Opancˇar et al that playa key role in the case of fast pulses, such as the dynamics of the oxygen reduction and other Faradaic reactions at the electrodes. The reason for that is that EIS measurements can, for example, quickly deplete oxygen locally available at the electrode even before the impedance measurement begins, and as a result the process becomes diffusion limited, which is not the case to the same extent for the voltage pulses at the millisecond time scale [18]. We can, however, find the equivalent circuit which will accurately represent the electrode in the stationary EIS limit and hopefully, by small adjustments, we can have a good fit on the current transients measured by the FA. Thus, to improve the model’s results, we did a series of numerical optimizations of the equivalent circuit parameters starting from the EIS data, by using BOBYQA algorithm in the Parameter Estimation study of the Optimization module of COMSOL 6.0. We varied the values of QSPEC and CSPEC to obtain the best leastsquares fit to the measured data. This adjustment is not trivial because the circuit parameters QSPEC (VWE)and CSPEC (VWE)are functions of electrode voltage and for each pulse the voltage on the electrode changes from VWE (t=0) =0 to VWE (t=tP)≈VPwhere tPand VPrefer to the pulse duration and pulse voltage respectively. That means that for each voltage pulse we need to fit a function rather than a simple number for QSPEC and CSPEC which drastically complicates the fitting procedure and does not guarantee a unique result for each pulse due to possible local minimums that the fitting procedure may encounter. To solve this issue, we use the following fitting procedure. First, we fit to the voltage pulses of the smallest amplitude VP=VP±1=±100 mV vs Ag/AgCl electrode for anodic and cathodic pulse. We can fit the values for QSPEC and CSPEC for the limiting VWE = VP±1only and assume that for the voltages VP−1< VWE <VP+1the parameters QSPEC and CSPEC change linearly between the end values. That assumption is well justified if the electrode parameters do not change drastically within the voltage resolution of our measurements ∆V=|VP+1−VP−1|. Next, we fit on the pulses of the second smallest amplitudeVP=VP±2=±200 mV vs Ag/AgCl. We again fit the values for QSPEC and CSPEC for the limiting values VWE =VP±2only and assume that the parameters change piecewise linearly between VP−2<VWE <VP−1and VP+1<VWE <VP+2where the values for the parameter between VP−1and VP+1 are fixed from the previous two pulses and are not subject to further change. We thus repeat the same procedure for all the voltage pulses in the ascending order of voltage amplitude. In this way we only fit a single value for QSPEC and CSPEC for each pulse and reduce the fitting procedure to a series of single variable fits, making the entire procedure computationally simple and numerically robust. Voltage dependent electrode parameters QSPEC (VWE),CSPEC (VWE)and σCT (VWE)are implemented in COMSOL by using the built-in interpolation function feature which creates an analytic function from the parameter values measured or fitted with some finite voltage resolution. These interpolation functions are used in the physics governing equations as the parameter values. In this way the parameter values are dynamically updated at every solver time step to have the value prescribed by the functional dependence given the value of VWE at that exact time step. 3. Results and discussion We have built our 3D FEM model to faithfully represent the geometry of the measured electrochemical cell. The fundamental microscopic (materialdependent) electrode parameters were parametrized by two equivalent circuits, Voigt (RC) and Randles (CPE), applied to the electrode mesh elements. While the choice of the Voigt RC circuit may be naïve, it is very commonly used due to the ease of implementation, and we will show in which cases it may still be used. On the other hand, the Randles equivalent circuit can model the measured electrodes faithfully, while unfortunately introducing increased complexity to the model’s implementation. There are a few key insights from these results that will guide us in the choice of the most appropriate equivalent circuit. First, in all of the EIS measurements, we see the presence of the CPE characterized by ‘depressed semicircles’ in the Nyquist plot or flat plateaus visible in the phase component of the Bode plot shown in the supporting information figures S2–S7. That implies that we must use an equivalent circuit with a CPE element, such as a Randles circuit, if we want to obtain an accurate fit. Secondly, the values of the fitted parameters for the same material vary greatly for different DC biases. That means that we must allow for voltagedependent parameters in our equivalent circuit. As mentioned in 2.1, the observed CPE behaviour can be the result of a 2D or 3D variation of electrode properties or, above the limiting frequency flim, the result of the inhomogeneous electric field distribution along the electrode surface. If the reason for the observed CPE behaviour is one of the former two, there is no other choice than to use the Randles circuit (figure 2(b)) both for fitting the EIS data (figure 1(b)) and as a distributed microscopic description of the electrode surface that we implement in the FEM simulation (figure 1(c)). If the latter is the reason for the observed CPE behaviour, the Randles circuit must still be used to fit the EIS measurements, but there is the possibility that the microscopic electrode parameters can be well described by a simpler Voigt RC circuit (figure 2(a)) and that we will obtain the 9 J. Neural Eng. 21 (2024) 046049 A Opancˇar et al Author contributions Aleksandar Opancˇar: investigation (lead); software (lead); methodology (equal); formal analysis (lead); visualization (lead); writing—original draft (supporting); writing—review and editing (equal). Eric Daniel Głowacki: conceptualization (supporting); writing—review and editing (equal); funding acquisition (supporting); resources (supporting);Vedran Ðerek: conceptualization (lead); supervision (lead); writing—original draft (lead); writing—review and editing (equal); methodology (equal); data curation; funding acquisition (lead); project administration. Conflict of interest The authors have no conflicts to disclose. Funding statement This work has been supported by the Croatian Science Foundation under the Project UIP-2019-04-1753. V Ð and A O acknowledge the support of project CeNIKS co-financed by the Croatian Government and the European Union through the European Regional Development Fund—Competitiveness and Cohesion Operational Programme (Grant No. KK.01.1.1.02.0013), and the QuantiXLie Center of Excellence, a project co-financed by the Croatian Government and European Union through the European Regional Development Fund— the Competitiveness and Cohesion Operational Programme (Grant KK.01.1.1.01.0004). This work was supported by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation program (E.D.G. Grant Agreement No. 949191), by the Grant Agency of the Czech Republic under Contract No. 23- 07432S, and by funding from the National Center for Neurological Research, supported by the Czech Ministry of Education, Youth, and Sports (MEYS CR, LX22NPO5107). Sample fabrication was enabled by CzechNanoLab Research Infrastructure supported by MEYS CR (LM2023051). Ethics statement Ethics approval not required. ORCID iDs Aleksandar Opancˇar https://orcid.org/0000-0003- 3471-1110 Eric Daniel Głowacki https://orcid.org/0000- 0002-0280-8017 Vedran Ðerek https://orcid.org/0000-0001-9507- 6865 References [1] Maynard E M, Nordhausen C T and Normann R A 1997 The utah intracortical electrode array: a recording structure for potential brain-computer interfaces Electroencephalogr. Clin. Neurophysiol. 102 228–39 [2] Zeck G and Fromherz P 2001 Noninvasive neuroelectronic interfacing with synaptically connected snail neurons immobilized on a semiconductor chip Proc. Natl Acad. Sci. 98 10457–62 [3] Fromherz P 2002 Electrical interfacing of nerve cells and semiconductor chips ChemPhysChem 3276–84 [4] Dinyari R, Loudin J D, Huie P, Palanker D and Peumans P 2009 A curvable silicon retinal implant Technical Digest Int. Electron Devices Meeting, IEDM (Baltimore, MD, USA,7–9 December 2009) (https://doi.org/10.1109/IEDM.2009. 5424291) [5] Schmidt T et al 2022 Light stimulation of neurons on organic photocapacitors induces action potentials with millisecond precision Adv. Mater. Technol. 72101159 [6] SilveråEjneby M et al 2021 Chronic electrical stimulation of peripheral nerves via deep-red light transduced by an implanted organic photocapacitor Nat. Biomed. Eng. 6741–53 [7] SilveråEjneby M, Migliaccio L, Gicevicˇius M, Ðerek V, Jakeˇ sová M, Elinder F and Głowacki E D 2020 Extracellular photovoltage clamp using conducting polymer-modified organic photocapacitors Adv. Mater. Technol. 51900860 [8] E K 2014 Implantable Bioelectronics ed E Katz (Wiley) [9] Deshmukh A et al 2020 Fully implantable neural recording and stimulation interfaces: peripheral nerve interface applications J. Neurosci. Methods 333 108562 [10] Won S M, Cai L, Gutruf P and Rogers J A 2023 Wireless and battery-free technologies for neuroengineering Nat. Biomed. Eng. 7405–23 [11] Cai L and Gutruf P 2021 Soft, wireless and subdermally implantable recording and neuromodulation tools J. Neural Eng. 18 41001 [12] Lanmüller H, Sauermann S, Unger E, Schnetz G, Mayr W, Bijak M, Rafolt D and Girsch W 1999 Battery-powered implantable nerve stimulator for chronic activation of two skeletal muscles using multichannel techniques Artif. Organs 23 399–402 [13] Cogan S F, Ludwig K A, Welle C G and Takmakov P 2016 Tissue damage thresholds during therapeutic electrical stimulation J. Neural Eng. 13 021001 [14] Shannon R V 1992 A model of safe levels for electrical stimulation IEEE Trans. Biomed. Eng. 39 424–6 [15] Reilly J P 1998 Applied Bioelectricity (Springer) [16] Merrill D R, Bikson M and Jefferys J G R 2005 Electrical stimulation of excitable tissue: design of efficacious and safe protocols J. Neurosci. Methods 141 171–98 [17] Merrill D R 2010 The electrochemistry of charge injection at the electrode/tissue interface Implantable Neural Prostheses 2 ed D Zhou and E Greenbaum (Springer) pp 85–138 [18] Ehlich J, Migliaccio L, Sahalianov I, Niki´ c M, Brodsk´ y J, Gablech I, Vu X T, Ingebrandt S and Głowacki E D 2022 Direct measurement of oxygen reduction reactions at neurostimulation electrodes J. Neural Eng. 19 036045 [19] Günter C, Delbeke J and Ortiz-Catalan M 2019 Safety of long-term electrical peripheral nerve stimulation: review of the state of the art J. Neuroeng. Rehabil. 16 13 [20] Harris A R 2020 Current perspectives on the safe electrical stimulation of peripheral nerves with platinum electrodes Bioelectron. Med. 337–49 [21] Díaz L et al 2020 Ethical considerations in animal research: the principle of 3r’s Rev. Invest. Clin. 73 199–209 [22] Singh M, Fuenmayor E, Hinchy E P, Qiao Y, Murray N and Devine D 2021 Digital twin: origin to future Appl. Syst. Innov. 436 16 J. Neural Eng. 21 (2024) 046049 A Opancˇar et al [23] Wright L and Davidson S 2020 How to tell the difference between a model and a digital twin Adv. Model. Simul. Eng. Sci. 7 [24] Zimmermann J, Budde K, Arbeiter N, Molina F, Storch A, Uhrmacher A M and van Rienen U 2021 Using a digital twin of an electrical stimulation device to monitor and control the electrical stimulation of cells in vitro Front. Bioeng. Biotechnol. 9765516 [25] Ghazavi A, Westwick D, Xu F, Wijdenes P, Syed N and Dalton C 2015 Effect of planar microelectrode geometry on neuron stimulation: finite element modeling and experimental validation of the efficient electrode shape J. Neurosci. Methods 248 51–58 [26] Buitenweg J R, Rutten W L C and Marani E 2000 Finite element modeling of the neuro-electrode interface IEEE Eng. Med. Biol. Mag 19 46–52 [27] Zimmermann J, Sahm F, Arbeiter N, Bathel H, Song Z, Bader R, Jonitz-Heincke A and van Rienen U 2023 Experimental and numerical methods to ensure comprehensible and replicable alternating current electrical stimulation experiments Bioelectrochemistry 151 108395 [28] Lasia A 2014 Electrochemical Impedance Spectroscopy and Its Applications (Springer) [29] Lukács Z and Kristóf T 2020 A generalized model of the equivalent circuits in the electrochemical impedance spectroscopy Electrochim. Acta 363 137199 [30] Brug G J, van den Eeden A L G G, Sluyters-Rehbach M and Sluyters J H 1984 The analysis of electrode impedances complicated by the presence of a constant phase element J. Electroanal. Chem. 176 275–95 [31] Rossmacdonald J 1984 Note on the parameterization of the constant-phase admittance element Solid State Ion. 13 147–9 [32] Zoltowski P 1998 On the electrical capacitance of interfaces exhibiting constant phase element behaviour J. Electroanal. Chem. 443 149–54 [33] Córdoba-Torres P, Mesquita T J and Nogueira R P 2013 Influence of geometry-induced current and potential distributions on the characterization of constant-phase element behavior Electrochim. Acta 87 676–85 [34] Jorcin J B, Orazem M E, Pébère N and Tribollet B 2006 CPE analysis by local electrochemical impedance spectroscopy Electrochim. Acta 51 1473–9 [35] Huang V M, Vivier V, Orazem M E, Pe´b` ere N and Tribollet B 2007 The apparent constant-phase-element behavior of an ideally polarized blocking electrode J. Electrochem. Soc. 154 C81 [36] Huang V, Vivier V, Orazem M E, Pebere N and Tribollet B 2007 The apparent cpe behavior of a disk electrode with faradaic reactions: a global and local impedance analysis ECS Trans. 3567–85 [37] Gablech I, Migliaccio L, Brodsk´ y J, Havlícˇek M, Podeˇ sva P, Hrd´ y R, Ehlich J, Gryszel M and Głowacki E D 2023 High-conductivity stoichiometric titanium nitride for bioelectronics Adv. Electron. Mater. 92200980 [38] van Ooyen A, Topalov G, Ganske G, Mokwa W and Schnakenberg U 2009 Iridium oxide deposited by pulsed dc-sputtering for stimulation electrodes J. Micromech. Microeng. 19 074009 [39] de Pauli M, Gomes A M C, Cavalcante R L, Serpa R B, Reis C P S, Reis F T and Sartorelli M L 2019 Capacitance spectra extracted from EIS by a model-free generalized phase element analysis Electrochim. Acta 320 134366 [40] Cantrell D R, Inayat S, Taflove A, Ruoff R S and Troy J B 2008 Incorporation of the electrode–electrolyte interface into finite-element models of metal microelectrodes J. Neural Eng. 554–67 [41] Westerlund S 1991 Dead matter has memory Phys. Scr. 43 174–9 [42] Newman J 1970 Frequency dispersion in capacity measurements at a disk electrode J. Electrochem. Soc. 117 198 [43] Opancˇar A, Ðerek V and Glowacki E 2024 Choosing the Right Electrode Representation for Modeling Real Bioelectronic Interfaces: A Comprehensive Guide [Data set] Prirodoslovno-matematiˇcki fakultet urn:nbn:hr:217:393738 [44] Bard A J, Faulkner L R and White H S 2022 Electrochemical Methods: Fundamentals and Applications (Wiley) 17