Abstract
This study examines the time-dependent degradation of dye-sensitized solar cells (DSSCs) by systematically investigating several critical parameters, including TiO2 thickness, porosity, dye concentration, and iodine-based electrolyte concentration. We developed a novel figure of merit (FOM) to quantify the degradation rates, utilizing a finite element model (FEM) in COMSOL to simulate performance over time. 400 DSSC samples were fabricated, resulting in a comprehensive dataset comprising over 228,000 data points derived from experimental results and simulations. The findings reveal that PCE declines significantly over time, with an average initial efficiency of 4.0% for the DSSCs, dropping to approximately 0.5% after 360 h. The study utilizes Long Short-Term Memory (LSTM) models for training and validation, significantly enhancing the prediction of degradation behavior and yielding a correlation coefficient (R²) of 0.92 when comparing predicted vs. observed efficiencies. This predictive capacity indicates the reliability of the LSTM model in assessing performance loss in DSSCs. The research underscores the complex interactions between the studied parameters and their cumulative effect on device longevity. Our results suggest that optimizing these areas can lead to more reliable DSSC designs. The novel degradation model and the established FOM facilitate future work in analyzing other solar cell technologies, particularly extending this methodology to emerging perovskite and organic solar cells for improved efficiency and durability in renewable energy applications.
Supplementary Information
The online version contains supplementary material available at 10.1038/s41598-025-05536-6.
Keywords: Dye-sensitized solar cells, Degradation, Finite element model, Long short-term memory, Predictive modeling
Subject terms: Electrical and electronic engineering, Solar fuels, Software
Introduction
Dye-sensitized solar cells (DSSCs) have emerged as a promising technology for energy harvesting due to their cost-effectiveness and ease of fabrication1. However, the long-term performance and stability of DSSCs are crucial factors that significantly impact their practical application and commercial viability2,3. One of the key challenges facing DSSCs is the degradation phenomenon, which manifests as a decline in cell performance over time4. This degradation can be attributed to various factors, including environmental conditions, material properties, and operational parameters2,5–7. The degradation processes in DSSCs can lead to reduced light harvesting efficiency, decreased charge transport, increased recombination losses, and altered interface properties, all of which contribute to a decline in cell output6,7. Identifying and quantifying the effects of degradation on DSSC performance is crucial for developing strategies to mitigate degradation and improve cell longevity.
The utilization of machine learning models in the context of Dye-Sensitized Solar Cells represents a cutting-edge approach to understanding and optimizing the performance of these renewable energy devices8. In DSSCs, machine learning models optimize material properties, design efficient cell architectures, and enhance overall performance9. In our previous attempt in10, we reported the capability of different machine learning algorithms in optimizing the design parameters of DSSCs, seeking maximum power conversion efficiency. Alternatively, the involvement of machine learning methods in predicting the lifetime of DSSCs was rarely discussed in the literature5,7–13.
Two types of stability are studied in DSSCs: intrinsic stability and extrinsic stability5,14. Intrinsic stability studies the effect of changing the design parameters, dye-TiO2 structure, and cell architecture on the cell stability, while extrinsic studies the degradation that occurs due to thermal, moisture, structural phase, and light exposure causes. Publications tackle the stability optimization using different stability metrics; Some publications only predict T80, which is the time the cell took to decay to 80% of its initial PCE, while others predict the entire aging curve of the PCE7. A publication made by P. Graniero et al.7 tried to find the best Figure of Merit (FOM) to describe the perovskite solar cell (PSC) degradation when building a Machine learning (ML) model. To test the adequacy of the T80 metric as a singular stability metric of PSCs compared to using the entire decay curve of the cell, the authors used an open-access database for perovskite solar cells14,15 that provide T80 values for a significant variation of PSCs. The authors also collected their own dataset with time series PCE decay data from more than 1000 PSCs. This second dataset has fewer data points, but the data quality is better than the open-access database due to the custom-built testing setup and consistent data. After studying the dataset, the authors found that PSCs decay is non-uniform. Because the decay curves of different PSCs do not correlate with each other, the T80 metric is not sufficient to represent the stability of PSCs. T80 is a commonly acceptable stability metric to reduce the aging time series for solar devices that have uniform degradation curves, like silicon-based solar cells. T80 is considered less sufficient if the degradation curve of the solar cell is not uniform. The authors emphasized the need for a new Figure of Merit (FOM) that adequately represents the decay of PSCs instead of T80, or the entire degradation curve of the cell should be used.
In this context, the present study investigates the degradation mechanisms in DSSCs using advanced machine learning algorithms. By leveraging the power of artificial intelligence and data analytics, we analyzed and predicted the degradation patterns in DSSCs, gaining insights into the factors influencing cell performance over time. By training machine learning algorithms on large datasets of DSSC parameters, experimental results, and environmental conditions, researchers can uncover hidden correlations, optimize operational parameters, and develop predictive models to anticipate degradation effects and improve cell efficiency. Furthermore, machine learning techniques enable the rapid screening of materials, the identification of key performance indicators, and discovering novel strategies for mitigating degradation in DSSCs. Through the integration of machine learning models, DSSC research can benefit from data-driven insights, predictive analytics, and optimized design strategies, ultimately advancing the development and deployment of efficient and reliable DSSC technology in the renewable energy sector. Through a comprehensive analysis of degradation-induced changes in DSSC parameters, such as efficiency, fill factor and open-circuit voltage, this research seeks to unravel the intricate relationship between degradation processes and cell performance. By elucidating the impact of degradation on DSSCs, we aim to provide valuable insights for optimizing cell design, materials selection, and operational conditions to enhance the long-term stability and efficiency of DSSCs.
Experimental work
This investigation focused on incorporating Dye-Sensitized Solar Cells through distinct configurations, as depicted in Fig. 1. The DSSC setup (Fig. 1) followed a well-established fabrication process outlined in previous studies1,10,16,17, utilizing symmetric Fluorine-doped Tin Oxide (FTO) coatings on BK7 glass substrates, a mesoporous TiO2 layer, and the commercial N719 dye. TiO2 films composed of nanoparticles in the range from 10 to 30 nm can be described by a so-called roughness factor (setting the actual surface area against the apparent one) as high as 1000. Therefore, the amount of dye adsorbed in a DSSC is very high due to the enormously large accessible internal surface when the mesoporous TiO2 (mpTiO2) is used. An absorption capability of the dye to near 100% over a wide range of the visible spectral region is achieved. By virtue of comparison, the adsorbed dyes on the surface of single crystals and poly-crystal materials are quite small, causing only about 1% absorption even at the peak wavelength. In addition, the energy band gap of TiO2 is in the UV range, 3.2 eV to 3.4 eV, making it appropriate as a front layer in DSSCs, with minimal parasitic absorption in visible and NIR ranges. The TiO2 layer was applied using a meticulously controlled screen-printing apparatus with a glass rod1. To prepare a TiO2 film on a FTO coated glass substrate, a volume of 250 µL of precursor solution was applied to 1 × 5 cm² substrates positioned in a spin coater (Spin150, SPS-Europe)8. The precursor solution was formulated at room temperature by combining titanium isopropoxide with ethanol and acetic acid, as described in18. Herein the thickness of the TiO2 layer can be controlled based on dilution percentage in the suspension, see our previous work in18. For deposition, a low spin-coating speed of 500 rpm was employed for 10 s to facilitate an even distribution of the solution over the substrate, followed by a higher speed of 3000 rpm for 60 s, with a constant acceleration of 1000 rpm/s. Subsequently, the samples were subjected to heating in an oven at 120 °C for 60 min. This preparation method resulted in films exhibiting satisfactory homogeneity. Consequently, an iodine-based electrolyte is injected16. At the device level, an LED solar simulator was employed to assess the fabricated cells’ power conversion efficiency (PCE), as described in19. Given the study’s emphasis on studying the solar cells’ time degradation, the experimental setup was tailored to evaluate PCE performance every 12 h.
Fig. 1.

