eistoolbox is a toolbox for MATLAB(R) used for batch fitting Electrochemical Impedance Spectroscopy (EIS) data to equivalent circuit models.
The goal is to calculate the optimal circuit elements using standard minimization functions, such as the complex nonlinear least-squares method.
After obtaining the best fit, the toolbox also estimates the chi-square Goodness-of-Fit. This parameter describes how well the fitted data adjusts to the original measured data.
The toolbox is currently under active development.
Run 'eistoolbox.m' to start the main program!
- Add CSV or DTA data with the button 'Add files...'
- Write your circuit in the dialog (based on Zfit format)
- Select the fitting algorithm
- Hit the 'Fit' button!
- Save the results with the button 'Save as...'
- CSV files must have three columns: FREQ,REAL,IMAG
- DTA files are from Gamry Instruments (tested Gamry 1000 Interface)
At the moment, circuits can be written according to the Zfit specification:
-Elements can be connected in series as s(R1,R1) or in parallel as p(R1,R1) with as many elements as you want. Example: s(R1,R1,C1,C1,p(R1,C1,E2))
-All elements must include the number of fitting parameters. A resistance has one fitting parameter and therefore it is R1. A CPE has two parameters and therefore is written as E2.
-Careful! Do not treat elements as labels (i.e. R1, R2, R3... is incorrect.) The correct way is R1, R1 and R1.
-ToDo: Click the "load" button next to the fit string to load some predefined circuit examples.
-Read the source of the file Zfit.m for full documentation about circuit string formatting.
export_fig by Yair Altman is found here
fminsearchbnd by John D'Errico is found here.
Zfit is from Jean-Luc Dellis, available here.
More fitting functions will be available in the future (such as Levenberg-Marquardt, Nelder-Mead, BFGS, Powell). If you have more algorithm suggestions, let me know.
Copyright (C) 2016 Juan J. Montero-Rodriguez
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, in the version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
- Read Gamry DTA files from Gamry Framework
- Read CSV files in the format [FREQ,REAL,IMAG]
- Fitting engine (thanks to Zfit from Jean-Luc Dellis!)
- Weighting functions: Proportional, Unit and Modulus
- Algorithms: fminsearchbnd (thanks to John D'Errico)
- Algorithms: genetic algorithm (experimental!)
- Algorithms: simulated annealing (experimental!)
- Algorithms: fmincon (experimental!)
- Plot input data as Bode/Nyquist/ReIm plots
- Plot fitted data as Bode/Nyquist/ReIm plots
- Simulate circuits without fitting (using initial parameter values)
- Add button for saving each plot individually (thanks to export_fig from Yair Altman)
- Display fitting results as a table
- Compute linear correlation coefficients between fitted vs. measured data
- Compute Chi2 Goodness-of-Fit test
- Save fitting results and statistics as XLS spreadsheet (csvwrite does not work on Linux!)
- Algorithms: Levenberg-Marquardt
- Algorithms: Nelder-Mead
- Algorithms: BFGS
- Algorithms: Powell
- Algorithms: Other algorithms
- Compute the Kramers-Kronig test
If you have comments or suggestions, send me an e-mail