Nyquist plot maker and EIS equivalent-circuit fitting
Paste your impedance spectrum (frequency, Z′ and Z″, or an EC-Lab, Gamry, CH Instruments or Autolab export) and you get a Nyquist plot with equal axes and a Bode plot, an equivalent circuit fitted by complex nonlinear least squares (Randles, CPE, Warburg, two-arc, coating and Gerischer circuits, or your own in impedance.py notation), every parameter with its standard error, χ² and reduced χ², and a Kramers–Kronig check of the data. The fit minimises Σ[(Z′ − Z′fit)² + (Z″ − Z″fit)²]/|Z|² over all frequencies.
- What it does
- Draws the Nyquist and Bode plots of an impedance spectrum and fits an equivalent circuit to it by complex nonlinear least squares, with standard errors, χ², derived capacitances and a Lin-KK validity test.
- Formula
- Example
- The built-in Randles-cell spectrum (61 frequencies, 100 kHz to 0.1 Hz, simulated with Rs 15 Ω, Rct 120 Ω, Cdl 20 µF, σ 45 Ω·s^−½) fitted with R0-p(R1-W1,C1) gives R0 = 14.99 ± 0.013 Ω, R1 = 119.8 ± 0.14 Ω, σ = 45.18 ± 0.22 Ω·s^−½ and C1 = 20.05 ± 0.03 µF, reduced χ² 1.7 × 10⁻⁵.
Last updated
Loading Nyquist plot and EIS fitting…
At a glance
| Input | Frequency, Z′ and Z″ (or |Z| and phase); EC-Lab .mpt, Gamry .DTA, CH Instruments, Autolab text, CSV |
|---|---|
| Plots | Nyquist (equal axes, frequencies marked) and Bode, with the fitted curve |
| Fit | Complex nonlinear least squares (Levenberg–Marquardt), modulus, proportional or unit weighting |
| Output | Parameters ± SE, χ², χ²/ν, residuals, effective capacitances, time constants, AICc comparison |
| Validity | Lin-KK Kramers–Kronig test (Schönleber et al. 2014) |
| Engine | The LabCanvas Graph app’s EIS analysis, checked against impedance.py |
| Runs in | Your web browser; nothing is uploaded |
| Price | Free, no account needed |
What it does
How to use the nyquist plot and EIS fitting
- Paste or drop your spectrumThree columns: frequency (Hz), Z′ and Z″ (either sign; −Z″ is recognised), with or without a header row. Or drop the file your potentiostat exported: EC-Lab .mpt, Gamry .DTA, CH Instruments or Autolab text.
- Pick a circuit or let it chooseLeave “Automatic” to start from the shape of the spectrum, choose a common circuit, or type your own such as R0-p(R1,CPE1)-W1. Tick “Compare common circuits” to rank them by AICc.
- Read the fitCheck the Nyquist plot and the residuals, read each parameter ± SE, and look at the Kramers–Kronig verdict. A relative SE above about 50 % means the data do not determine that element: simplify the circuit.
- Take it furtherCopy the parameters or the methods sentence, download the plots, or open your data in the LabCanvas Graph app with the same fit.
How it works
Complex nonlinear least squares. The real and imaginary parts are fitted together (Boukamp 1986), so a circuit has to reproduce the arc and the phase at the same time. With modulus weighting each residual is divided by |Z|, so a point at 10 Ω counts as much as one at 10 kΩ; this is the usual choice when the measurement errors are not known (impedance.py's weight_by_modulus). The minimiser is Levenberg–Marquardt started from estimates read off the spectrum (high-frequency intercept, arc diameter, peak frequency) and from several rescaled starting points, so it is less likely to stop in a local minimum. Standard errors come from the covariance matrix scaled by
Circuit notation. Elements in series are joined with “-”, elements in parallel go in p( , ), and every element is numbered: R0-p(R1-W1,C1) is the Randles cell. The elements and their impedances are those of impedance.py (Murbach et al. 2020): R, C, L; CPE
Is the spectrum valid? A circuit fit assumes the system was linear, causal and stable while you measured. The Lin-KK test (Schönleber et al. 2014) fits a chain of RC elements that obeys the Kramers–Kronig relations by construction; residuals within about 1 % of |Z| on average (none above 3 %) say the data are consistent, and a trend at low frequency usually means drift.
Same numbers as the Graph app. The page runs the LabCanvas Graph app's own EIS analysis, which is checked against impedance.py's circuit_fit and Lin-KK on simulated spectra; the hand-off opens the same table and fit there.
Sources: Boukamp BA. Solid State Ionics 1986;20:31–44, doi:10.1016/0167-2738(86)90031-7. Murbach MD et al. impedance.py. J Open Source Softw 2020;5:2349, doi:10.21105/joss.02349. Schönleber M, Klotz D, Ivers-Tiffée E. Electrochim Acta 2014;131:20–27, doi:10.1016/j.electacta.2014.01.034. Hsu CH, Mansfeld F. Corrosion 2001;57:747–748, doi:10.5006/1.3280607.
Worked example: fitting a Randles cell
The built-in example is a simulated spectrum, not a measurement: a Randles cell with solution resistance 15 Ω, charge-transfer resistance 120 Ω, double-layer capacitance 20 µF and Warburg coefficient 45 Ω·s−½, at 61 frequencies from 100 kHz to 0.1 Hz with 0.4 % noise, in EC-Lab's column names (freq/Hz, Re(Z)/Ohm, −Im(Z)/Ohm).
- Read the plot. The Nyquist plot starts at Z′ ≈ 15 Ω (the high-frequency intercept, the solution resistance), draws one semicircle about 120 Ω wide with its top near 66 Hz, and turns into a 45° line below 1 Hz: charge transfer, then diffusion.
- Automatic circuit. From that shape the tool picks R0-p(R1-W1,CPE1) and fits CPE1 n = 0.9999, an ideal capacitor, with the note that a C element would do. Ticking “Compare common circuits” ranks the Randles cell R0-p(R1-W1,C1) first by AICc (Akaike weight 72 %).
- Randles fit. With R0-p(R1-W1,C1): R0 = 14.99 ± 0.013 Ω, R1 = 119.8 ± 0.14 Ω, W1 σ = 45.18 ± 0.22 Ω·s−½, C1 = 20.05 ± 0.03 µF, reduced χ² = 1.7 × 10⁻⁵, mean residual 0.32 % of |Z|: the values the spectrum was made with.
- Validity. The Lin-KK test passes (mean residual 0.71 %, largest 2.4 %), so the spectrum can be fitted.
- Time constant. R1·C1 = 119.8 Ω × 20.05 µF = 2.40 ms, so the arc peaks at 1/(2π × 2.40 ms) ≈ 66 Hz, where the plot has its top.
| Circuit | Notation | Use for |
|---|---|---|
| Randles cell | R0-p(R1-W1,C1) | One arc and a 45° diffusion tail (ferri/ferrocyanide, corrosion with diffusion) |
| R–(R‖CPE) | R0-p(R1,CPE1) | One depressed semicircle |
| Two time constants | R0-p(R1,CPE1)-p(R2,CPE2) | Two arcs: SEI film and charge transfer, grain and grain boundary |
| Battery electrode | R0-p(R1,CPE1)-Wo1 | Charge transfer, then finite (solid-state) diffusion that turns capacitive |
| Coating model | R0-p(CPE1,R1-p(CPE2,R2)) | Coated metal: coating capacitance and pore resistance, then corrosion at the metal |
Frequently asked questions
How do I make a Nyquist plot?
Plot −Z″ (the negative imaginary part) on the y axis against Z′ on the x axis, one point per frequency, with the same scale on both axes so semicircles look round. Paste frequency, Z′ and Z″ into this page and it draws the Nyquist plot with frequencies marked, plus the Bode plot.
How do I fit an equivalent circuit to EIS data?
Choose a circuit that matches the shape of the spectrum (one arc: R–(R‖CPE); arc plus 45° tail: Randles; two arcs: two RC or R‖CPE elements in series), fit Z′ and Z″ together by complex nonlinear least squares with modulus weighting, and check that every parameter has a small relative standard error and that the residuals have no trend.
What do χ² and reduced χ² tell me?
χ² is the weighted sum of squared residuals; reduced χ² divides it by the degrees of freedom (2N − p). With modulus weighting a reduced χ² near 10⁻⁴ to 10⁻⁵ means the fit is within about 1 % of |Z|. Compare circuits by AICc rather than χ² alone, because extra elements always lower χ².
When should I use a CPE instead of a capacitor?
When the arc is a depressed semicircle (its centre below the real axis), from surface roughness, porosity or a distribution of time constants. n = 1 is an ideal capacitor; n near 0.5 behaves like diffusion. Report the effective capacitance from the Hsu–Mansfeld formula, not Q itself.
Which sign of Z″ should I paste?
Either. Capacitive arcs have negative Z″; many programs export −Z″ (positive). A column named with a minus sign (−Im(Z), -Z″) is read as −Z″, and a Z″ column whose values are mostly positive is also read as −Z″.
Is this like ZView, EC-Lab Z Fit or impedance.py?
It does the same kind of complex nonlinear least-squares fit with the same element definitions as impedance.py, and is checked against it. It runs in your browser with no install and no account; for many spectra, batch fits and figures, use the LabCanvas Graph app.
Link to this tool
Using it in a protocol, lab wiki or course page? Copy a link or citation.
<a href="https://www.labcanvas.com/tools/nyquist-plot-eis-fitting">Nyquist plot and EIS fitting</a> (LabCanvas)LabCanvas. Nyquist plot and EIS fitting [online tool]. https://www.labcanvas.com/tools/nyquist-plot-eis-fittingMake the Nyquist plot publication-ready
Your data from this page opens in the LabCanvas Graph app with the same analysis, as an editable graph you can restyle, size to a journal column and place in a figure. The Graph app is free to use with a free LabCanvas account.
Open the Graph app