1 Introduction

Various solar photovoltaic systems have been developed to efficiently convert light into electricity such as perovskite solar cells (PSCs), organic photovoltaics (OPVs) (Jia et al. 2023; Li et al. 2023a), copper indium gallium selenide (CIGS) solar cells (Jošt et al. 2022; Shrivastav et al. 2023), silicon solar cells (Zhou et al. 2022; Yeo et al. 2022), CdTe solar cells (Jain et al. 2023; Jamarkattel et al. 2022), gallium arsenide (GaAs) solar cells (Papež et al. 2020; Yun et al. 2022), and quantum dot solar cells (QDSCs) (Rasal et al. 2022). The pivotal factors for widespread application of these photovoltaic devices include their efficiency, manufacturing cost, and stability. Among these, PSCs have garnered attention due to their high efficiency, easy manufacturing processes, and cost-effectiveness (Li et al. 2023b). PSCs have rapidly emerged as a highly promising avenue for research, showcasing a confirmed efficiency of 26.1% since their introduction in 2013. In comparison, OPVs, initiated in 2001, currently achieve an efficiency of 19.2%. PSCs, despite their relatively recent entry, have swiftly progressed to efficiencies comparable to long-established technologies such as CIGS solar cells 23.6%, silicon solar cells 26.1%, CdTe 22.4%, and GaAs solar cells 27.8%, all introduced in the seventies of the last century. Additionally, perovskite solar cells outpace the efficiency of QDSCs, a more recent entrant since 2010, exhibit an efficiency of 18.1% (Best research-cell efficiency chart | photovoltaic research. 2024). This rapid progression solidifies PSCs as a leading candidate for ongoing research, hinting at their potential to outshine established solar cell technologies in efficiency. These hybrid perovskite materials, possessing an octahedral crystalline structure with the general formula ABX3. The notable performance is credited to the unique attributes of halide perovskites, including a tunable bandgap, relatively simple fabrication through low-temperature methods, and adequate absorption capability (Feng and Nan 2022; Nnochin et al. 2023). Moreover, larger-scale roll-to-roll manufacturing techniques have facilitated extensive production, significantly enhanced the cost-efficiency of flexible PSCs, and signaled a promising outlook in the market (Othman et al. 2022; Chandrasekhar et al. 2022).

Recent years have witnessed a focused exploration of perovskite materials’ electronic and optical properties through first-principles calculations, particularly employing density functional theory (DFT) (Lindblad et al. 2014; Even et al. 2014). This computational approach serves as a valuable tool for investigating the electronic structure of semiconductors and gaining insights into materials suitable for solar cells. Key among these insights is the study of optical absorption spectra, providing critical information on the electronic properties of the material (Wolf et al. 2014). Zhu et al. (2014) have contributed significantly by utilizing the GW approach to adjust quasiparticle energies, enhancing the accuracy of DFT descriptions for orthorhombic and tetragonal MAPbI3 perovskite materials. Their research focused on the absorption spectrum of these materials and the identification of potential defects affecting the performance of PSCs. A gap between the first two absorption peaks was observed, indicating the potential significance of defect absorption in these materials. While Ahmed et al. (2015) conducted a thorough investigation of the optical properties of cubic MAPbI3 using GW-augmented DFT calculations, emphasizing the heightened optical conductivity close to the band gap and the system’s responsiveness to low-energy vibrational modes. The authors conducted calculations of the infrared (IR) absorption spectrum, yielding valuable insights into the material’s optical properties. The literature also delves into the advantageous feature of tunable bandgaps offered by PSCs (Ong et al. 2019). Ong et al. explored how the orientation of the local structure of (CH3NH3)+ ions impact this bandgap. Additionally, the bandgap is influenced by the distortion of the PbI3 cage, a result of interactions between the inorganic framework and the molecules.

This study aims to build upon the existing body of literature by presenting an electronic and optical analysis of the MAPbI3 perovskite layer. The focus is on different crystalline structures, including cubic, tetragonal, and orthorhombic phases. The electronic structure will be analyzed by examining the density of states and band structure using the Quantum-ESPRESSO package (Giannozzi et al. 2009). Simultaneously, the optical spectrum will be obtained using DFT, and all relevant parameters will be applied in the SCAPS solar cell simulator, showcasing our commitment to go beyond DFT and comprehensively study the behavior of the solar cell. In addition to the electronic and optical analysis, this study will explore the I-V curve, fill factor, efficiency, Voc, and Isc as functions of the thickness of the perovskite layer. This multifaceted approach aims to provide comprehensive insights into the performance of perovskite solar cells and the optimum thickness of the perovskite layer for achieving maximum efficiency. In our work, the main goal is to establish clear connections between prior studies and the specific outcomes of this research. By delving into the electronic and optical properties of MAPbI3 perovskite layers with different crystalline structures, this study contributes to a more nuanced understanding of the factors influencing the efficiency of perovskite solar cells.

