Machine learning benchmarks for the classification of equivalent circuit models from solid-state electrochemical impedance spectra

Joachim Schaeffer, Paul Gasper, Esteban García Tamayo, Raymond Gasper, Masaki Adachi, Juan Pablo Gaviria-Cardona, Simon Montoya-Bedoya, Anoushka Bhutani, Andrew Schiek, Rhys Goodall, Rolf Findeisen, Richard D. Braatz, Simon Engelke

TL;DR

This paper introduces a benchmark for classifying electrochemical impedance spectra (EIS) using machine learning, tackling the challenge of automatically identifying equivalent circuit models (ECMs). The authors present and compare several ML approaches, with a feature-engineered XGBoost model achieving the best performance, highlighting the potential for accelerating battery analysis.

What Problem Does This Paper Address?

Analyzing electrochemical impedance spectroscopy (EIS) data is crucial for understanding battery performance. Traditionally, this involves manually defining an Equivalent Circuit Model (ECM) and then optimizing its parameters. This process is time-consuming and becomes infeasible with large datasets. The paper addresses the need for automated ECM identification, which would significantly speed up the analysis of vast amounts of EIS data, particularly in battery research and development.

Methods

The authors explored three main machine learning approaches for classifying EIS spectra into predefined ECMs:

  • Random Forest (RF): A baseline model that uses raw spectral data, preprocessed to a uniform frequency range, as input. The spectral data is arranged into matrices representing real and imaginary impedance values across frequencies.
  • XGBoost with tsfresh features: This approach treats each EIS spectrum as a multivariate time series. The tsfresh library automatically extracts hundreds of features (e.g., linearity, number of peaks, magnitude) from the spectral data. An XGBoost (extreme gradient boosting) model is then trained on these extracted features.
  • Convolutional Neural Network (CNN): This method visualizes EIS spectra as Nyquist plots (real vs. imaginary impedance) and treats them as images. A CNN, adapted from an architecture successful on the MNIST digit dataset, is used to classify these "images."

Datasets

The primary dataset used in this study is a collection of approximately 9,300 synthetic impedance spectra provided by QuantumScape for the BatteryDEV hackathon. This dataset includes the corresponding ground truth ECM labels. An additional unlabeled dataset, comprising 80% synthetic and 20% measured data, was also made available but not analyzed in detail for classification. The authors emphasize the release of this data and associated code as a benchmark for future research.

Key Insights and Ideas

  • Feature Engineering is Key: The best-performing model (XGBoost) relied heavily on automatically extracted features from the tsfresh library, suggesting that handcrafted features can capture crucial information for ECM classification that raw spectral data might miss.
  • Visualizing Spectra as Images is Challenging: While CNNs are powerful for image recognition, applying them to Nyquist plots of EIS data yielded lower accuracy. This suggests that the visual representation of EIS spectra, especially when simplified to images, might not fully capture the underlying physical information needed for accurate classification.
  • Similar ECMs are Hard to Distinguish: The models consistently struggled to differentiate between ECMs with similar structures, particularly those differing only in the number of RCPE elements (e.g., L-R-nRCPE circuits and nRCPE circuits). This reflects the inherent difficulty in distinguishing subtle variations in spectral shapes.
  • Unphysical Spectra Can Still Be Useful (with caveats): Training on the entire dataset, including some filtered-out "unphysical" spectra, sometimes led to slightly better performance. However, the authors caution that these models might pick up spurious correlations that don't generalize well to real-world battery data.

Key Results

  • The tsfresh-XGBoost approach achieved the highest weighted F1-score of 0.50, outperforming the other models.
  • The Random Forest baseline model achieved a weighted F1-score of 0.38.
  • The CNN approach, while a promising proof of concept, yielded the lowest weighted F1-score of 0.32.
  • The paper highlights that even the best models struggled with certain ECM classes, with confusion matrices showing significant overlap between similar circuit configurations.

Limitations and Future Work

  • Identifiability Issues: A major challenge is the inherent difficulty in distinguishing between certain ECMs, even for human experts. This is reflected in the model performances and misclassified spectra.
  • Generalizability: The performance of the trained models on real-world, measured data from different battery chemistries (e.g., solid-state vs. liquid electrolyte) remains uncertain.
  • Frequency and Magnitude Information in CNNs: The CNN approach, by treating spectra as images, struggled to incorporate frequency and magnitude information effectively. Future work could explore methods to better integrate this crucial data.
  • Unsupervised Learning for ECM Generation: The paper suggests that a more generally useful approach would involve unsupervised learning to generate candidate ECMs, rather than just classifying them.
  • Parameter Estimation: While classification is addressed, the paper notes that parameter estimation for the identified ECMs is a critical next step, and current ML approaches for this are still brittle.
  • Transfer Learning Challenges: Attempts to use transfer learning with pre-trained models like MobileNetV2 were not successful, suggesting that embeddings learned from natural images may not be directly applicable to EIS spectral data.

Summary updated

Abstract

Analysis of Electrochemical Impedance Spectroscopy (EIS) data for electrochemical systems often consists of defining an Equivalent Circuit Model (ECM) using expert knowledge and then optimizing the model parameters to deconvolute various resistance, capacitive, inductive, or diffusion responses. For small data sets, this procedure can be conducted manually; however, it is not feasible to manually define a proper ECM for extensive data sets with a wide range of EIS responses. Automatic identification of an ECM would substantially accelerate the analysis of large sets of EIS data. We showcase machine learning methods to classify the ECMs of 9,300 impedance spectra provided by QuantumScape for the BatteryDEV hackathon. The best-performing approach is a gradient-boosted tree model utilizing a library to automatically generate features, followed by a random forest model using the raw spectral data. A convolutional neural network using boolean images of Nyquist representations is presented as an alternative, although it achieves a lower accuracy. We publish the data and open source the associated code. The approaches described in this article can serve as benchmarks for further studies. A key remaining challenge is the identifiability of the labels, underlined by the model performances and the comparison of misclassified spectra.
BibTeX
@article{schaeffer2023machine,
  author = {Joachim Schaeffer and Paul Gasper and Esteban García Tamayo and Raymond Gasper and Masaki Adachi and Juan Pablo Gaviria-Cardona and Simon Montoya-Bedoya and Anoushka Bhutani and Andrew Schiek and Rhys Goodall and Rolf Findeisen and Richard D. Braatz and Simon Engelke},
  title = {{Machine learning benchmarks for the classification of equivalent circuit models from solid-state electrochemical impedance spectra}},
  journal = {Journal of The Electrochemical Society},
  year = {2023},
  doi = {10.1149/1945-7111/acd8fb},
}
Figure