Vimi Patela,
Kunjrani Sorathiaa,
Kushal Unjiyaa,
Raj Dashrath Patelb,
Siddhi Vinayak Pandey
*b,
Abul Kalamc,
Daniel Prochowiczd,
Seckin Akine and
Pankaj Yadav
*bf
aDepartment of Information and Communication Technology, Adani University, Ahmedabad-382421, Gujarat, India
bDepartment of Solar Energy, School of Energy Technology, Pandit Deendayal Energy University, Gandhinagar-382007, Gujarat, India. E-mail: siddhivinayak.ele17@gmail.com; pankajphd11@gmail.com; pankaj.yadav@sse.pdpu.ac.in
cDepartment of Chemistry, Faculty of Science, King Khalid University, Abha 61413, P.O. Box 9004, Saudi Arabia
dInstitute of Physical Chemistry, Polish Academy of Sciences, Kasprzaka 44/52, 01-224 Warsaw, Poland
eDepartment of Metallurgical and Materials Engineering, Karamanoglu Mehmetbey University, 70200, Karaman, Turkey
fDepartment of Physics, School of Energy Technology, Pandit Deendayal Energy University, Gandhinagar-382 007, Gujarat, India
First published on 21st January 2025
Metal halide perovskite single crystals (MHPSCs) are highly promising materials for optoelectronic applications, but their stability is hindered by ion migration, thereby impacting their performance. A key factor to understand this issue is calculating the activation energy. Electrochemical Impedance Spectroscopy (EIS) is a powerful technique for separating ionic and electronic processes, yet traditional analysis is labour-intensive, involving extensive measurements, circuit fitting, and manual data interpretation. In this study, we introduce a machine learning (ML)-driven approach to fully automate EIS analysis. EIS data, collected for MAPbI3 and MAPbBr3 across temperatures from 263 K to 343 K, enabled the creation of a large database. The developed ML model predicts EIS spectra at unknown temperatures, fits the appropriate electrical circuit, and automatically extracts passive component values to calculate the activation energy via an Arrhenius plot. This automated workflow streamlines the calculation process, offering fast and reliable activation energy predictions even when temperature data are incomplete or missing. Our approach enhances the efficiency of EIS analysis, providing valuable insights into the stability and performance of MHP SCs.
The activation energy is commonly calculated by measuring the current–voltage (I–V), space charge limited current (SCLC) and electrochemical impedance spectroscopy (EIS) as a function of temperature.10,11 Particularly, EIS measurements were found to be advantageous compared to I–V and SCLC measurements since they offer to distinguish electronic and ionic phenomena to a greater extent. Apart from this, EIS spectra were recorded in the time or frequency domain, enabling the separation of different processes (e.g., charge transport, recombination, ion movement) at different timescales. Moreover, along with the activation energy, EIS studies are also able to provide information about ion migration, while no such direct information is deduced from I–V and SCLC measurements.12 However, measurements and analysis of EIS spectra are not straightforward. It was found that due to the following reasons EIS measurement has not been employed as a mainstream characterization tool in the semiconductor or solar industry: (1) a long measurement time from minutes to hours due to the selection of the frequency range, average recorder values, applied bias, temperature or illumination source in order to get reliable and stable data points;13 (2) selection of an appropriate electrical equivalent circuit (EEC) which includes accurately modelling complex electrochemical systems and fitting the appropriate circuit elements to capture all relevant impedance behaviour;14,15 (3) even after acquiring EIS spectral data, selecting the appropriate circuit, extracting its elements, and analysing the resulting parameters to determine material or device properties can traditionally take days to months, with a persistant risk of human error.16
Given the challenges in handling EIS spectra, our previous efforts to use machine learning (ML) and advanced data convolution techniques have significantly helped us to understand MHPSCs in a better manner.13,17,18 In the present study, we applied cutting-edge ML techniques to MHPSCs, specifically focusing on two well-studied compositions i.e.: MAPbBr3 and MAPbI3, which are commonly used in the fundamental research of halide migration. Our ML models, trained on a broad range of experimental EIS spectra were designed to predict EIS responses across a wide temperature range. The models not only accurately predict full EIS responses at specific temperatures, but also fit the data and extract valuable information about circuit elements. Additionally, a custom Python script was developed to automate the calculation of the activation energy based on the extracted circuit element values, offering a powerful tool for studying MHPSCs under varying thermal conditions.
![]() | ||
Fig. 1 Nyquist plots representing the complex impedance values for the real (Z′) vs. imaginary (Z′′) parts of EIS in a temperature range of 263–343 K for the (a) MAPbI3 and (2) MAPbBr3 SCs. |
In general, high-frequency spectra stem from the geometrical capacitance and bulk conductivity,21,22 while low-frequency spectra originate from the ionic phenomena (ion accumulation and transport).22 With an increase in temperature, the radii of the semicircles (low- and high-frequency spectra) of both the SCs decrease somewhat at different rates. For both the SCs, it was observed that with the increase in temperature, the low frequency response nearby (1 Hz) gets shifted towards higher frequencies. A similar behaviour was also observed by Clarke et al. and found that it associated with ionic modulation.23 This will increase the recombination rate (bulk recombination), which in turn reduces the resistance.24
Fig. S1† illustrates the frequency dependence of the real and imaginary parts of the EIS for both SCs (iodidie and bromide respectively), highlighting their temperature dependence characterstics. Fig. S1(a) and (c)† show the real impedance (Z′) of MAPbI3 and MAPbBr3 SCs, revealing a progressive change in slope around the mid-frequency range (kHz). Meanwhile, Fig. S1(b) and (d)† depict the imaginary impedance (Z′′) of both SCs as a function of frequency at different temperatures. In the case of the MAPbI3 SC, a clear distinct relaxation process at low and high frequencies for each measured temperature is evident. This process is indicative of the time-dependent behaviour of charge carriers. The peak shifts occurred at higher frequencies, with their magnitude decreasing as the temperature increased.25 However, in the case of the MAPbBr3 SC, maximum change was observed in the mid-frequency range.
To extract the activation energy or electronic and ionic transport phenomena, EIS spectra in the range of low to mid-high temperature are required. Acquisition of EIS spectra at low frequency (less than 10 Hz) as a function of applied temperature and bias together will increase the time of the experiment. For example, in our previous work, we have shown that the time taken to record a single EIS spectrum from 1 MHz to 300 mHz at a particular applied bias was ∼25 min under the given set of parameters.24 In the case of temperature measurements along with the long data acquisition time, a continuous temperature stabilization process is also challenging. Even after the EIS data acquisition, the selection of appropriate circuits, extraction of circuit elements and analysis of the obtained parameters to extract device or material properties conventionally required time from days to months. In addition, the probability of human error can never be ignored.
To minimize experimental acquisition time, analysis time, and human error, we employed machine learning (ML). Specifically, we trained an ML model to predict EIS curves at different temperatures, reducing the need for extensive EIS measurements. To reduce the analysis time and minimize human error, we again utilized ML to analyse the obtained EIS spectra, extract electrical parameters, and perform the necessary fitting to derive material parameters. The selection of the appropriate circuit for the fitting of EIS using ML been adopted from our previous work.13
Initially, a dataset, consisting of 4648 entries of the EIS spectra of MAPbI3 and MAPbBr3 SCs, was developed. The dataset included four key features: temperature, frequency, Re(Z′), and Img(-Z′′). The data for both the SCs were organized in a way so as to maintain the flow of measurements, reflecting the systematic temperature and frequency variations used to capture the real and imaginary impedance components at each step. Additionally, we analyzed the dataset for null, duplicate, and outlier values. While no null or duplicate entries were detected, outliers were identified using boxplots, as shown in Fig. S2.† We found a great deal of outliers in our data set whose presence, if not handled appropriately could affect the model's performance. To handle the outliers and mitigate the effect of the same on the prediction, we employed three mathematical transformations on the frequency feature: square, square-root and logarithmic. Among these, log transformation proved to be the most effective, which significantly reduces outliers. The details of the same, models and mathematical step followed to handle the outliers are discussed in section 3 of the ESI.†
Here, we have made use of Google Colab for implementing the Python code. From the dataset, three features ‘ionic radius’, ‘temperature’, and ‘frequency’ were selected as the input parameters (X), while two features, ‘Re(Z′)’ and ‘Img(-Z′′)’, were chosen as the output parameters (Y). We used sklearn's train_test_split function to divide the X and Y subsets into training, validation, and test sets. This split ensured that we had separate data for training the model, validating its performance and testing its accuracy. The six algorithms under consideration were then trained and subsequently analysed based on their performance.
The dataset was trained using the abovementioned six algorithms to predict the real ‘Re(Z′)’ and imaginary ‘Img(Z′′)’ parts of EIS based on the input features. For performance examination, we used five performance metrics namely, mean squared error (MSE), mean absolute error (MAE), root mean squared error (RMSE), R2 score and mean absolute percentage error (MAPE). While MAE, MSE, RMSE, and MAPE are categorized as error metrics, the R2 score is regarded as a relative metric. The performance comparison based on three of the above-mentioned error metrics (MAE, MSE, RMSE) on the train data is shown in Fig. 2(a) for selected regression algorithms. It was found that for DT, error values reduced to zero are overfitting, rendering it unsuitable for use. In contrast, the remaining algorithms warrant consideration for performance evaluation on validation data.
Following this, GBR, RF and XGBoost Regression turned out as the three best performing algorithms among others, based on their results on validation data. To further improve the performance of the selected algorithms, we applied hyperparameter tuning on the same, and eventually compared the tuned models’ performance on the test data. Here, we used the GridSearchCV method, which is one of several available tuning techniques. This final review revealed RF to be the best algorithm, outperforming the other two algorithms, prompting us to proceed with this regression method. The RF algorithm generally outperforms others due to its robustness against noise. It builds multiple independent decision trees and averages their outputs, reducing the impact of dataset variations.31 In contrast, GBR and XGBoost Regression are more sensitive to noise as they sequentially correct errors, which can amplify the effects of outliers.32 RF also requires fewer hyperparameters to tune, especially when the data are clean. Its ensemble approach, where multiple trees are trained on random subsets, makes it effective for moderate-sized datasets without overfitting.31,33 Unlike boosting methods optimized for large datasets and parallel processing, RF has lower computational demands, making it ideal for moderate datasets like this.34 The performance comparison of the chosen model based on three performance metrics, MSE, MAE and RMSE, as well as a table representing the tuned parameters of the same, is provided in Fig. S4 and Table S1,† respectively. As mentioned above, we didn't use a subset of the dataset for the selection of the best model. This subset included data at five distinct temperatures: 268 K, 293 K, 298 K, 328 K, and 333 K. This entire dataset was unseen for the selected algorithm and was fully utilized for the prediction tasks. Initially, this small dataset (subset of the dataset) was subjected to a similar feature engineering process as discussed in the above section to make it ready for prediction. The input and output parameters are separated as discussed previously. The tuned RF model, which eventually came out to be the best-performing model as mentioned above, was utilized to predict the output features. The predictions were subsequently scaled back to their original values and compared with the actual data to assess the model's accuracy. The predictions for the other temperatures for both the SCs are shown in Fig. S5.†
To obtain the useful information from the EIS spectra, it is crucial to extract the resistive and capacitive components with the help of an EEC. Conventionally in practice, extraction of the circuit element evolves identification of the EEC followed by simulation of the EEC via software or by running the codes in MATLAB or Excel. Fig. 2(d) and (e) illustrate the fitted Nyquist plot for MAPbBr3 and MAPbI3 SCs at 333 K after adjusting initial parameters to achieve the best fit which are shown in Tables S3 and S4† respectively. Similarly, fitting of Nyquist plots and parameter extraction of MAPbI3 at 268 K, 293 K, 298 K, and 328 K are shown in Fig. S6 and Tables S5–S8.† Here, an iterative fitting process was employed with the help of the developed ML model. The selection of the appropriate EEC among the widely available EECs, frequency range and iteration time is wisely decided by the developed ML model which is discussed in detail in our previous work.13 In the present case, the ML model chosen two RC pairs with series resistance. The extracted electrical parameters were refined to achieve the best possible match between the model and the experimental data for both MAPbBr3 and MAPbI3 SCs.25
The developed ML model discussed in our previous work13 was further upgraded to analyze the extracted electrical parameters of EEC and to calculate the activation energy. The activation energy was calculated using an automated analyzer tool, which processes the circuit elements extracted from the fitted equivalent circuits (ECs) of the EIS spectra. These circuit elements are used to compute activation energy values based on their temperature dependence, following established electrochemical principles. The calculated values were validated against the literature, ensuring accuracy and consistency. The activation energy (Ea) is directly related to the rate of charge transfer within the crystal.35,36 To calculate the activation energy, the low-frequency resistance values (Rct) of both SCs were considered. The charge transfer resistance (Rct) represents resistance to charge migration and its reciprocal (1/Rct) is proportional to the rate of charge transfer across the crystal. The equation used for the calculations is as follows:37
![]() | (1) |
The Arrhenius equation can be written in the logarithmic form to justify this use, as seen below:
![]() | (2) |
As observed from eqn (2), to calculate the activation energy, we plotted ln(1/Rct) obtained from the EIS spectra fitting versus 1000/T (in Kelvin).
Fig. 3 shows the software-generated linear fitting of the Arrhenius plots obtained for MAPbBr3 and MAPbI3 SCs having R2 scores of 0.8485 and 0.6393 with the extracted activation energy values of 0.25 and 0.32 eV respectively. The obtained values of activation energy for both the SCs are the same as the values reported by other authors and in our previous studies.6,11,38,39
![]() | ||
Fig. 3 Arrhenius plot representing the linearity curve with slops derived using the experimental data for (a) MAPbBr3 and (b) MAPbI3, respectively. |
On behalf of all the authors PY confirm that the needed informations and required data are available in the main manuscript and the ESI.† Any additional data to support the objectives can also be provided upon request.
Footnote |
† Electronic supplementary information (ESI) available: Section 1 includes synthesis of MHPSCs and computational analysis aspect. Section 2 includes temperature-dependent EIS spectra of MAPbI3 and MAPbBr3 as a function of frequency. Section 3 shows feature engineering data visualization plots. Section 4 shows training and validation set performance of actual vs. predicted datasets and hyperparameters of model and performance metrics. Section 5 gives information about fitted Nyquist plots and parameter extraction at unseen temperatures. See DOI: https://doi.org/10.1039/d4dt03123g |
This journal is © The Royal Society of Chemistry 2025 |