The paper is structured as follows: Sec. 2 provides a detailed description of the computational methodology employed for DFT calculations and cell simulations using SCAPS. In Sec. 3, we present the results and engage in discussions concerning the influence of various MAPbI3 structures, absorber thickness, dopant concentration, and defect density. Finally, in Sec. 4, we summarize our findings, draw conclusions, and outline potential directions for further research.

2 Computational methodology

Advancing the understanding of perovskite solar cells PSCs, our research uniquely explores CH3NH3PbI3 (MAPbI3) absorber layers with varied crystalline structures—cubic, tetragonal, and orthorhombic. Setting itself apart from prior studies, our approach involves a dual analytical method, integrating density functional theory (DFT) calculations (for density of states, band structure, and absorption coefficient) with the Quantum-ESPRESSO and YAMBO packages. The subsequent incorporation of these insights into SCAPS-1D software enables a comprehensive assessment of crucial parameters, including open circuit voltage (Voc), short circuit current (Isc), fill factor (FF), and power conversion efficiency (PCE). Importantly, our investigation delves into the impact of perovskite layer thickness, bulk defect densities and doping concentration on solar cell performance, offering a nuanced perspective.

2.1 DFT analysis

DFT calculations were performed using QuantumEspresso package (Giannozzi et al. 2009), which is a widely used software package for first-principles electronic structure calculations and materials modeling based on density functional theory. To analyze the electronic and optical properties of the MAPbI3 perovskite layer, we utilized three different crystalline structures including cubic, tetragonal, and orthorhombic structures. For the cubic structure, we used a MAPbI3 unit cell with a Pm3m space group, which contained 12 atoms. In the tetragonal structure, we employed a MAPbI3 unit cell with a P4/mmm space group, consisting of 48 atoms. Similarly, for the orthorhombic structure, we utilized a MAPbI3 unit cell with a Pnma space group, also consisting of 48 atoms. Spin–orbit coupling (SOC) was not considered in the calculations. Unlike the common issue of bandgap underestimation, the calculated bandgaps using the generalized gradient approximation (GGA) and local density approximation (LDA) were found to be very similar to the experimental values (Mosconi et al. 2013; Chang et al. 2004). This unexpected agreement is a result of error cancellation, specifically the omission of the spin–orbit interaction leading to an overestimation of the band gap, which compensates for the underestimation error in the LDA/GGA calculation (Even et al. 2013).

In our system, we employed the SSSP (Standard Solid State Pseudopotentials) with precision pseudopotentials (Prandini et al. 2018) to describe the electron–ion interactions. These pseudopotentials were utilized in various calculations, such as self-consistent field (SCF), non-self-consistent field (NSCF), and band calculations. From these calculations, we obtained the density of states and band structure of the system. For the absorption calculations, we utilized dojo pseudopotentials for both the SCF and NSCF calculations (Setten et al. 2018). These potentials were specifically employed to capture the absorption properties of the system. The output files generated from these calculations, including the electronic structure information, were then passed to the YAMBO package (Sangalli et al. 2019; Marini et al. 2009). YAMBO was used for further analysis and processing of the absorption data. The YAMBO code is used to study the complex dielectric function in these MAPbI3 structures. To do this, we need the initial electronic structure data from the ground state, which comes from density functional theory codes (Sangalli et al. 2019). In this study, we got this data using the Quantum Espresso Package. It is worth noting that the selection of pseudopotentials, calculation methods, and software packages can vary depending on the specific requirements of the study and the nature of the system being investigated. In our analysis, the SSSP with precision pseudopotentials, dojo pseudopotentials, and YAMBO code were chosen as the tools to model and analyze the electron–ion interactions and absorption properties of the system. The criteria of convergence for energy and forces were set to 10−5 atomic units. For the cubic structure, a 10 × 10 × 10 k-point mesh was used to sample the Brillouin zone. For the tetragonal structure, a 6 × 6 × 4 k-point mesh was utilized, while for the orthorhombic structure, a 6 × 4 × 6 k-point mesh was used. The choice of k-point mesh is a compromise between computations analysis time and accuracy, we tested denser grids but observed subtle differences in convergence. The wave-function cut-off used was 47 Ry, and the charge density cut-off used was 424 Ry.

