# Opal-Like Photonic Structuring of Perovskite Solar Cells Using a Genetic Algorithm Approach
## 3 Numerical Methods and Figure of Merits
This quantity is the ratio of the spectrally integrated absorbed photon flux \(\phi_{a}\) over the PSCs to the spectrally integrated incident photon flux \(\phi_{inc}\):  
\[iQE=\frac{\phi_{a}}{\phi_{inc}}=\frac{\int_{\lambda_{min}}^{\lambda_{max}}\frac {\lambda}{hc}A(\lambda)S(\lambda)d\lambda}{\int_{\lambda_{min}}^{\lambda_{max}} \frac{\lambda}{hc}S(\lambda)d\lambda}, \tag{1}\]  
where \(h\) is the Planck constant, \(c\) the speed of light, \(\lambda\) the incident wavelength, and \(S(\lambda)\) the normalized solar spectrum (AM1.5G). The integration is performed for the absorbing wavelength range of \(MAPbl_{3}\) perovskite (i.e., 310-800 nm) [22]. We should point out that this chosen fitness refers to the absorption properties of the PSCs only. No electrical effects are taken into account here, since our work focuses on the photonic aspects exclusively. Consequently, the iQE fitness should not be mistaken for the PCE. After running the GA, one obtains a high-quality solution that maximizes the fitness iQE, as well as a sampling of iQE as a function of the five parameters considered. By taking linear interpolations of this sampling, one can establish 2D maps of the fitness variation with respect to the main parameters. In our problem, the most important parameters directly influencing the useful absorption are the ones related to the hybrid photo-active layer, namely the thickness of the uniform perovskite layer \(t_{uni}\), the radius of the spheres \(R\), and the thickness of the structured perovskite layer \(t_{struc}\). Those variables control the quantity of absorbent material inside the PSC. In addition to the global optimum, other quantities may be useful for further experimental studies. More specifically, we might be interested in knowing the robustness of the fitness around the global optimum found by the GA. Indeed, during experimental fabrication, some imperfections might drive the realized structure away from the optimum. Using the results provided by the GA, we can assess if such a deviation from ideality is negatively impacting the performance of the device. Within a two-dimensional (2D) map of the multi-dimensional parameter space, we can average the fitness over a 2D box of dimensions \(l_{1}\times l_{2}\). This averaging is realized using a linear interpolation over the collected data coming from the GA optimization process. We can define \(\Delta\) as the difference between the optimal fitness and the averaged fitness over the 2D box (i.e., \(\Delta=\big{|}iQE(optimum)-i\overline{QE}_{2D}\big{|}\)). A high \(\Delta\) being a sign of a relatively sharp optimum is not really robust from an experimental point of view. Therefore, another 2D region might be of prime interest for experimentalists, namely a the 2D box of the same dimensions, \(l_{1}\times l_{2}\), presenting the highest average fitness. This region will be referred to as the \"sweet spot\", since it is more robust regarding experimental imperfections that might occur during the fabrication process. We can also evaluate how much we reduce the device performance compared to the optimum established by the GA by calculating \(\delta=\big{|}iQE(optimum)-i\overline{QE}(sweet spot)\big{|}\). In the best case, the two 2D boxes will be fairly superposed. If not, the sweet spot might be preferred if \(\delta\) is not too high (i.e., if the performances are not reduced too much).