The basic model for DSSC.
As illustrated earlier, the main objective of this study is to explore the in-depth analysis of the lifetime performance degradation of the DSSC. In (DSSCs, fundamental chemical and physical degradation can significantly impact performance and longevity, primarily through processes such as electrolyte leakage and dye desorption. Chemical degradation often begins with the electrolyte, which can leak due to poor sealing or material failure, leading to a reduction in ionic conductivity and overall efficiency. Additionally, the interactions between the dye and the electrolyte may result in chemical reaction products that destabilize the dye, causing its desorption from the semiconductor surface and reducing the light-harvesting capability of the cell. Physical breakdown may also occur because of thermal stress or mechanical strain, leading to the delamination of interfaces between layers. Moreover, the formation of reactive species, such as radicals or oxidative byproducts in the electrolyte, can further contribute to the deterioration of both the dye and the semiconductor material, ultimately resulting in decreased photovoltaic performance. Collectively, these degradation mechanisms compromise the charge transport, recombination dynamics, stability and PCE of DSSCs. Herein, we link the PCE time degradation with the design parameters of the core active layer of the mesoporous TiO2 layer. Typically, we consider the mesoporous TiO2 layer thickness and porosity the key parameters impacting the cell PCE. The thickness is estimated based on the Fabry–Pérot oscillation as reported in1,17, while physiochemical measurements postprocessing are utilized for porosity estimation14. Detailed analysis is presented in Sects. 3 and 5.
DSSC degradation optoelectronic modeling
In this study, we employ COMSOL Multiphysics to develop a comprehensive optoelectronic model for simulating the performance and degradation of DSSCs. The model facilitates a detailed analysis of the interactions within the device, particularly focusing on the mesoporous TiO2 layer and the electrolyte layer, which are critical components influencing the overall efficiency and stability of DSSCs. All material parameters are listed in Table 1. During this study, we consider the TiO2-N719 dye as an effective medium applying the effective medium theory defined as20:
| 1 |
where
is the effective parameter,
is representing the medium,
is the inclusion, and
is the volume fraction of the inclusion21. The optoelectronic model is structured to incorporate the essential physical phenomena governing the operation of DSSCs. The primary parameters considered in our simulations include the thickness and porosity of the mesoporous TiO2 layer, the dye absorption characteristics, and the electrolyte properties. The thickness of the TiO2 layer is estimated using the principles of Fabry–Pérot oscillation, which allows for precise control over light interference effects within the layer22. SEM measurements assess the porosity, providing critical insights into the material’s structural characteristics that influence charge transport and recombination dynamics14. On the other hand, the FEM involves primary boundary conditions that define the interfaces between different materials. At the interface between the FTO and the TiO2 layer, a boundary condition reflects the charge transfer and potentially a variable concentration of holes/electrons. The TiO2-dye is treated as an effective single layer. For the TiO2/electrolyte interface, diffusion of ions and the concentration of the redox couple is specified, alongside the equilibrium potential to describe the electrochemical processes. The outer boundaries simulate the incident light, typically treated as a boundary condition with gaussian distribution representing solar irradiation at AM1.5G. Additionally, thermal boundary conditions are utilized to account for heat exchange with the environment.
Table 1.
DSSC solar cells material parameters.
| Parameters | FTO | N719 dye |
-dye effective layer |
(at 55% porosity) |
Electrolyte |
|---|---|---|---|---|---|
| Thickness (µm) | 550 nm* | NA | 1–5 μm** | 1.7 μm | 33 μm [16] |
| Band gap energy Eg (eV) | 3.5 eV23 | 2.33 eV [24] | 2.4 eV −3.2 eV** | 3.4 eV [25] | 3.6 eV [16] |
| Electron affinity χ (eV) | −4.7 eV25 | −5.34 eV [24] | 4.6 eV- 4.1 eV** | −4.1 eV [25] | 3.8 eV[16] |
| Relative permittivity | 2.13726 | NA | 9 [22] | 9 [22] | 10.7 [27] |
| Effective conduction band density Nc (cm−3) | 2.2 × 1018 23 | NA | 2.2 × 1018 [23] | 2.2 × 1018 [23] | 0.8 × 1018 [27] |
| Effective valance band density Nv (cm−3) | 1.8 × 101923 | NA | 1.0 × 1019 [23] | 1.0 × 1019 [23] | 1.0 × 1019 [27] |
| Electron mobility µn (cm2 V−1 s−1) | 20 23 | NA | 20 [23] | 20 [23] | 0.0013 [27] |
| Hole mobility µp (cm2 V−1 s−1) | 10 23 | NA | 10 [23] | 10 [23] | 12 [27] |
Surface resistance (Ω/c ) |
7 |
NA | 1729 | 1729 | NA |
| Defect density Nt (cm−3) | NA | NA | 1.0 × 1015 [23] | 1.0 × 1015 [23] | 1.0 × 1015 |
*Commercial product (735175-Sigma-Aldrich). ** Effective parameter.
The model simulates the time-dependent degradation of the DSSC performance as a negative exponential function, capturing the gradual decline in efficiency over time. This new FOM degradation model is applied to both the dye-TiO2 layer, as given by:
| 2 |
where
is the diffusion coefficient for the dye,
is the effective thickness of the dye-TiO2 structure, which is used to simulate the time-dependent degradation effect.
is the physical thickness, and
,
, and
are the degradation coefficients representing the time degradation in the dye, to be calculated through the trained model using the experimentally measured data, see Sect. 5. The same procedure is applied for the electrolyte layer through the formula:
| 3 |
where
is the effective thickness of the electrolyte used to simulate the time-dependent degradation effect.
is the physical thickness, and
, and
are the degradation coefficients representing the time degradation in the electrolyte, calculated through utilizing experimental data fitting. These two functions reflect the complex interactions and aging mechanisms that occur during the operational lifespan of the solar cell. Each degradation scenario is characterized by a set of coefficients that quantifies the rate of performance loss, which is extracted by fitting the simulation data to experimental results. This fitting process is essential for ensuring that the model accurately reflects real-world behavior and provides a reliable basis for further analysis.
To implement the degradation model, we simulate multiple configurations of DSSCs, specifically using 40 sets of samples, each of 10, with varying TiO2 layer thicknesses and dye absorption rates. Each configuration is subjected to the same operational conditions to ensure consistency in the degradation analysis. To ensure convergence in the COMSOL simulation, it is crucial to use a well-defined mesh that can accurately capture the geometrical features of the DSSC while remaining computationally efficient. A finer mesh is employed in regions where steep gradients are expected, such as at interfaces, while a coarser mesh is utilized in bulk areas. The results from these simulations yield a dataset that captures the relationship between design parameters and time-dependent performance degradation. The time-stepping strategy involves adaptive time steps that allow the solver to adjust to the dynamics of electron and ion movement within the system. In addition, appropriate solver settings are integrated, typically, the nonlinear solver tolerance and maximum iterations, to enhance convergence. The degradation coefficients obtained from the simulations are crucial for training the machine learning model described in the subsequent section. We can refine our understanding of the degradation mechanisms at play by correlating the simulated performance data with experimental observations. The machine learning model utilizes this data to identify hidden patterns and optimize the design parameters, contributing to enhanced stability and efficiency in DSSCs. The model is validated by comparing the simulated degradation patterns with experimental data obtained from the 40 DSSC patches. This validation process is essential for confirming the model’s accuracy and ensuring that it can reliably predict the performance of DSSCs under varying operational conditions.
Machine learning algorithm
Due to the choice of predicting the entire degradation curve of DSSCs, Recurrent Neural Networks (RNNs) are a perfect fit to predict sequential data and time series. RNNs represent a powerful class of deep learning models designed to process sequential data by capturing temporal dependencies. Unlike traditional feedforward neural networks that treat inputs independently, RNNs incorporate internal memory, allowing them to consider input sequences’ order and context. This is achieved through a recurrent loop that applies the same operation to each sequence element, where the current computation is influenced by both the current input and the outputs of previous computations. This recurrent nature enables RNNs to effectively model and predict data with sequential characteristics, such as PCE decay over time, to measure solar cell stability. However, vanilla RNNs can suffer from the limitation of short-term memory, restricting their ability to retain information over long sequences28. RNNs have multiple variations that try to mitigate this issue, with the most popular being Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) models.
LSTM networks represent an advanced variant of recurrent neural networks (RNNs) designed to overcome the limitation of capturing long-term memory. LSTMs have gained widespread adoption in the deep learning community for their superior ability to retain and utilize information over extended sequences compared to standard RNNs. In an LSTM architecture, the current input and the output from the previous step are fed into the LSTM unit, generating an output propagated to the next step. The final hidden state of the last time step, sometimes combined with all hidden states, is commonly utilized for prediction tasks. The core innovation of LSTMs lies in their gating mechanism, which consists of three distinct gates: the input gate, the forget gate, and the output gate. These gates regulate the flow of information within the LSTM unit. Specifically, the input gate determines how to update the internal cell state based on the current input and previous state. The forget gate controls how much of the previous cell state should be retained or forgotten. Finally, the output gate modulates the influence of the cell state on the overall output. This gating architecture enables LSTMs to selectively retain and discard information from the internal cell state, allowing them to capture long-term memory more effectively than standard RNNs. LSTMs have proven successful in various sequential and time-series tasks28.
The Gated Recurrent Unit (GRU) represents another variant of RNN architecture that addresses the shortcomings of capturing long-term memory. Proposed as a simpler alternative to Long Short-Term Memory (LSTM) networks, GRUs combine the input and forget gates of LSTMs into a single update gate, resulting in a more streamlined design. While slightly simpler in structure compared to LSTMs, this gate reduction results in fewer matrix multiplications, leading to time savings without compromising performance. However, empirical research indicates that this advantage of GRU is evident primarily in situations involving lengthy sequences and small datasets. In contrast, in various scenarios, the performance decline of GRU compared to LSTM is more pronounced29.
Long Short-Term Memory was selected to be the model used to predict the degradation curve of the cells because the model was designed with a variable number of input design parameters and output sequence length in mind, see Fig. 2. The large number of inputs necessitates many data points to be sufficient for training. This makes LSTM the preferred model by sacrificing the computational cost for a more performant model. After trying various LSTM models, the most performant model with the highest accuracy and less complexity was chosen. The model has five layers: an input layer, three hidden layers, and an output layer. The input and output layers are coded to match the provided dataset number of input parameters and the length of the output series. The three hidden layers are LSTM layers with decreasing units in each LSTM layer (128, 64, 32). This architecture allows the model to learn hierarchical features, with the first layer capturing more complex patterns and the subsequent layers focusing on more specific details. The LSTM layers use the ReLU (Rectified Linear Unit) activation function that helps the model handle non-linearity with higher accuracy.
Fig. 2.
The basic model for the Long Short-Term Memory machine learning algorithm.
Results and discussion
In this section, all the results extracted from the experimental analysis, simulation, and ML model are presented. Firstly, the optoelectronic model used in extracting the degradation coefficient is trained and validated agonist experimental data. Consequently, the machine learning model utilized for cell performance prediction is demonstrated.
Optoelectronic degradation model validation
Before investigating the tome-dependent degradation of the DSSCs explored in the current study, we initially characterized TiO2 thin films, deposited on bk7 microscopic glass, to verify the appropriate formation of the layer, as well as to capture piezochemical parameters, typically porosity. FT-IR, and XRD data for thin film of TiO2 is displayed in Fig. 3. The FT-IR, and XRD patterns distinct peaks were observed at specific 2θ values, namely 25.2°, 37.6°, 47.9°, 53.7°, 54.8°, 62.6 °, and 74.8°. These peaks were assigned to the crystallographic planes (101), (004), (200), (105), (211), (204), and (215) of anatase TiO2, respectively30. It is worth highlighting that the porosity of the examined samples was investigated using our devolved model in31. Herein, the model utilizes image postprocessing mechanisms to extract the occupied area concerning the air gap to estimate a rough 2D porosity. Such porosity is a valuable indicator of the air gaps that the dye can occupy. An example of samples of various porosity is demonstrated in Fig. 4. While utilizing the data extracted from the SEM measurements to scale up to device level analysis, and to validate the proposed numerical model, the PCE of the DSSCs under a porosity of 55% were experimentally calculated and plotted against the simulation results outputted from COMSOL, see Fig. 5. The results recorded an increasing trend with saturation behavior, with relatively thicker layers, due to the optical absorption saturation associated with the pours size and the N719 absorption capabilities. Additionally, the recorded results in Fig. 5 approves the FEM model effectiveness to simulate the DSSC performance with root mean-square error (RMSE) of 2.19%, indicating the deviation between the simulation results and the experimentally measured PCEs.
Fig. 3.
(a) FT-IR measurement for bare TiO2. (b) In the XRD pattern of TiO2, distinct peaks were observed at specific 2θ values, namely 25.2°, 37.6°, 47.9°, 53.7°, 54.8°, 62.6 °, and 74.8°. These peaks were assigned to the crystallographic planes (101), (004), (200), (105), (211), (204), and (215) of anatase TiO2, respectively.
Fig. 4.
SEM measurements for TiO2 samples on FTO coated glass typically used in DSSC fabrication with variation in porosity, given as: (a) 45%, (b) 55%, (c) 65%, and (d) 70%.
Fig. 5.

