Machine Learning-Driven Optimization of Perovskite Solar Cell Fabrication

In recent years, perovskite-based solar cells have demonstrated remarkable progress in photovoltaic performance, attracting significant attention due to their tunable bandgap, high carrier mobility, and cost-effective fabrication potential. However, the development of high-efficiency perovskite solar cells often relies on traditional trial-and-error methods for optimizing process parameters, which is time-consuming and resource-intensive. To address this challenge, we propose a machine learning-assisted framework that integrates multiple algorithms to predict and optimize the photovoltaic conversion efficiency of perovskite solar cells. This approach leverages historical experimental data to build a robust predictive model, enabling accelerated discovery of optimal fabrication conditions.

The fabrication of perovskite solar cells involves numerous parameters, such as precursor solution composition, annealing conditions, and purification methods, each influencing the final device performance. Traditional optimization processes require extensive experimentation, leading to prolonged development cycles. By employing machine learning, we can efficiently explore the complex relationships between these parameters and the resulting efficiency of perovskite solar cells. Our work focuses on developing a weighted ensemble model, termed the Perovskite Solar Cell Efficiency Prediction Model (PCEPM), which combines Random Forest (RF), Extreme Gradient Boosting (XGBoost), and Adaptive Boosting (AdaBoost) algorithms. This model not only predicts efficiency with high accuracy but also provides insights into the critical parameters affecting perovskite solar cell performance.

In this study, we collected data from 723 experimental runs, each recording efficiency values under varying process conditions. The features include solvent volumes (e.g., NMP, DMF, DMSO), annealing methods, time ratios, and light intensity, as detailed in Table 1. After preprocessing, which involved categorical encoding and normalization, we trained PCEPM and compared its performance against baseline models. The results demonstrate that PCEPM significantly outperforms individual models, with an RMSE of 0.620, MAE of 0.469, and R² of 0.838 on the test set. Furthermore, SHAP analysis revealed that light intensity, THF volume, and annealing time are among the most influential features, aligning with domain knowledge.

To validate the model, we generated 20 random parameter sets, predicted their efficiencies using PCEPM, and fabricated corresponding perovskite solar cells. The experimental results confirmed the predictions, with the highest efficiency reaching 23.72% and an average prediction error below 1.5%. Characterization techniques, including IV testing, EQE measurements, XRD, PL, UV-Vis, and SEM, validated the quality and performance of the optimized devices. This approach underscores the potential of machine learning in streamlining the development of perovskite solar cells, reducing both time and costs associated with empirical optimization.

Introduction

Perovskite solar cells have emerged as a promising photovoltaic technology due to their rapid efficiency improvements, surpassing 25% in recent years. The ABX₃ crystal structure of perovskite materials, where A is an organic or inorganic cation, B is a metal ion, and X is a halide anion, enables excellent light absorption and charge transport properties. However, the fabrication of high-performance perovskite solar cells is sensitive to process parameters, such as precursor stoichiometry, solvent selection, and thermal treatment. Minor deviations can lead to defects, reduced stability, and lower efficiency, necessitating precise control over these variables.

Conventional optimization methods involve iterative experiments, which are inefficient and often fail to capture complex nonlinear interactions between parameters. Machine learning offers a data-driven alternative by learning patterns from historical data and predicting outcomes for unseen conditions. Previous studies have applied machine learning to predict perovskite formability, stability, and bandgap, but few have focused on efficiency prediction directly tied to fabrication parameters. Our work bridges this gap by developing a specialized model for perovskite solar cell efficiency prediction, incorporating a diverse set of process features.

The core of our methodology lies in an ensemble learning approach, which combines multiple base learners to enhance predictive accuracy and generalization. We selected RF, XGBoost, and AdaBoost for their complementary strengths: RF reduces overfitting through bootstrap aggregation, XGBoost handles complex nonlinearities with gradient boosting, and AdaBoost improves performance by focusing on hard-to-predict samples. The weighted integration of these models mitigates individual weaknesses, resulting in a robust predictor for perovskite solar cell efficiency.

In the following sections, we detail the dataset construction, preprocessing steps, model architecture, and evaluation metrics. We then discuss the experimental validation, highlighting the correlation between predicted and actual efficiencies. The findings demonstrate that machine learning can effectively guide the optimization of perovskite solar cell fabrication, paving the way for more efficient and scalable manufacturing processes.

Dataset and Preprocessing

We compiled a dataset from 723 experimental runs of perovskite solar cell fabrication, each associated with 13 process parameters and the measured photovoltaic conversion efficiency. The parameters encompass solvent volumes, purification methods, annealing conditions, and light intensity, as summarized in Table 1. Categorical features, such as annealing method and purification type, were encoded into numerical values, and all features were normalized to a [0, 1] range to ensure uniform scaling for machine learning algorithms.