In the described computational process, “Ry” refers to Rydberg, a unit of energy commonly used in quantum mechanical calculations. The “wave-function cut-off” is a parameter that defines the maximum kinetic energy of the electrons included in the quantum mechanical calculations. Similarly, the “density cut-off” defines the highest allowed electron density in the calculations. These parameters are crucial in determining the precision and efficiency of the calculations.

The interaction between photons and electrons, from a quantum mechanical standpoint, involves absorption or emission of photons causing transitions between filled and unfilled states within the system (Bano et al. 2017). This process is explained through the concept of time dependent perturbations acting on the system’s ground electronic state. To examine the optical response of the system, the frequency dependent dielectric function, represented by the following Equation (Liu et al. 2021; Syah et al. 2021), is utilized:

$$\varepsilon \left( \omega \right) = 1 + \frac{8 \pi }{{\Omega N_{k} }}\sum\nolimits_{k,v,c} {\frac{{\left| {\left\langle {\phi_{kv} |\hat{v}|\phi_{kc} } \right\rangle } \right|^{2} }}{{\left( {E_{kc} - E_{kv} } \right)^{2} \left( {E_{kc} - E_{kv} - \omega - i\eta } \right)}}}$$
(1)

where the cell volume is \(\Omega\), the total number of k-points in the Brillouin zone is \({{\text{N}}}_{{\text{k}}}\) the operator of velocity is \(\widehat{v}\), \(\omega\) is the angular frequency, and the opportune broadening factor is \(\eta\). The occupied and unoccupied states are represented by these indices \(v\) and \(c\) respectively. Then we can calculate the frequency-dependent absorption coefficient, \(\alpha \left(\omega \right)\) using the next formula (Liu et al. 2021; Syah et al. 2021):

$$\alpha \left( \omega \right) = \omega \sqrt {\frac{{ - Re\left[ { \varepsilon \left( \omega \right)} \right] + \sqrt {Re\left[ {\varepsilon \left( \omega \right)} \right]^{2} } + Im\left[ {\varepsilon \left( \omega \right)} \right]^{2} }}{2}}$$
(2)

2.2 Solar cell modeling and simulation

The analysis and modeling of the device were carried out using SCAPS software (Burgelman et al. 2000). By solving the continuity equations for electrons and holes (Eqs. 3 and 4) along with Poisson equation (Eq. 5) (Almosni et al. 2017), the performance attributes of the device can be calculated as follows:

$$\frac{{dn_{p} }}{dt} = G_{n} - \frac{{n_{p} - n_{p0} }}{{\tau_{n} }} + n_{p} \mu_{n} \frac{d\xi }{{dx}} + \mu_{n} \xi \frac{{dn_{p} }}{dx} + D_{n} \frac{{d^{2} n_{p} }}{{dx^{2} }}$$
(3)
$$\frac{{dp_{n} }}{dt} = G_{p} - \frac{{p_{n} - p_{n0} }}{{\tau_{p} }} + p_{n} \mu_{p} \frac{d\xi }{{dx}} + \mu_{p} \xi \frac{{dp_{n} }}{dx} + D_{p} \frac{{d^{2} p_{n} }}{{dx^{2} }}$$
(4)
$$\frac{d}{dx}\left( { - \in \left( x \right)\frac{d\psi }{{dx}}} \right) = q\left[ {p\left( x \right) - n\left( x \right) + N_{D}^{ + } \left( x \right) - N_{A}^{ - } \left( x \right) + p_{t} \left( x \right) - n_{t} \left( x \right)} \right]$$
(5)

The afore mentioned Eqs. (35) involve several variables and parameters. The symbol G represents the generation rate, while x corresponds to the direction along the thickness. The lifetimes of electrons and holes are expressed as τn and τp, respectively. The diffusion coefficient is represented by D, and q is the electron charge of and holes, respectively. ξ is used to indicate the electric field, and ψ represents the electro-static potential. Additionally, \({N}_{A}^{-}\left(x\right)\) and \({N}_{D}^{+}\left(x\right)\) represent the ionized acceptor and donor concentrations, while \(n(x)\), \({n}_{t}(x)\), \(p\left(x\right)\), and \({p}_{t}\left(x\right)\) represent the concentrations of free electrons, trapped electrons, free holes, and trapped holes, respectively.

