Circuit elements¶
The following elements are available. Since prefixes are possible, each element is referred to as by a special name. The elements’ parameters are called as in the original function. This is the concept of LMFIT.
Names for building the model¶
Name |
Corresponding function |
---|---|
R |
|
C |
|
L |
|
W |
|
Wo |
|
Ws |
|
Cstray |
API reference¶
-
impedancefitter.elements.
Z_C
(omega, C)[source]¶ Capacitor impedance
- Parameters
omega (
numpy.ndarray
) – List of frequencies.C (double) – capacitance of capacitor
- Returns
Impedance array
- Return type
numpy.ndarray
, complex
-
impedancefitter.elements.
Z_CPE
(omega, k, alpha)[source]¶ CPE impedance
\[Z_\mathrm{CPE} = k (j \omega)^{-\alpha}\]- Parameters
omega (
numpy.ndarray
) – List of frequencies.k (double) – CPE factor
alpha (double) – CPE phase
- Returns
Impedance array
- Return type
numpy.ndarray
, complex
-
impedancefitter.elements.
Z_L
(omega, L)[source]¶ Impedance of an inductor.
- Parameters
omega (
numpy.ndarray
) – List of frequencies.L (double) – inductance
- Returns
Impedance array
- Return type
numpy.ndarray
, complex
-
impedancefitter.elements.
Z_R
(omega, R)[source]¶ Create array for a resistor.
- Parameters
omega (
numpy.ndarray
) – List of frequencies.R (double) – Resistance.
- Returns
Impedance array
- Return type
numpy.ndarray
, complex
-
impedancefitter.elements.
Z_stray
(omega, Cs)[source]¶ Stray capacitance in pF
- Parameters
omega (
numpy.ndarray
) – List of frequencies.Cs (double) – Stray capacitance, for numerical reasons in pF.
- Returns
Impedance array
- Return type
numpy.ndarray
, complex
-
impedancefitter.elements.
Z_w
(omega, Aw)[source]¶ Warburg element
\[Z_\mathrm{W} = A_\mathrm{W} \frac{1-j}{\sqrt{\omega}}\]- Parameters
omega (
numpy.ndarray
) – List of frequencies.Aw (double) – Warburg coefficient
- Returns
Impedance array
- Return type
numpy.ndarray
, complex
-
impedancefitter.elements.
Z_wo
(omega, Aw, B)[source]¶ Warburg open element
- Parameters
omega (
numpy.ndarray
) – List of frequencies.Aw (double) – Warburg coefficient
B (double) – Second coefficient
- Returns
Impedance array
- Return type
numpy.ndarray
, complex
Notes
This element is also referred to as finite-length Warburg element with reflective boundary [Barsoukov2018]. Here, the formulation
\[Z_\mathrm{W} = \frac{A_\mathrm{W}}{\tanh\left(B \sqrt{j \omega}\right)\sqrt{j \omega}}\]is implemented.
-
impedancefitter.elements.
Z_ws
(omega, Aw, B)[source]¶ Warburg short element
- Parameters
omega (
numpy.ndarray
) – List of frequencies.Aw (double) – Warburg coefficient
B (double) – Second coefficient
- Returns
Impedance array
- Return type
numpy.ndarray
, complex
Notes
This element is also referred to as finite-length Warburg element with transmissive boundary [Barsoukov2018]. Here, the formulation
\[Z_\mathrm{W} = A_\mathrm{W} \frac{\tanh\left(B \sqrt{j \omega}\right)}{\sqrt{j \omega}}\]is implemented.
-
impedancefitter.elements.
log
(Z1, dummy)[source]¶ Return logarithm of impedance for LMFIT
- Parameters
Z1 (
numpy.ndarray
, complex) – Impedance 1dummy (
numpy.ndarray
, complex) – Array full of ones, such that np.log10(dummy) is zero.
-
impedancefitter.elements.
parallel
(Z1, Z2)[source]¶ Return values of parallel circuit.
- Parameters
Z1 (
numpy.ndarray
, complex) – Impedance 1Z2 (
numpy.ndarray
, complex) – Impedance 2
- Returns
Impedance array
- Return type
numpy.ndarray
, complex