Table 1: Process Parameters and Their Ranges in Perovskite Solar Cell Fabrication
Feature Number Feature Name Parameter Range
1 NMP (N-Methylpyrrolidone) / (μL/mL) {0, 30}
2 CY (Cyrene) / (μL/mL) {0, 30}
3 THF (2-Methyltetrahydrofuran) / (μL/mL) {0, 10, 15, 20, 26, 28, 30, 32}
4 CHP (N-Cyclohexyl-2-pyrrolidone) / (μL/mL) {0, 30}
5 DMSO (Dimethyl sulfoxide) / (μL/mL) {47, 63, 84, 93, 115, 125, 140, 165, 180, 200, 215}
6 TMSO (Tetramethylene sulfoxide) / (μL/mL) {0, 15, 31, 57, 65, 78, 93}
7 DMF (N,N-Dimethylformamide) / (μL/mL) {830, 865, 890, 905}
8 RbI:CsI Ratio {0.889, 0.911, 0.956, 1}
9 Purification {PEAICl, PMA4}
10 Ammonium Ion / (μL/mL) {0, 1, 2, 3}
11 Annealing Method {Conventional, Solvent Atmosphere}
12 Annealing Time Ratio {0.167, 0.333, 0.5, 1}
13 Light Intensity / lx [0, 110]

The target variable, photovoltaic conversion efficiency, is a continuous value representing the percentage of incident light converted into electrical energy. The dataset was randomly split into training and testing sets with a 70:30 ratio, ensuring that the model is evaluated on unseen data. Preprocessing steps included handling missing values—though none were present—and applying min-max normalization to each feature. This transformation is crucial for models like XGBoost and AdaBoost, which are sensitive to feature scales.

The distribution of efficiency values across the dataset ranged from 15% to 24%, with a mean of approximately 20.5%. This variability underscores the impact of process parameters on perovskite solar cell performance. For instance, higher light intensity during testing generally correlates with increased efficiency due to enhanced charge carrier generation. Similarly, solvent combinations influence film morphology and crystallinity, directly affecting the device’s electronic properties.

Machine Learning Model Development

Our Perovskite Solar Cell Efficiency Prediction Model (PCEPM) integrates three base learners: Random Forest (RF), Extreme Gradient Boosting (XGBoost), and Adaptive Boosting (AdaBoost). Each algorithm brings unique advantages to the ensemble, as detailed below.

Random Forest (RF)

RF is an ensemble method based on bootstrap aggregation (bagging). It constructs multiple decision trees on random subsets of the data and features, reducing variance and overfitting. The prediction for a sample \( x_i \) is the average of all tree outputs:

$$ \hat{y}_{i}^{RF} = \frac{1}{T} \sum_{t=1}^{T} f_t(x_i) $$

where \( T \) is the number of trees, and \( f_t \) represents the t-th tree. RF also provides feature importance scores based on the mean decrease in impurity, which help identify critical parameters for perovskite solar cell efficiency.

Extreme Gradient Boosting (XGBoost)

XGBoost is a gradient boosting framework that optimizes a differentiable loss function using second-order derivatives. It adds trees sequentially to correct errors from previous iterations, with regularization to prevent overfitting. The objective function for XGBoost is:

$$ \mathcal{L} = \sum_{i=1}^{n} l(y_i, \hat{y}_i) + \sum_{k=1}^{K} \Omega(f_k) $$

where \( l \) is the loss function (e.g., mean squared error), \( \Omega(f_k) \) is the regularization term for the k-th tree, and \( K \) is the total number of trees. XGBoost excels at capturing complex nonlinear relationships, making it suitable for predicting perovskite solar cell efficiency under varying process conditions.

Adaptive Boosting (AdaBoost)

AdaBoost combines weak learners, typically decision stumps, by adjusting sample weights based on previous errors. Misclassified samples receive higher weights in subsequent iterations, forcing the model to focus on hard-to-predict instances. The final prediction is a weighted sum of all weak learners:

$$ \hat{y}_{i}^{Ada} = \sum_{m=1}^{M} \alpha_m h_m(x_i) $$

where \( M \) is the number of weak learners, \( h_m \) is the m-th learner, and \( \alpha_m \) is its weight. AdaBoost enhances model accuracy by reducing bias, particularly beneficial for datasets with noisy or imbalanced features.

Weighted Ensemble Strategy

PCEPM combines the predictions of RF, XGBoost, and AdaBoost using a weighted average. For a sample \( x_i \), the final prediction \( \hat{y}_i \) is computed as:

$$ \hat{y}_i = w_{RF} \cdot \hat{y}_{i}^{RF} + w_{XGB} \cdot \hat{y}_{i}^{XGB} + w_{Ada} \cdot \hat{y}_{i}^{Ada} $$

where \( w_{RF} \), \( w_{XGB} \), and \( w_{Ada} \) are weights assigned to each model, satisfying \( \sum w_j = 1 \). The weights are optimized during training via cross-validation to minimize prediction error. This ensemble approach leverages the strengths of each algorithm, resulting in a more accurate and stable predictor for perovskite solar cell efficiency.

Evaluation Metrics

We assessed model performance using three metrics: Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and Coefficient of Determination (R²). For n samples, with true values \( y_i \) and predictions \( \hat{y}_i \), these are defined as:

$$ \text{RMSE} = \sqrt{\frac{1}{n} \sum_{i=1}^{n} (y_i – \hat{y}_i)^2} $$