The applied schematic diagram of solar cell is depicted in Fig. 1, which has been chosen due to its favorable attributes. These include its suitability for processing at temperatures below 150°°C, its capacity to minimize hysteresis effects, and its enhanced capability for the collection of charge carriers (Rahman et al. 2019). It illustrates the standard p-i-n structure of a perovskite solar cell fabricated on a glass substrate coated with ITO/FTO. The perovskite layer, CH3NH3PbI3 (MAPbI3), is situated between the hole transport material (HTM) and electron transport material (ETM) layers, with ZnO being utilized as the ETM and NiOx is employed as the HTM for all structures. ITO/FTO functions as the front-side contact, while Ag/Al serves as the back-side contact for the solar cell.

Fig. 1
figure 1

PSC structure used in the simulation

In our simulation, we initially focused on the study of different perovskite phases as absorber layer in the SCAPS package after obtaining the absorption spectrum from DFT calculations. In addition to the common cubic phase, we extended our investigation to include the tetragonal and orthorhombic phases too. By comparing the performance of the three different absorbers, we aimed to assess their respective efficiencies of perovskite solar cell and make meaningful comparisons.

3 Results and discussion

We have organized our computations and outcomes into two distinct categories. Firstly, we report the results obtained from DFT calculations for the electronic and optical properties of the MAPbI3 perovskite in the three introduced crystalline structures. These calculations provide insights into the structural stability and electronic band structure of the MAPbI3 perovskite in each of these phases. In the second part, we perform cell simulations using the SCAPS simulator. We consider the cubic, tetragonal, and orthorhombic structures of the MAPbI3 perovskite as absorber layers in the solar cell simulation. The optical absorption spectra used in the simulation are obtained from the DFT calculations performed for each crystal structure. By utilizing different absorber structures and corresponding absorption spectra, we can analyze and compare the performance of the solar cell in terms of efficiency, fill factor, Voc, and Isc for each structure.

3.1 DFT calculation outcomes

3.1.1 Density of states

To assess the electrical characteristics, we investigated the electronic density of states as depicted in Fig. 2 for the cubic, tetragonal, and orthorhombic configurations of MAPbI3. Evident from their density of state profiles is the semiconductive nature of these structures, attributed to minimal energy interval within the density of states. Prominent peaks are observable at approximately − 1.8, − 1.75, and − 1.89 eV within the valence band, along with 3.73, 3.58, and 3.87 eV within the conduction band, spanning from − 4 to 4 eV for the cubic, tetragonal, and orthorhombic arrangements, respectively. This pattern highlights distinct, well-defined peaks and substantial area coverage under the DOS curve, implying comparable electron accumulation across all three structures (Targhi et al. 2018).

Fig. 2
figure 2

Total density of states for three perovskite phases, a cubic, b tetragonal, and c orthorhombic

3.1.2 Band structure

For the computation of the band structures, we employed the lattice brillouin zone outlined in Fig. 3 (Setyawan and Curtarolo 2010). Then, the band structure of the different phases was analyzed. This analysis is important to understand some more properties such as carrier mobility and absorption spectrum (Jeng et al. 2013). As illustrated in Fig. 4 of the electronic band structures of MAPbI3, the band gap values, which indicate the energy difference between valence and conduction bands, are measured as 1.7 eV, 1.5 eV, and 1.62 eV for cubic, tetragonal, and orthorhombic MAPbI3 structures, respectively. These findings also align well with the results of previous theoretical density of states (DOS) calculations conducted in this study.

Fig. 3
figure 3

Lattice brillouin zone for each structure

Fig. 4
figure 4

Band structure for three perovskite phases, a cubic, b tetragonal, and c orthorhombic

The analysis Indicates that the highest energy level of the valence band (VBM) and the lowest energy level of the conduction band (CBM) align at distinct points—the cubic structure at the R point and the tetragonal and orthorhombic structures at the Γ point, this is in good agreement with findings from a prior research by Lekesi et al. (2022). This alignment underscores their common classification as direct bandgap semiconductors.

3.1.3 Dielectric constants and absorption coefficients

