Python-Based Program for Error Structure Analysis and Regression of Impedance Data
Authors: Watson William , Orazem Mark E. 
Published: December 2020

The measurement model described in this presentation is based on a program developed in the 1990s by Prof. Mark Orazem and his group using a Matlab front-end and FORTRAN executables.[1] The objective of the present work was to completely rebuild the original measurement model into a stand-alone program. This program was to have more features, be more user-friendly, and be free of proprietary code in order to enable its distribution. The new code was written from the ground up in Python, although some portions of the backend libraries, such as numpy, use C.

The working part of the program has five tabs. The File Tools and Conversion part of the program is used to convert files to a program-usable format. The Measurement Model part of the program is used to fit a Voigt measurement model to the impedance data. The Voigt measurement model is the foundation of the error structure analysis performed by the program. The measurement model can be used to filter replicated measurements to extract the standard deviation of the stochastic part of the error structure.[2] These are presented in the Error File Preparation part of the program. In the Error Analysis part of the program, a simple model can be fit to the standard deviation of the stochastic part of the error structure. The model of the stochastic error structure can be used to weight regressions of the impedance spectra. The measurement model may be used as well to determine the portion of the measurement that satisfies the Kramers-Kronig relations.[3] The approach employing a properly-weighted nonlinear regression has been shown to be more sensitive to failures of causality than the linear Voigt model regression developed by Boukamp and employed by many instrument vendors.[4]

The final tab of the working part of the program, Custom Formula Fitting, allows regression of arbitrary functions to impedance data. Rather than employ electrical circuit components such as resistors and capacitors,[5],[6] this part of the program is equation-based. The formula is input as Python code and may make use of imported Python packages. The package numpy is already imported. As in standard Python, the imaginary number can be accessed as 1j. The equation-based approach enables regression of models that include look-up tables for convective diffusion,[7] integral functions for the power-law description of oxide films,[8] and de Levie formulas for porous electrodes.[9]

The objective of this effort is to provide a program that can allow the users to access the power of the measurement model concept and to fit custom process models. The program will be distributed as a Windows executable.

References

[1] P. Agarwal, M. E. Orazem, and L. H. García-Rubio, “Measurement Models for Electrochemical Impedance Spectroscopy: 1. Demonstration of Applicability,” Journal of The Electrochemical Society, 139 (1992), 1917-1927.

[2] P. Agarwal, Oscar D. Crisalle, M. E. Orazem, and L. H. García-Rubio, “Application of Measurement Models to Electrochemical Impedance Spectroscopy: 2. Determination of the Stochastic Contribution to the Error Structure,” Journal of The Electrochemical Society, 142 (1995), 4149-4158.

[3] P. Agarwal, M. E. Orazem, and L. H. García-Rubio, “Application of Measurement Models to Electrochemical Impedance Spectroscopy: 3. Evaluation of Consistency with the Kramers-Kronig Relations,” Journal of The Electrochemical Society, 142 (1995), 4159-4168.

[4] C. You, M. A. Zabara, M. E. Orazem, and B. Ulgut, “Application of the Kramers-Kronig Relations to Multi-Sine Electrochemical Impedance Measurements,” Journal of the Electrochemical Society, 167 (2020), 020515.

[5] M. Murbach, et al., A package for Analyzing Electrochemical Impedance Data, https://pypi.org/project/impedance/

[6] K. B. Knudsen, A Python-based Electrochemical Impedance Spectroscopy Simulator and Analyzer, https://pypi.org/project/PyEIS/

[7] B. Tribollet and J. S. Newman, “The Modulated Flow at a Rotating Disk Electrode,” Journal of the Electrochemical Society, 130 (1983), 2016-2026.

[8] B. Hirschorn, M. E. Orazem, B. Tribollet, V. Vivier, I. Frateur, and M. Musiani, “Constant-Phase-Element Behavior Caused by Resistivity Distributions in Films: 1. Theory,” Journal of The Electrochemical Society, 157 (2010) C452-C457.

[9] R. de Levie, “Electrochemical Responses of Porous and Rough Electrodes, in Advances in Electrochemistry and Electrochemical Engineering, vol. 6, P. Delahay, ed., Interscience, New York, 1967, 329-397.