$$ \text{MAE} = \frac{1}{n} \sum_{i=1}^{n} |y_i – \hat{y}_i| $$

$$ R^2 = 1 – \frac{\sum_{i=1}^{n} (y_i – \hat{y}_i)^2}{\sum_{i=1}^{n} (y_i – \bar{y})^2} $$

where \( \bar{y} \) is the mean of the true values. Lower RMSE and MAE indicate better accuracy, while R² closer to 1 signifies superior explanatory power.

Results and Discussion

We trained PCEPM and baseline models—Linear Regression (LR), Support Vector Regression with RBF kernel (SVR-RBF), RF, XGBoost, and AdaBoost—on the processed dataset. Table 2 compares their performance on the training and test sets. PCEPM achieved the best test results, with an RMSE of 0.620, MAE of 0.469, and R² of 0.838, demonstrating its robustness against overfitting compared to individual models.

Table 2: Performance Comparison of Machine Learning Models on Training and Test Datasets
Model Training RMSE Training MAE Training R² Test RMSE Test MAE Test R²
LR 1.158 0.729 0.413 0.993 0.764 0.585
SVR-RBF 1.079 0.564 0.490 0.788 0.552 0.738
RF 0.498 0.247 0.891 0.636 0.478 0.830
XGBoost 0.166 0.126 0.988 0.652 0.481 0.821
AdaBoost 0.227 0.201 0.977 0.669 0.505 0.812
PCEPM 0.250 0.188 0.973 0.620 0.469 0.838

Notably, XGBoost showed near-perfect training performance but higher test errors, indicating overfitting. In contrast, PCEPM’s ensemble approach balanced bias and variance, leading to superior generalization. The scatter plots in Figure 1 illustrate the prediction accuracy across models, with PCEPM exhibiting the closest alignment between predicted and actual efficiencies for perovskite solar cells.

Feature Importance Analysis

We employed SHAP (SHapley Additive exPlanations) to interpret PCEPM’s predictions and quantify feature contributions. Figure 2(a) ranks features by their mean absolute SHAP values, revealing that light intensity, THF volume, and annealing time ratio have the highest impact on perovskite solar cell efficiency. This aligns with physical principles: light intensity directly influences charge generation, while THF and annealing conditions affect crystal growth and film quality.

Figure 2(b) displays the SHAP summary plot, where each point represents a sample’s feature value (color) and its effect on prediction (horizontal position). For instance, high light intensity (red points) consistently increases predicted efficiency, whereas low values (blue) decrease it. Similarly, THF and DMSO show mixed effects, suggesting optimal ranges exist for maximizing perovskite solar cell performance. These insights guide parameter tuning, emphasizing the importance of controlling solvent composition and thermal treatment during fabrication.

Experimental Validation

To validate PCEPM, we generated 20 random parameter sets within the allowable ranges and predicted their efficiencies. We then fabricated perovskite solar cells under these conditions and measured actual efficiencies. The results, plotted in Figure 3, show a strong correlation between predicted and experimental values, with an average error of 1.5%. The highest efficiency achieved was 23.72%, demonstrating the model’s practical utility in optimizing perovskite solar cell fabrication.

We further characterized the top-performing device (23.72% efficiency) using multiple techniques. Current-voltage (IV) testing yielded a high fill factor and short-circuit current, confirming excellent charge transport. External quantum efficiency (EQE) measurements showed a broad spectral response, with an integrated current density of 23.36 mA/cm². X-ray diffraction (XRD) patterns indicated predominant (110) orientation without impurities, signifying high crystallinity. Photoluminescence (PL) spectra exhibited strong peak intensity, suggesting low defect density, and UV-Vis absorption confirmed efficient light harvesting across visible wavelengths.

Scanning electron microscopy (SEM) images at various magnifications (Figure 4) revealed a uniform, pinhole-free perovskite layer with well-defined grain boundaries. This morphology minimizes recombination losses and enhances charge collection, contributing to the high efficiency of the perovskite solar cell. The consistency between predictions and experimental outcomes underscores the reliability of machine learning in accelerating perovskite solar cell development.

Conclusion

In this work, we developed a machine learning-based framework to optimize the fabrication process of perovskite solar cells. The PCEPM model, integrating RF, XGBoost, and AdaBoost, achieved high predictive accuracy for photovoltaic conversion efficiency, with an RMSE of 0.620 and R² of 0.838 on test data. SHAP analysis provided interpretable insights, highlighting light intensity, solvent volumes, and annealing parameters as critical factors. Experimental validation confirmed the model’s effectiveness, leading to a perovskite solar cell with 23.72% efficiency.

This approach significantly reduces the time and resources required for empirical optimization, enabling rapid screening of promising parameter combinations. Future work will expand the dataset to include stability metrics and environmental factors, further enhancing the model’s applicability. By leveraging machine learning, we can accelerate the commercialization of perovskite solar cells, contributing to sustainable energy solutions.

The success of PCEPM demonstrates the potential of ensemble methods in materials science, particularly for complex systems like perovskite solar cells. As data availability grows, machine learning will play an increasingly vital role in designing and optimizing next-generation photovoltaic devices.

Scroll to Top