In Fig. 5a, the real part of the dielectric function is shown, which tells us about how the material interacts with electric fields. Figure 5b, on the other hand, shows the imaginary part of the dielectric function, giving us more insight into the material’s absorption behavior. The behavior of the imaginary part of the dielectric constant, directly linked to the material’s absorption shown in Fig. 6, its maximum values, detected between 2 eV and 3.5 eV, correspond to wavelengths approximately from 350 to 650 nm—coinciding with the range where the absorption coefficient indicates significant values (Shaikh et al. 2016). The maximum absorption peaks for the cubic, tetragonal, orthorhombic crystalline structures are about 2.67, 3.06, and 3.15 eV respectively. However, the best absorption amplitude for the cubic structure is due to its high crystallinity (Bonadio et al. 2021). These peak shifts could be explained by Fig. 6 using the contrast between the band structure and DOS curves taking into consideration the possible transition according to the electron’s population through the available energy levels as shown in Fig. 6.

Fig. 5
figure 5

Dielectric constant of MAPbI3 structures. a Real part and b Imaginary part

Fig. 6
figure 6

The contrast between the bandgap and the possible electron transition. a cubic, b tetragonal, and c orthorhombic phases

The qualitative analysis of the graphs explains how the material responds to electric fields at that energy level. Moreover, the graphs highlight peaks, representing significant points where the material undergoes direct transitions when interacting with light. This detail is important for applications like solar cells and electronic devices (Hajjiah et al. 2022). Even though our analysis gives us a solid understanding, considering effects like phonons—vibrations in the material’s lattice—might lead to small changes in the absorption coefficient (Liu et al. 2021).

Figure 7 compares the absorption coefficient obtained by YAMBO code for the three structures on the left axis, along with the solar irradiance (Mass and 1.5 Spectra.2024) on the right axis. The absorption coefficient curve exhibits elevated values within the low wavelength range, spanning from 300 to 900 nm, indicating pronounced light absorption in this interval. Conversely, the curve displays diminished absorption for longer wavelengths, underscoring a reduced tendency of the material to absorb light at lower energy levels. The absorption coefficient starts to increase at approximately 700 to 800 nm which corresponds to bandgaps values measured in eV. This alignment underscores the correlation between the material’s absorption behavior and its energy band gap, with the observed transition occurring within the range of the previously determined band gap energy levels. Notably, the cubic structure, specifically within the broader range from 450 to 900 nm, displays a higher absorption coefficient. This observation gains significance as it aligns with the wavelength range associated with high solar irradiance. The heightened absorption in this solar energy range suggests superior overall performance of the cubic structure compared to other configurations.

Fig. 7
figure 7

MAPbI3 structures’ absorption spectrum

3.2 Solar cell simulation

All layers under investigation in this study are intrinsically undoped, implying the absence of external doping. However, due to the absence of a dedicated option for specifying carrier concentration within SCAPS, we employ acceptor concentration for p-type layers (NiOx and MAPbI3), while for n-type layer (ZnO, the electron transport material), donor concentration is utilized. This adaptation is justified on the premise that dopants are treated as being completely ionized in the simulation (Rahman et al. 2019).

The perovskite material is regarded as marginally p-type, a characterization supported by multiple studies (Dong et al. 2015; Hutter et al. 2015). The selection of mobility for electrons and holes stems from thin film data (Herz 2017), as opposed to single crystal data, to accurately replicate the fabrication conditions. Mobility values are derived from Hall data and are distributed uniformly for both electrons and holes. This approach is grounded in the similarity of effective carrier masses in MAPbI3, resulting in equal distribution of mobilities between the two carrier types (Leijtens et al. 2014). To ascertain the accuracy of our simulations, we conducted a comparison by simulating a MAPbI3 solar cell using the absorption spectrum derived from density functional theory (DFT). The solar cell simulation is executed with the parameters outlined in Tables 1 and 2.

Table 1 SCAPS electrical and optical parameters of different layers
Table 2 Defects used in SCAPS of different layers

3.2.1 Comparison study of different MAPbI 3 structures

The p-i-n perovskite solar cell (PSC) structure is investigated with three distinct MAPbI3 absorber layer configurations: cubic, tetragonal, and orthorhombic structures. ZnO serves as the electron transport material (ETM) for these configurations, while NiOx is employed as the hole transport material (HTM). The analysis maintains consistent parameters across these configurations, including a uniform absorber layer thickness of 320 nm, consistent absorber bulk defect densities at 1.5 × 1016 cm−3, and uniform interface recombination rates represented by Sn and Sp with values of 104 cm/s (Rahman et al. 2019).The corresponding current–voltage characteristics for the three distinct phases are depicted in Fig. 8, and the solar cell performance parameters are summarized in Table 3.