Experimentally calculated PCE of DSSCs under various TiO2 layer thicknesses, ranging from 0.1 μm to 7 μm, against FEM simulation results. Error bars are associated to experimental results to indicate the variations observed across each set of samples.
For understanding the ageing behavior of DSSCs, this section presents a detailed analysis of the variation in power conversion efficiency of dye-sensitized solar cells over time, measured at 12-hour intervals. The impact of TiO2 thickness on the PCE is illustrated in Fig. 6-(a). Two thicknesses are examined: 1 μm and 2 μm, see Table 2. The PCE shows a declining trend over time for both thicknesses, with the 1 μm TiO2 layer (blue circles) exhibiting a lower initial efficiency compared to the 2 μm layer (orange circles). All electrical output parameters are listed in Table 3, where the error bar reflects the variation of the 10 samples per set. However, the degradation rate of the 1 μm layer appears to be steeper, leading to a more rapid decline in efficiency. Data fitting lines extracted from the ML model indicate that while the initial performance of the thinner layer is lower, its long-term stability may be compromised compared to the thicker layer, which demonstrates a slower degradation rate, as indicated in Table 4. Another interesting feature, especially with a thicker TiO2 layer, is related to a transient jump in PCE, mainly during the first time step, concerning the initial PCE. We can attribute such performance to the adsorption of the dye during the first 12 h of cell operation, which impacted the absorption capability of the cell in the short term. We used
in Eq. (2) to express such an effect mathematically.
Fig. 6.
The study investigates the influence of several key parameters: (a) TiO2 thickness, (b) porosity of the TiO2 layer, (c) dye concentration using N719 dye, and (d) iodine-based electrolyte concentration. The provided figures illustrate the results, showing how each variable impacts the PCE degradation of the cells. Error bars are associated to experimental results to indicate the variations observed across each set of samples.
Table 2.
Input design parameters for five samples output 40 set experimentally investigated in this study.
| Sample set # | TiO2 thickness (µm) | TiO2 porosity (%) | Dye concentration (mmol/cm2) | Electrolyte concentration (mol/L) |
|---|---|---|---|---|
| 1 | 1 μm | 55% | 0.8 mmol/cm2 | 0.4 mol/L |
| 7 | 2 μm | 55% | 0.8 mmol/cm2 | 0.4 mol/L |
| 23 | 1 μm | 65% | 0.8 mmol/cm2 | 0.4 mol/L |
| 35 | 1 μm | 55% | 1.0 mmol/cm2 | 0.4 mol/L |
| 40 | 1 μm | 55% | 0.8 mmol/cm2 | 0.5 mol/L |
Table 3.
Output electrical parameters for five samples output 40 sets experimentally investigated in this study.
| Sample set # |
(V) |
(mA/cm2) |
FF (%) | PCE (%) |
|---|---|---|---|---|
| 1 | 1.15 ± 2.2% | 5.09 ± 3.2% | 73.49 ± 2.7% | 4.30 ± 2.9% |
| 7 | 1.15 ± 2.6% | 5.01 ± 2.3% | 73.34 ± 2.5% | 4.25 ± 2.5% |
| 23 | 1.15 ± 2.7% | 5.22 ± 3.1% | 72.88 ± 2.8% | 4.48 ± 2.5% |
| 35 | 1.21 ± 2.1% | 6.39 ± 2.8% | 69.70 ± 2.5% | 5.41 ± 2.2% |
| 40 | 1.18 ± 2.2% | 6.09 ± 2.9% | 69.77 ± 2.6% | 4.90 ± 2.3% |
Table 4.
Extracted degradation coefficients for five samples output 40 set experimentally investigated in this study.
| Sample set # |
|
(hour)−1
|
(hour)−1
|
(hour)−1
|
(hour)−1
|
(hour)−1
|
(hour)−1
|
(hour) |
|---|---|---|---|---|---|---|---|---|
| 1 | 1.0 × 10⁻⁶ | 0.05 | 0.03 | 0.02 | 0.04 | 0.02 | 0.01 | 198 |
| 7 | 1.2 × 10⁻⁶ | 0.06 | 0.04 | 0.03 | 0.05 | 0.03 | 0.02 | 212 |
| 23 | 0.7 × 10⁻⁶ | 0.07 | 0.05 | 0.04 | 0.06 | 0.04 | 0.03 | 223 |
| 35 | 2.0 × 10⁻⁶ | 0.08 | 0.05 | 0.05 | 0.07 | 0.05 | 0.04 | 236 |
| 40 | 1.7 × 10⁻⁶ | 0.09 | 0.06 | 0.06 | 0.08 | 0.06 | 0.05 | 214 |
Figure 5-(b) presents the results of varying the porosity of the TiO2 layer, specifically at 55% and 65% porosity levels. The PCE trends reveal that both porosity levels initially exhibit similar efficiencies; however, the 65% porosity (orange circles) shows a more pronounced decline over time compared to the 55% porosity (blue circles). The data fitting curves support this observation, indicating that while higher porosity may enhance light absorption and charge transport initially, it also accelerates degradation processes, possibly due to increased susceptibility to environmental factors. This insight underscores the importance of optimizing porosity to balance performance and stability, see Table 4.
In Fig. 6-(c), the influence of dye concentration on PCE is analyzed, comparing concentrations of 0.08 mmol/cm² and 0.10 mmol/cm². The results indicate that the higher dye concentration (orange circles) initially leads to a greater PCE than the lower concentration (blue circles). However, the degradation pattern reveals that the 0.08 mmol/cm² dye concentration maintains a more stable efficiency over time, as evidenced by the data fitting lines. This suggests that while higher dye concentrations can enhance initial performance, they may also contribute to faster degradation, highlighting the need for careful optimization of dye loading to achieve long-term stability.
Finally, panel Fig. 5-(d) examines the effect of iodine-based electrolyte concentration, comparing 0.4 mol/L and 0.5 mol/L. The PCE for both concentrations decline over time, with the 0.5 mol/L electrolyte (orange circles) initially providing higher efficiency than the 0.4 mol/L electrolyte (blue circles) because of higher carrier mobility. However, the degradation rate for the 0.5 mol/L electrolyte appears to be more rapid, as indicated by the steepness of the decline in efficiency, see coefficients in Table 4. The data fitting curves reinforce this observation, suggesting that higher electrolyte concentrations can enhance ionic conductivity, and initial performance may lead to increased degradation rates, potentially due to greater ion migration and associated side reactions.
The analysis of PCE variation in DSSCs over time reveals critical insights into how TiO2 thickness, porosity, dye concentration, and electrolyte concentration influence solar cells’ initial performance and long-term stability. All previously reported literature were mainly used
indicator to assess the ageing performance of solar cells in general. The
is defined as the time the cell took to decay to 80% of its initial PCE., cf. Table 4. Although
is a generic parameter that can be utilized to demonstrate the degradation profile, still it is limited in giving a clear depth on the degradation trends or the weighting effect for each individual degradation contributor. We propose that our newly developed Figure of Merit, as illustrated by the coefficients presented in Table 4, has the potential to significantly advance the research community’s understanding of the degradation signatures associated with dye-sensitized solar cells. These findings emphasize the complexity of optimizing DSSC parameters for enhanced efficiency and durability, providing a foundation for the next stage in this research to improve the design and operational strategies for dye-sensitized solar cells. As indicated in the next section, integrating these insights with machine learning models can further enhance our understanding of degradation mechanisms, ultimately contributing to the advancement of reliable and efficient renewable energy technologies.
Machine learning algorithm training and validation
With 400 experientially fabricated cells and the optoelectronic time-dependent model described in Sect. 3, we have collected a dataset of 40,000 samples providing more than 228,000 points while considering around 57-time steps. The dataset underwent a rigorous preprocessing phase to meticulously shape it into the requisite format for the Long Short-Term Memory model, ensuring that the input and output columns were appropriately segregated. To ensure the integrity and neutrality of our dataset, we implemented a comprehensive cleaning and preprocessing phase. This process was essential to eliminate any potential biases that could arise from outliers or inconsistencies in the data. To effectively clean the dataset, a series of preprocessing steps including removing duplicates to ensure each sample is unique, handling missing values through imputation or removal to avoid skewed results, standardizing the data to bring all features onto a similar scale, and filtering out outliers to prevent distortion in model training were conducted. Additionally, we validate the data types and formats of each column, ensuring they are consistent and appropriate for analysis, which will help maintain the neutrality of the dataset and improve the reliability of the subsequent model performance. This crucial step laid the foundation for the subsequent model training and evaluation stages.
Following preprocessing, the dataset was partitioned into three distinct sections—training, testing, and validation—observing a distribution ratio of 70% for training, 20% for testing, and 10% for validation. This stratified division facilitated robust model training, allowing reliable performance assessment of unseen data. The training commenced by feeding the prepared data into the LSTM model, initiating the iterative learning process to optimize model performance. Post-training, the validation step emerged as a pivotal checkpoint to validate the model’s efficacy and generalization capabilities. Upon meticulous tuning and refinement, the model exhibited an impressive accuracy rate of 99%, see Fig. 7, accompanied by a remarkably low RMSE of 0.0009335%, and Mean Absolute Error (MAE) for the LSTM algorithm is approximately 0.0007468%. on the validation dataset. This exceptional performance can be attributed to the inherent near-linear relationship between the model’s input variables and the output time series, underscoring the model’s adeptness at capturing and extrapolating patterns within the data, thereby yielding highly accurate predictions, see Fig. 7-(c), and (d).
Fig. 7.
The LSTM training and validation (a) losses, (b) accuracy, and for prediction outside the range (c) losses, and (d) accuracy.
In Table 5, LSTM is compared against various, ML algorithms in terms of both accuracy and computational time. For faire evaluation, all the models were operated using our lab workstation. The computational unit is a 2x Xeon Gold 6240 2.6 GHz processor, with 36 cores and 24 MB. cache, each with 32 GB RAM, supported by 2 × 480 GB SSD HD. Based on the data presented in Table 5, LSTM model displays the highest accuracy of 99.01% among all the models evaluated. In terms of computational efficiency, LSTM also shows a relatively low computational time of 255 s, which is faster than several other algorithms. Comparing the accuracy metrics, LSTM outperforms all the other models listed. The closest competitors in terms of accuracy are Gradient Boosting and K-Neighbor models. When considering computational time, ridge prediction has the lowest time at 229 s, but it also showcases the lowest accuracy at 77.91%. On the other hand, LSTM provides both high accuracy and a relatively efficient computational time, making it a strong performer in this evaluation.
Table 5.
The accuracy, and the computational time for various ML model used in this study.
| ML model | Accuracy | Computational time (sec) |
|---|---|---|
| LSTM | 99.01% | 255 |
| Decision Tree | 82.77% | 440 |
| Elastic Net | 78.62% | 322 |
| Gradient Boosting | 88.01% | 422 |
| K-neighbor | 88.12% | 320 |
| Lasso | 67.12% | 310 |
| Linear Regression | NA | NA |
| Ridge Prediction | 77.91% | 229 |
| SVR Prediction | 81.12% | 412 |
| XG-Boost Prediction | 83.35% | 290 |
| Random Forest | 89.77% | 287 |
To provide a macroscopic view of the data extracted from our proposed model, 3D illustrations are used, with interactive visitation attached as Supplementary Material to this manuscript. We consider such an illustration combining time variation, material parameter, and conversion efficiency as a unique procedure to demonstrate the impact of various design parameters on the PCE and the degradation performance across time. Figure 8-(a) illustrates the variation of PCE concerning porosity (0–80%); a normalized axis to 4 is used for better illustration). As time progresses, we observe a consistent decline in efficiency across all porosity levels. The surface plot shows that higher porosity levels exhibit a more pronounced degradation in efficiency, with the PCE dropping from approximately 4% at the start to below 1% at the 360-hour mark. Initially, the highest efficiency noted is around 4.0% for porosities below 40%. By 360 h, the efficiency decreases to approximately 0.5% for 80% porosity, illustrating the detrimental effect of increased porosity on long-term stability. Alternatively, Fig. 8-(b) represents the variation of the PCE under range of dye concentration (0–20 mmol/cm²).
Fig. 8.
Three-dimensional surface plots illustrating the relationship between power conversion efficiency (PCE) and various parameters over time in dye-sensitized solar cells (DSSCs). (a) PCE as a function of time and porosity, applying a normalization factor of 4. (b) PCE against time, under various dye concentration (0–20 mmol/cm²). (c) PCE as a function of time and TiO2 thickness (0–5 μm). (d) PCE related to time and electrolyte concentration (0–6 mmol/L). Dataset raw data and visualized data are accessed as a supplementary material. Figure 6-(b) presents the relationship between PCE and dye concentration (0–20 mmol/cm²) over time. Initially, higher dye concentrations correlate with higher efficiency values, peaking at about 4.0% for concentrations around 10 mmol/cm². However, efficiencies decline significantly over time, with the steepest degradation occurring at concentrations above 15 mmol/cm². Post 360 h, efficiencies drop to around 1.0% for concentrations above 15 mmol/cm², indicating that high dye concentrations can enhance initial performance and accelerate degradation.
In Fig. 8-(c), the impact of varying TiO2 thickness (0–5 μm) on PCE over time is analyzed. The graph illustrates a relatively stable efficiency across different thicknesses within the initial measurement period, but all thicknesses decline as time progresses. The highest initial efficiency of approximately 5.44% is observed for a thickness of 2 μm, while the efficiency remains above 2.0% for thicknesses up to 5 μm throughout the observation period. By 360 h, efficiencies drop below 1.0% for thinner layers, suggesting thicker layers provide enhanced stability over time. In contrast, Fig. 8-(d) assesses the effect of iodine-based electrolyte concentration (0–6 mmol/L) on PCE over time. The results indicate that electrolyte concentration significantly influences initial efficiencies, with higher concentrations yielding better initial performance. The highest efficiency of around 5.45% is initially noted for the 0.5 mol/L concentrations. However, as degradation progresses, efficiencies drop sharply to approximately 0.6% at 360 h. Notably, lower concentrations exhibit a slower degradation rate, maintaining efficiency levels above 1.5% for the duration of the study.
This quantitative analysis underscores the critical role of structural and compositional factors in determining the efficiency and stability of DSSCs over time. The findings suggest that higher porosity, dye concentration, and electrolytic concentration may enhance initial performance but are associated with accelerated degradation. Conversely, optimized TiO2 thickness offers a more favorable balance between initial efficiency and long-term stability. These insights contribute to a better understanding of the degradation mechanisms and highlight the importance of optimizing these parameters for improved DSSC performance in sustainable energy applications. Alternatively, LSTM can face several limitations when applied to long-term degradation predictions32. One significant challenge is their tendency to overfit on training data, particularly when the dataset is small or lacks sufficient variability, which can lead to poor generalization over extended time scales. Herein, we use our optoelectronic model for dataset enlargement, as described in earlier in this section, to avoid such overfitting issues. Additionally, LSTMs may struggle to capture long-range dependencies effectively, as the vanishing gradient problem can still affect their ability to learn from distant time steps. In the current study, mostly degradations are in an exponential, fast decaying, behavior, accordingly, no long-range dependencies are observed. When it comes to handling uncertainty, LSTMs typically rely on deterministic outputs, which may not adequately represent the inherent uncertainties in long-term predictions. To address this, incorporating uncertainty quantification through Bayesian approaches are employed. These strategies aim to provide a measure of confidence in the predictions, allowing for a more robust assessment of degradation over time. Nevertheless, the complexity of accurately modeling long-term degradation processes remains a challenge, necessitating further advancements in LSTM architectures and training methodologies. We consider such challenges as a part of a future extension to the current study.
Conclusion
In conclusion, this research presents a detailed quantitative analysis of the degradation of DSSCs, highlighting the impact of various parameters on PCE over time. Developing a new figure of merit for degradation provides a framework for assessing the performance loss in DSSCs, facilitating a deeper understanding of the underlying mechanisms driving degradation. Our finite element model created in COMSOL effectively simulates the time-dependent performance decline, allowing for accurate predictions based on both experimental and simulated data. The study involved the fabrication of 400 DSSC samples, generating a comprehensive dataset with more than 228,000 data points. This dataset combines experimental results with simulation data, enabling the application of Long Short-Term Memory models for training and validation. The LSTM model demonstrates significant promise in predicting degradation patterns, with overall accuracy approaching 99%. This predictive model can be upgraded to study DSSCs under harsh operating conditions, as well as other types of solar cells, including perovskite, flexible and organic solar cells. Herein, alternative dataset formation, as well as optoelectronic model will be needed, under the same conceptual way for proposing an evaluating figure of merit and utilizing LSTM.
Electronic supplementary material
Below is the link to the electronic supplementary material.
Acknowledgements
The publication of this article was funded by the Qatar National Library.
Author contributions
Mahmoud Ashraf contributed to the conceptualization, methodology, data analysis, and drafting of the manuscript; Ahmet Sait ALALI was involved in data collection, analysis, and critical revisions of the manuscript; Ahmad Muhammad assisted with the literature review and manuscript editing; and Sameh O. Abdellatif, as the principal investigator, led the overall project, overseeing research design, coordination, execution, data interpretation, and finalization of the manuscript.
Funding
The publication of this article was funded by the Qatar National Library.
Data availability
Availability of data and material: All data generated or analysed during this study are included in this published article and its supplementary information files. Any other data supporting this study’s findings are available from the corresponding author upon reasonable request.
Declarations
Competing interests
The authors declare no competing interests.
Conflicts of interest/competing interests
The Authors declare no conflict of interest.
Footnotes
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Contributor Information
Ahmad Muhammad, Email: a.muhammad@qu.edu.qa.
Sameh O. Abdellatif, Email: sameh.osama@bue.edu.eg
References
- 1.Samir, M., Agour, A. M., Ismail, Z., Nageh, H. & Abdellatif, S. O. The Impact of N-Doped Carbon Quantum Dots on Dye-Sensitized Solar Cells Operating Under Diffused-and Low-Light Intensity (IEEE Journal of photovoltaics, 2023).
- 2.Ebenezer Anitha, A. & Dotter, M. A review on liquid electrolyte stability issues for commercialization of Dye-Sensitized solar cells (DSSC). Energies16(13), 5129 (2023). [Google Scholar]
- 3.Najm, A. S., Alwash, S. A., Sulaiman, N. H., Chowdhury, M. & Techato, K. N719 dye as a sensitizer for dye-sensitized solar cells (DSSCs): A review of its functions and certain rudimentary principles. Environ. Prog. Sustain. Energy, 42(1), e13955 (2023).
- 4.Sen, A., Putra, M. H., Biswas, A. K., Behera, A. K. & Groβ, A. Insight on the choice of sensitizers/dyes for dye sensitized solar cells: A review. Dyes Pigm.213, 111087 (2023). [Google Scholar]
- 5.Mammeri, M., Dehimi, L., Bencherif, H. & Pezzimenti, F. Paths towards high perovskite solar cells stability using machine learning techniques. Sol. Energy. 249, 651. 10.1016/j.solener.2022.12.002 (2023). [Google Scholar]
- 6.Misran, E. & Pramananda, V. Chapter 14 - Natural dyes in DSSC fabrication: sources, stability, and performance enhancement efforts. Renew. Dyes Pigm. 289–305 (2024).
- 7.Graniero, P. et al. The challenge of studying perovskite solar cells’ stability with machine learning. Front. Energy Res.1110.3389/fenrg.2023.1118654 (2023).
- 8.Al-Sabana, O. & Abdellatif, S. O. Optoelectronic devices informatics: optimizing DSSC performance using random-forest machine learning algorithm. Optoelectron. Lett.18(3), 148 (2022). [Google Scholar]
- 9.Al-Saban, O., Alkadi, M., Qaid, S. M., Ahmed, A. A. A. & Abdellatif, S. O. Machine learning algorithms in photovoltaics: evaluating accuracy and computational cost across datasets of different generations, sizes, and complexities. J. Electron. Mater.53(3), 1530 (2024). [Google Scholar]
- 10.Salah, M. M., Ismail, Z. & Abdellatif, S. Selecting an appropriate machine-learning model for perovskite solar cell datasets. Mater. Renew. Sustainable Energy. 12(3), 187 (2023). [Google Scholar]
- 11.Bhatti, S. et al. Revolutionizing low-cost solar cells with machine learning: a systematic review of optimization techniques. Adv. Energy Sustain. Res.4(10), 2300004 (2023). [Google Scholar]
- 12.Li, F. et al. Machine learning (ML)-assisted design and fabrication for solar cells. Energy Environ. Mater.2(4), 280 (2019). [Google Scholar]
- 13.Ghanbari Motlagh, S., Razi Astaraei, F., Hajihosseini, M. & Madani, S. Application of machine learning algorithms in improving Nano-based solar cell technology. J. AI Data Min.11(3), 357 (2023). [Google Scholar]
- 14.Shah, A. U. I. & Meyer, E. L. Perovskite-based solar cells in photovoltaics for commercial scalability: current progress, challenges, mitigations and future prospectus. Sol. Energy. 286, 113172. 10.1016/j.solener.2024.113172 (2025). [Google Scholar]
- 15.Jacobsson, T. J. et al. An open-access database and analysis tool for perovskite solar cells based on the FAIR data principles. Nat. Energy. 7 (1), 107. 10.1038/s41560-021-00941-3 (2022). [Google Scholar]
- 16.Abdellatif, S. O. Optical properties of iodine-based electrolyte used in bifacial dye-sensitized solar cells. Opt. Quant. Electron.54(11), 720 (2022). [Google Scholar]
- 17.Hassan, M. M., Ismail, Z. S., Hashem, E. M., Ghannam, R. & Abdellatif, S. O. Investigating the tradeoff between transparency and efficiency in semitransparent bifacial mesosuperstructured solar cells for millimeter-scale applications. IEEE J. Photovolt.11(5), 1222 (2021). [Google Scholar]
- 18.Abdellatif, S. O., Josten, S., Khalil, A. S. G., Erni, D. & Marlow, F. Transparency and diffused light efficiency of Dye-Sensitized solar cells: tuning and a new figure of merit. IEEE J. Photovolt.10(2), 522. 10.1109/JPHOTOV.2020.2965399 (2020). [Google Scholar]
- 19.Ismail, Z. S., Sawires, E. F., Amer, F. Z. & Abdellatif, S. O. Experimentally verified analytical models for the dynamic response of perovskite solar cells using measured I–V and C–V characteristics. Opt. Quant. Electron.55(14), 1272. 10.1007/s11082-023-05304-8 (2023). [Google Scholar]
- 20.Abdellatif, S. O., Amr, L., Kirah, K. & Ghali, H. A. Experimental studies for glass light transmission degradation in solar cells due to dust accumulation using effective optical scattering parameters and machine learning algorithm. IEEE J. Photovolt.13(1), 158 (2022). [Google Scholar]
- 21.Choy, T. C. Effective Medium Theory: Principles and Applications (Oxford University Press, 2015).
- 22.Abdellatif, S. et al. Refractive index and scattering of porous TiO2 films. Microporous Mesoporous Mater.264, 84. 10.1016/j.micromeso.2018.01.011 (2018). [Google Scholar]
- 23.Sultana, F., Jannat, F., Ahmed, S. & Alim, M. A. A comparative numerical approach between lead-free inorganic Cs2TiBr6 and Cs2PtI6-based perovskite solar cells. Results Opt.13, 100567. 10.1016/j.rio.2023.100567 (2023). [Google Scholar]
- 24.Zhang, J. et al. Energy barrier at the N719-dye/CsSnI3 interface for photogenerated holes in dye-sensitized solar cells. Sci. Rep.4(1), 6954. 10.1038/srep06954 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 25.Abdellatif, S. O., Ghannam, R. & Khalifa, Z. Optoelectronic and morphological surface resistance evaluation of Laser-Induced graphene counter electrodes for potential applications in cesium lead halide perovskite solar cells. ACS Appl. Electron. Mater.6(8), 5745. 10.1021/acsaelm.4c00786 (2024). [Google Scholar]
- 26.Sanz-Navarro, C. F., Lee, S. F., Yap, S. S., Nee, C. H. & Yap, S. L. Electrochemical stability and corrosion mechanism of fluorine-doped Tin oxide film under cathodic polarization in near neutral electrolyte. Thin Solid Films. 768, 139697. 10.1016/j.tsf.2023.139697 (2023). [Google Scholar]
- 27.Hailu, Y. M., Nguyen, M. T. & Jiang, J. C. Theoretical study on the interaction of iodide electrolyte/organic dye with the TiO 2 surface in dye-sensitized solar cells. Phys. Chem. Chem. Phys.22(45), 26410 (2020). [DOI] [PubMed] [Google Scholar]
- 28.Mortezapour Shiri, F., Perumal, T. & Mohamed, R. A Comprehensive Overview and Comparative Analysis on Deep Learning Models (CNN, RNN, LSTM, GRU, 2023).
- 29.Yang, S., Yu, X. & Zhou, Y. 2020 International Workshop on Electronic Communication and Artificial Intelligence (IWECAI), (2020).
- 30.Tong, S. et al. Preparation of carbon quantum dots/TiO2 composite and application for enhanced photodegradation of Rhodamine B. Colloids Surf., A. 648, 129342 (2022). [Google Scholar]
- 31.Abdellatif, S. O., Kirah, K., Erni, D. & Marlow, F. Modeling disorder in two-dimensional colloidal crystals based on electron microscope measurements. Appl. Opt.59(33), 10432 (2020). [DOI] [PubMed] [Google Scholar]
- 32.Graniero, P. et al. The challenge of studying perovskite solar cells’ stability with machine learning. Front. Energy Res.11, 1118654 (2023). [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
Availability of data and material: All data generated or analysed during this study are included in this published article and its supplementary information files. Any other data supporting this study’s findings are available from the corresponding author upon reasonable request.















