Electrochemical Impedance Spectroscopy
This page documents the Electrochemical Impedance Spectroscopy (EIS or PEIS) method.
pypalmsens.ElectrochemicalImpedanceSpectroscopy
Create electrochemical impedance spectroscopy method parameters.
Electrochemical Impedance Spectroscopy (EIS) is an electrochemical technique to measure the impedance of a system in dependence of the frequency of the applied AC signal.
Although "spectroscopy" implies a frequency sweep, which is the most common measurement, this class provides the flexibility to set the frequency and vary other parameters, such as DC potential and time.
Every measurement point yields the impedance Z = E_ac / I_ac at the applied
frequency. The impedance is a complex number Z = Z' − jZ'', with the real part
Z' and the imaginary part Z'', at the angular frequency ω = 2πf. The phase
shift follows tan(φ) = −Z'' / Z' and the magnitude |Z|² = Z'² + Z''².
A spectrum is usually presented as a Nyquist plot of Z'' against Z', or as a
Bode plot of log|Z| and the phase shift against log f. The admittance, the
inverse of the impedance Y = 1 / Z = Y' + jY'', is plotted instead as Y
against log f or Y'' against Y'.
Available modes of EIS measurements:
- a frequency scan at a fixed dc-potential (default EIS)
- frequency scans at each dc-potential in a potential scan
- frequency scans at specified time intervals (time scan)
- a single frequency applied at each dc potential in a potential scan (Mott-Schottky)
- a repeated single frequency at specified time intervals
EIS can also be used to study corrosion and the effects of coatings. For example, anodized coatings, conversion coatings or organic coatings like paints.
The applied frequencies must stay within the EIS frequency range of the
instrument, see pypalmsens.InstrumentManager.capabilities
(eis_min_frequency / eis_max_frequency).
During EIS the instrument selects the current range automatically, so it is
generally best to enable all ranges in
pypalmsens.settings.CurrentRange: the highest usable range follows from
the lowest impedance to be measured (1 / Z) together with the highest
dc-current, and the lowest usable range from the highest impedance and the
lowest dc-current. Some ranges can still be unavailable because of
max_frequency or ac_potential. The measurement starts in the highest
enabled range and searches for a suitable range from the top down, which is
quick when the scan starts above 1 kHz; starting below 1 Hz makes each point
much longer and may need extra time on the first point, so a single fixed
range can be simpler for a low-frequency time scan.
Leave the higher ranges enabled when you measure at high frequencies. The auto-ranging routine determines the gain from the maximum bandwidth, which combines switching to the optimal range with a gain of 10 or 100 on the active range, so excluding a range can leave too little bandwidth to sample the high frequencies accurately.
Pretreatment always runs in potentiostatic mode, also for
pypalmsens.GalvanostaticImpedanceSpectroscopy, and equilibration_time
elapses before the impedance measurement at each newly applied dc-potential.
Examples:
EIS with frequency scan:
>>> import pypalmsens as ps
>>> method = ps.ElectrochemicalImpedanceSpectroscopy(
... frequency_type='scan',
... min_frequency=5.0,
... max_frequency=10000,
... n_frequencies=11,
... scan_type='fixed',
... min_sampling_time=0.5,
... max_equilibration_time=5.0,
... )
EIS with frequency scans repeated over a range of DC potential values:
>>> method = ps.ElectrochemicalImpedanceSpectroscopy(
... frequency_type='scan',
... min_frequency=5.0,
... max_frequency=10000,
... n_frequencies=11,
... scan_type='potential',
... begin_potential=-0.5,
... end_potential=0.5,
... step_potential=0.1,
... min_sampling_time=0.5,
... max_equilibration_time=5.0,
... )
EIS with frequency scans repeated for 10 seconds (run_time):
>>> method = ps.ElectrochemicalImpedanceSpectroscopy(
... frequency_type='scan',
... min_frequency=5.0,
... max_frequency=10000,
... n_frequencies=11,
... scan_type='time',
... run_time=10,
... min_sampling_time=0.5,
... max_equilibration_time=5.0,
... )
Methods:
-
to_dict–Return the technique instance as a new key/value dictionary mapping.
-
from_dict–Structure technique instance from dict.
-
from_method_id–Create new instance of appropriate technique from method ID.
Attributes:
-
general(General) –Set the general, method-wide settings.
-
multiplexer(Multiplexer) –Set the multiplexer settings.
-
material(Material) –Stores material settings for corrosion measurements.
-
equilibration_triggers(EquilibrationTriggers) –Set the trigger at equilibration settings.
-
measurement_triggers(MeasurementTriggers) –Set the trigger at measurement settings.
-
post_measurement(PostMeasurement) –Set the post measurement settings.
-
versus_ocp(VersusOCP) –Set the versus OCP settings.
-
pretreatment(Pretreatment) –Set the pretreatment settings.
-
potential_range(PotentialRange) –Set the autoranging potential.
-
current_range(CurrentRange) –Set the autoranging current.
-
id(Literal['eis']) –Unique method identifier.
-
equilibration_time(float) –Equilibration time in s.
-
dc_potential(float) –DC-potential applied during the EIS scan in V.
-
ac_potential(float) –AC potential in V RMS.
-
frequency_type(AllowedFrequencyTypes) –Whether to measure a single frequency or scan over a range of frequencies.
-
fixed_frequency(float) –Fixed frequency in Hz (
frequency_type='fixed'). -
min_frequency(float) –Frequency the frequency scan ends on in Hz (frequency scan only).
-
max_frequency(float) –Frequency the frequency scan starts on in Hz (frequency scan only).
-
n_frequencies(int) –Number of frequencies to apply in the frequency scan (frequency scan only).
-
scan_type(AllowedScanTypes) –Whether a single or multiple frequency scans are performed.
-
run_time(float) –Minimal run time in seconds in s (time scan only).
-
interval_time(float) –The interval at which a measurement iteration should be performed in s (time scan only).
-
begin_potential(float) –The dc-potential at which the measurement starts in V (potential scan only).
-
end_potential(float) –The dc-potential at which the scan ends in V (potential scan only).
-
step_potential(float) –Potential step size in V (potential scan only).
-
min_sampling_time(float) –Minimum sampling time in s.
-
max_equilibration_time(float) –Max equilibration time in s.
general
class-attribute
instance-attribute
Set the general, method-wide settings.
multiplexer
class-attribute
instance-attribute
multiplexer: Multiplexer = Field(default_factory=settings.Multiplexer)
Set the multiplexer settings.
material
class-attribute
instance-attribute
Stores material settings for corrosion measurements.
equilibration_triggers
class-attribute
instance-attribute
equilibration_triggers: EquilibrationTriggers = Field(default_factory=settings.EquilibrationTriggers)
Set the trigger at equilibration settings.
measurement_triggers
class-attribute
instance-attribute
measurement_triggers: MeasurementTriggers = Field(default_factory=settings.MeasurementTriggers)
Set the trigger at measurement settings.
post_measurement
class-attribute
instance-attribute
post_measurement: PostMeasurement = Field(default_factory=settings.PostMeasurement)
Set the post measurement settings.
versus_ocp
class-attribute
instance-attribute
Set the versus OCP settings.
pretreatment
class-attribute
instance-attribute
pretreatment: Pretreatment = Field(default_factory=settings.Pretreatment)
Set the pretreatment settings.
potential_range
class-attribute
instance-attribute
potential_range: PotentialRange = Field(default_factory=settings.PotentialRange)
Set the autoranging potential.
current_range
class-attribute
instance-attribute
current_range: CurrentRange = Field(default_factory=settings.CurrentRange)
Set the autoranging current.
equilibration_time
class-attribute
instance-attribute
equilibration_time: float = 0.0
Equilibration time in s.
Each time a new dc-potential is applied, this time elapses before the impedance measurements for that potential start.
dc_potential
class-attribute
instance-attribute
dc_potential: float = 0.0
DC-potential applied during the EIS scan in V.
Also called DC Bias or level. The most common setting for this parameter is 0 V vs. OCP.
Must stay within the potential range of the instrument, see
pypalmsens.InstrumentManager.capabilities
(min_potential / max_potential).
ac_potential
class-attribute
instance-attribute
ac_potential: float = 0.01
AC potential in V RMS.
The amplitude of the ac potential signal has a range of 0.001 V to 0.25 V (RMS). In many applications, a value of 0.010 V (RMS) is used.
The maximum amplitude of your instrument is available as
max_eis_amplitude_erms on
pypalmsens.InstrumentManager.capabilities. Together with max_frequency
this amplitude can make some current ranges unavailable.
Keep the amplitude small: an amplitude that leaves the linear region of the system produces higher harmonics of the applied frequency and can start redox reactions. Raise it only for very high impedances, in the megaohm range and above, where the resulting current stays small enough to remain linear.
frequency_type
class-attribute
instance-attribute
frequency_type: AllowedFrequencyTypes = 'scan'
Whether to measure a single frequency or scan over a range of frequencies.
Possible values: 'scan', 'fixed'.
- Scan: a frequency scan is performed starting at the given
max_frequencydown tomin_frequency. This is the setting for a regular EIS experiment. - Fixed: a single frequency given by
fixed_frequencyis applied for the given duration or at each dc-potential step or time interval.
fixed_frequency
class-attribute
instance-attribute
fixed_frequency: float = 1000
Fixed frequency in Hz (frequency_type='fixed').
Applied at each dc-potential step or time interval when scan_type is
'potential' or 'time'. Must be within the EIS frequency range of the
instrument, see pypalmsens.InstrumentManager.capabilities
(eis_min_frequency / eis_max_frequency).
min_frequency
class-attribute
instance-attribute
min_frequency: float = 5.0
Frequency the frequency scan ends on in Hz (frequency scan only).
Must stay within the EIS frequency range of the instrument, see
pypalmsens.InstrumentManager.capabilities (eis_min_frequency).
max_frequency
class-attribute
instance-attribute
max_frequency: float = 10000
Frequency the frequency scan starts on in Hz (frequency scan only).
The scan runs from here down to min_frequency. Above 1 kHz a point is
measured in a few seconds; below 1 Hz each point takes much longer and the
first point may need extra time to select a current range. Must stay within
the EIS frequency range of the instrument, see
pypalmsens.InstrumentManager.capabilities (eis_max_frequency).
n_frequencies
class-attribute
instance-attribute
n_frequencies: int = 11
Number of frequencies to apply in the frequency scan (frequency scan only).
Defines the frequencies to apply between the max_frequency and
min_frequency. For example, a value of 11 will measure at 11 frequencies,
including both end points.
EIS experiments usually span kilohertz to millihertz, so a logarithmic spacing is common: 10 frequencies per decade makes a scan from 10 kHz down to 100 Hz 2 decades times 10 + 1 frequencies, i.e. 21 frequencies.
This is the total number of applied frequencies, not the number per decade.
scan_type
class-attribute
instance-attribute
scan_type: AllowedScanTypes = 'fixed'
Whether a single or multiple frequency scans are performed.
Possible values: 'potential', 'time', 'fixed'.
- Fixed scan: perform a single scan (default).
dc_potentialstays fixed during the scan. - Time scan: scans are repeated for a specific amount of time at a specific interval.
- Potential scan: scans are repeated over a range of DC potential values,
starting at
begin_potentialand ending atend_potentialin steps ofstep_potential. At each dc-potential level a single fixed frequency or a full frequency scan is applied, according tofrequency_type. A potential scan should not be performed versus the OCP.
run_time
class-attribute
instance-attribute
run_time: float = 10.0
Minimal run time in seconds in s (time scan only).
Scans are repeated until this much time has elapsed, within the run time the
instrument allows: less than 1 s up to 1,000,000 s. For example, if a
frequency scan takes 10 seconds and is measured at an interval of 1 second
for a run_time of 25 seconds, then three iterations will be performed.
interval_time
class-attribute
instance-attribute
interval_time: float = 0.1
The interval at which a measurement iteration should be performed in s (time scan only).
The minimum interval time between each data point (frequency_type='fixed') or
between each frequency scan (`frequency_type='scan').
We recommend a time higher than the required time to measure the data point or perform the
frequency scan + overhead time. While it's possible to use a shorter time, doing so may
lead to incorrect impedance calculations.
If a measurement iteration takes longer than the interval time the next measurement will not be triggered until after it has been completed.
begin_potential
class-attribute
instance-attribute
begin_potential: float = 0.0
The dc-potential at which the measurement starts in V (potential scan only).
I.e. the DC potential of the applied sine wave to start the series of iterative measurements at.
Must stay within the potential range of the instrument, see
pypalmsens.InstrumentManager.capabilities (min_potential / max_potential).
end_potential
class-attribute
instance-attribute
end_potential: float = 0.0
The dc-potential at which the scan ends in V (potential scan only).
I.e. the DC potential of the applied sine wave at which the series of iterative measurements ends.
The applicable range is the same as for begin_potential.
step_potential
class-attribute
instance-attribute
step_potential: float = 0.01
Potential step size in V (potential scan only).
This sets the increment to be used between begin_potential and end_potential.
The largest step is 250 mV, the smallest step your instrument allows is
min_potential_step in mV on
pypalmsens.InstrumentManager.capabilities.
min_sampling_time
class-attribute
instance-attribute
min_sampling_time: float = Field(default=0.5, gt=0)
Minimum sampling time in s.
Each measurement point of the impedance spectrum is performed
during the period specified by min_sampling_time.
This means that the number of measured sine waves is equal to min_sampling_time * frequency.
If this value is less than 1 sine wave, the sampling is extended to 1 / frequency.
So for a measurement at a frequency, at least one complete sine wave is measured.
Reasonable values for the sampling are in the range of 0.1 to 1 s.
max_equilibration_time
class-attribute
instance-attribute
max_equilibration_time: float = 5.0
Max equilibration time in s.
The EIS measurement requires a stationary state.
This means that before the actual measurement starts, the sine wave is
applied during max_equilibration_time only to reach the stationary state.
The maximum number of equilibration sine waves is however 5.
The minimum number of equilibration sines is set to 1, but for very
low frequencies, this time is limited by max_equilibration_time.
The maximum time to wait for stationary state is determined by the value of this parameter. A reasonable value might be 5 seconds. In this case this parameter is only relevant when the lowest frequency is less than 1/5 s so 0.2 Hz.
Increasing this parameter can be beneficial when measuring unstable or noisy samples at low frequencies, although it extends the overall measurement time.
to_dict
Return the technique instance as a new key/value dictionary mapping.
Source code in src/pypalmsens/_methods/base.py
48 49 50 | |
from_dict
classmethod
from_dict(obj: dict[str, Any]) -> MethodType
Structure technique instance from dict.
Opposite of .to_dict()
Source code in src/pypalmsens/_methods/base.py
52 53 54 55 56 57 | |
from_method_id
classmethod
from_method_id(id: str) -> MethodType
Create new instance of appropriate technique from method ID.
Source code in src/pypalmsens/_methods/base.py
59 60 61 62 63 | |