Fig. 8
figure 8

I-V curve of 320 nm MAPbI3 PSC for three different structures

Table 3 p-i-n perovskite solar cell performance parameters

It is observed that cubic structure has superior performance over both tetragonal and orthorhombic structures. Among the three materials, cubic MAPbI3 shows improved Voc (about 86 mV higher than orthorhombic), FF (1.07% higher than orthorhombic) and Jsc (4.54 ma/cm2 higher than tetragonal). The underlying cause for this behavior can be attributed to the notably higher bandgap of the cubic structure compared to the other configurations accompanied with its higher absorption especially in the longer wavelength range, which leads to the generation of greater proportion of carriers compared to tetragonal and orthorhombic absorbers (Laali et al. 2020).

3.2.2 Absorber thickness variation

The thickness of the absorber layer should be chosen attentively to maximize the current density and not too large to minimize the reverse saturation current. To investigate the impact of the absorber (MAPbI3) layer thickness on PSC performance, the thickness systematically varied from 300 to 1900 nm. This parameter variation is carried out while maintaining all other factors constant, including bulk defect densities, interface states, and other relevant parameters, for the three different structures. The outcomes of these investigations are illustrated in Fig. 9. The analysis reveals a consistent trend among all structures in response to the variation in thickness. With increasing thickness, both the open circuit voltage (Voc) and fill factor (FF) exhibit a decline. The decrease in Voc as shown in Fig. 9a is attributed to the increment in the dark saturation current, which increases the recombination of the charge carriers (Ouslimane et al. 2021). That can be explained by the dependency of open-circuit voltage on the photo-generated current and dark saturation current, which is written as (Singh and Ravindra 2012):

$$V_{oc} = \frac{KT}{q}\ln \left[ {\frac{{J_{sc} }}{{J_{o} }} + 1} \right]$$
(6)

where \(\frac{KT}{q}\) is the thermal voltage, \({J}_{sc}\) is the photo-generated current density, and \({J}_{o}\) is the saturation current density. While FF, Fig. 9b is inversely proportional to the thickness due to an increased series resistance and an internal power dissipation in a thicker absorber layer.

Fig. 9
figure 9

Effect of thickness variation of MAPbI3 layer on PSC performance

Notably, an increase in absorber layer thickness leads to an incremented light absorption, resulting in a rise in the short circuit current density Jsc, Fig. 9c. As for the power conversion efficiency PCE, Fig. 9d, an optimal absorber thickness exists, beyond which the efficiency diminishes with further increases in thickness, this can be explained as thicker layers absorb more photons, generating more electron–hole pairs. Yet, as thickness increases further, recombination probability rises since charge carriers must travel longer distances for diffusion (Anwar et al. 2017). This behavior is found within all studied crystalline structures of perovskite. Among the examined structures, the cubic MAPbI3 cells achieve an impressive efficiency peak of up to 26% at thickness 900 nm. In contrast, the tetragonal cells exhibit a maximum efficiency of approximately 18% at 1000 nm, while the cells incorporating orthorhombic MAPbI3 material fall within the intermediate efficiency range of 20% at 1200 nm.

3.2.3 Absorber bulk defect densities

Perovskite materials exhibit distinctive characteristics such as extended carrier diffusion lengths, Ln for electrons and Lp for holes in single crystals. However, in thin films, these lengths can vary significantly based on the quality of the film. The diffusion length is intricately linked to the bulk defect densities within the perovskite (Rahman et al. 2019). To explore the impact of defect densities on the performance of perovskite solar cells (PSCs), the single bulk defect level is systematically adjusted across a range from 1014 cm−3 (Ln = Lp = 6.2 µm) to 1018 cm−3 (Ln = Lp = 62 nm). This alteration reflects the transition from a high-quality thin film perovskite layer to a layer of very poor quality. The results obtained from this analysis are summarized in Fig. 10a–d. As anticipated, each performance parameter Voc, Jsc, FF, and PCE—exhibits a deteriorating trend with the introduced variation.

Fig. 10
figure 10

Effect of bulk defect density variation of MAPbI3 layer on PSC performance while keeping absorber thickness at 320 nm

The bulk defect densities, Ndef. are inversely proportional to the diffusion length as depicted in Table 4. So, in the case of low defects, diffusion length is in the order of micrometers while long diffusion lengths are indeed an important factor for highly efficient solar cells. In the other case of high defects, diffusion length is in the order of nanometers which reflects directly on the drop in solar cell efficiency, Fig. 10d (Akel et al. 2023). The FF is impacted by increasing defect density, Fig. 10b. This is because of the decreasing electric field with the increase of defect density which causes reduction in charge carrier. Hence, absorber layer quality is required for higher fill factor (Nalianya et al. 2021). The deterioration of Voc in Fig. 10a can be explained by the reconfiguration of the band structure influenced by trap states which ultimately decreases the efficiency of solar cell (Raval et al. 2020).

Table 4 Defect density variation versus diffusion length

However, an interesting exception arises in the case of current density, Jsc, as illustrated in Fig. 10c. Notably, Jsc remains stable until a defect level of 1017 cm−3 is reached, after which it commences a gradual decline. At low defect densities, this behavior can be attributed to the presence of defects that might not significantly impact the generation and separation of charge carriers. The short circuit current, Jsc, is primarily determined by the amount of photocurrent generated due to incident sunlight and the efficient separation of electron–hole pairs.

3.2.4 Absorber doping concentration

In this section, doping the active layer is studied and consequently its effect on the solar cell performance is presented. Here, we added acceptor material with concentration ranging from \({N}_{A}={10}^{14} {cm}^{-3}\) to \({10}^{18} {cm}^{-3}\). In Fig. 11, the variations of the different solar cell parameters are shown ending with the efficiency. It can be noted that, for all crystalline structures, the PCE is stable and begin to decrease significantly after \({N}_{A}\) ~ \({10}^{16} {cm}^{-3}\). However, the cubic structure still has the best performance (\(PCE\) ~ \(22\%\)). This conclusion is consistent with Voc and Jsc results shown in Fig. 11a, c respectively. That can be explained as the charge carriers are collected and transport easily below the threshold concentration \({N}_{A}\) ~ \({10}^{16} {cm}^{-3}\). For Voc behavior, this can be attributed to an increase in Auger recombination with higher doping which in turn increases forward bias diffusion current hence reducing Voc (Bertoluzzi et al. 2020). The fill factor, FF also is important parameter to be studied, Fig. 11b and almost have the same attitude except for higher doping concentrations. So, proper doping is required as heavy one lead to an increase in enhanced impurity scattering and Auger recombination rate and consequently, suppression of hole transportation (Minemoto and Murata 2014). Generally, excessive doping changes the nature of the perovskite material to be closer to metallic nature which impedes the carrier transport mechanisms (Stoumpos et al. 2013).

Fig. 11
figure 11

Effect of doping concentration variation of MAPbI3 layer on PSC performance while keeping absorber thickness at 320 nm

4 Conclusion

In this extensive study, we investigated the optical and electrical properties of MAPbI3 with different crystalline structures to enhance solar cell performance. Using density functional theory (DFT) and QuantumEspresso, we explored density of states and band structures. Subsequently, the SCAPS software simulated perovskite solar cell performance. The cubic MAPbI3 structure outshone tetragonal and orthorhombic structures, displaying higher \({V}_{oc}\), \(FF\), and \({J}_{sc}\), primarily due to a higher bandgap and better light absorption. We also examined the impact of absorber layer thickness. Thicker layers improved \({J}_{sc}\) but led to reduced \({V}_{oc}\) and \(FF\) due to increased series resistance. An optimal thickness was found. Among the structures, cubic \(MAPb{I}_{3}\) achieved a peak efficiency of \(26\%\), while tetragonal cells reached approximately \(18\%\), and orthorhombic cells fell in between. We analyzed defect densities’ influence on solar cell performance, revealing deteriorations in key parameters with increasing defects, especially when defect levels exceeded \({10}^{17}{cm}^{-3}\). The study on doping effects reveals that the PCE remains consistent until reaching a critical doping level of \({10}^{16}{cm}^{-3}\), beyond which a notable decrease is observed. This highlights the cautionary note against doping, emphasizing its adverse impact on both material and carrier transport. This research advances perovskite solar cell technology, emphasizing the potential of the cubic structure in the absorber layer for future exploration and development.