Employing Genetic Algorithm as an Efficient Alternative to Parameter Sweep Based Multi-Layer Thickness Optimization in Solar Cells

by   Premkumar Vincent, et al.

Conventional solar cells are predominately designed similar to a stacked structure. Optimizing the layer thicknesses in this stack structure is crucial to extract the best efficiency of the solar cell. The commonplace method used in optimization simulations, such as for optimizing the optical spacer layers' thicknesses, is the parameter sweep. Our experiments show that the introduction of genetic algorithm based method results in a significantly faster and accurate search method when compared to brute-force parameter sweep method in both single and multi-layer optimization. While other sweep methods can also outperform the brute-force method, they do not consistently exhibit 100% accuracy in the optimized results like our genetic algorithm. Our best case scenario was observed to utilize 57.9 method.



There are no comments yet.



Genetic Algorithm for More Efficient Multi-layer Thickness Optimization in Solar Cell

We propose to use Genetic Algorithm (GA), inspired by Darwin's evolution...

Computational design of organic solar cell active layer through genetic algorithm

The active layer microstructure of organic solar cells is critical to ef...

A new multilayer optical film optimal method based on deep q-learning

Multi-layer optical film has been found to afford important applications...

Genetic Algorithm based hyper-parameters optimization for transfer Convolutional Neural Network

Hyperparameter optimization is a challenging problem in developing deep ...

Genetic Bi-objective Optimization Approach to Habitability Score

The search for life outside the Solar System is an endeavour of astronom...

REGAL: Transfer Learning For Fast Optimization of Computation Graphs

We present a deep reinforcement learning approach to optimizing the exec...

Code Repositories


Single and Multi-layer Solar Cell Thickness Optimization With Genetic Algorithm (Energies 2020)

view repo
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Simulations of optoelectronic devices have helped to understand and design better optimized structure with efficiencies nearing the theoretical maximum Piprek et al. (2003); Andreani et al. (2019); Conkey et al. (2012); Zhang et al. (2009). They have aided in discovering complex nanostructures for efficient light trapping and guiding Wang et al. (2013); Gouvea et al. (2019); Jafar-Zanjani et al. (2018); Mueller et al. (2014); Tsai et al. (2015)

. Simulations have reduced the time it takes for the researchers to find the optimized device structure. However, the most common way to obtain results over a large range of a parameter’s values is through a parameter sweep method. This brute-force method is ineffective in most cases where the user only requires the end optimized device structure. Genetic algorithm (GA) is an optimization algorithm in artificial intelligence based on Darwin’s evolution and natural selection theory, in which the fittest outcome survives 

Darwin (2004); Man et al. (1996). This algorithm sets an environment with a random population and a function, which is called the fitness function, that scores each individual of that population. The environment then selects individuals to become the parents of the next generation through a selection process. The next generation of individuals (children of the previous generation’s parents) is obtained via a crossover method. Similar to natural mutation in genes of the offspring, the new generation’s individuals can also suffer mutation in their genes. After a number of generations, the population converges to the individuals representing the optimal solution.

In this article, we have demonstrated the optimization of an organic solar cell through the optimization of the optical spacer layers. Traditionally, finite difference time domain (FDTD) method was used to simulate the ideal short circuit current density () of the solar cell through the Lumerical, FDTD solutions software  Vincent et al. (2018, 2017). Parameter sweep or brute-force method was used to vary the thickness of the optical spacer layers of the solar cell. At the optimized layer thicknesses, the solar cell will be observed to have the highest output. Although not computationally intensive for a single layer optimization, the number of simulations expand as in Eq. (1) for multi-layer optimization problems.


where is the total number of simulations and , , and are the number of simulations performed for layers 1, 2, and 3, respectively.

To alleviate the brute-force method’s limitations, we propose the use of GA. This article then aims to heuristically assert the hypothesis that GA is a more efficient approach than brute-force algorithms in tasks such as optimizing optoelectronic device structures.

2 Methodology

2.1 Brute-force

Fig. 1 shows the device structure that was constructed in Lumerical, FDTD solutions. It consists of a 150 nm indium tin oxide (ITO) and a 100 nm aluminum (Al) electrodes. The active layer, poly (3-hexylthiophene) (P3HT): indene- bisadduct (ICBA), was designed to be 200 nm. The charge transport layers, zinc oxide (ZnO) and Molybdenum oxide (MoOx), also act as optical spacer layers and are variable quantities in our simulation. The simulation setup details is published elsewhere  Vincent et al. (2018, 2017). To simulate the ideal , internal quantum efficiency was assumed.

Figure 1: Solar cell device structure. The electron transport layer is ZnO, while the hole transport layer is MoOx. Both also act as optical spacer layers as they affect the distribution of light inside the device. We optimized these optical spacer layers for maximizing photon absorption inside the active layer of the solar cell.

Using the software’s parameter sweep option, we simulated our device structure according to three sections. The first section optimized only the ZnO layer, while keeping the MoOx layer at 10 nm thickness. The second simulation section consists of optimizing only the MoOx layer, while the ZnO layer was fixed at 30 nm. Our final section optimized both optical spacer layers together. In order to make a 2 layer optimization problem similar to that of the single layer optimization, we replaced the optical spacers’ thickness combinations with a label, effectively converting a 3D data to a 2D data. The label number is given by .The results of the brute-force method are provided in Fig. 2, respectively.

Figure 2: Brute-force method results: (a) single ZnO layer optimization, (b) single MoOx layer optimization, (c) multiple ZnO and MoOx layers optimization, (d) 2D data representation of (c) using labels pointing to the ZnO and MoOx layer thickness combinations for the ease of computation.

2.2 Genetic Algorithm

In order to alleviate the computational and time inefficiencies of brute-force method, we took inspiration in Darwin’s natural selection theory and proposed the use of genetic algorithm Man et al. (1996) for our optimization problem. Consider there’s a random population and their adaptability to the environment given by a fitness function. In our optimization problem, the fitness function was to maximize output from the FDTD simulation. Each population contains a number of individual chromosomes, which in turn consists of an array of bits called genes. Different selection methods are used to choose certain chromosomes in each generation (see Section 2.2.1) in order to reproduce off-springs using a crossover method (see Section 2.2.2

). To further mimic biology, there is also a probability that a chromosome might suffer mutation, which is provided by the mutation rate, which allows the algorithm to escape local minima in the data. In the end, the fittest members of the population prevail, meaning that the algorithm converges to the optimal solution.

A step-by-step of the works of the genetic algorithm is shown in Algorithm 1. The initial population of size is randomly selected from the search space, which in our case is the maximum and minimum thickness of the optical spacer layers. The first iteration of the algorithm then starts. For each population value, the GA calls the FDTD software to simulate and extract the result. The fitness function () is applied to all individuals in the population and ranked from the highest to the lowest. A selection method is then applied taking into consideration each chromosome and their respective fitness score. After selecting the parents responsible for the next generation, they reproduce in order to obtain the next generation, step detailed in Algorithm 2. Note that in our algorithm, the fittest individual in the current generation is cloned to be part of the next generation. The current generation is then updated with the next generation, with the algorithm continuing until the maximum number of generations has been reached.

As for the reproduction algorithm, detailed in Algorithm 2, the first step is to allocate an empty array for the new population. The second step is to select two parents to produce children. Due to the crossover method used and mutation ratio, the same parents are able to reproduce different children. The new population is then updated with the new children obtained through crossover and mutation.

Data: , , , (range of population)
Result: Best individual and fitness value (optimal solution)
random initial population of size from ;
while  do
       , Rank(, );
       Cloning of the ;
       Selection(, );
       [, Reproduction(, , )];
       += 1;
Save and in ;
Algorithm 1 Genetic Algorithm
Data: , ,
Result: New population
for i=1 to / 2 do
       (len() - i + 1);
       Create children from and with Crossover and Mutations;
       + new children
Algorithm 2 Reproduction Algorithm

2.2.1 Selection methods

Four selection methods were examined in this work: random, tournament, roulette wheel, and breeder. For better clarity of the following explanations, the fittest individual means the individual with highest fitness score, since our problem is a maximization problem.


This is the simplest selection method since it does not incorporate a selection criteria. This method consists of randomly selecting individuals to be the next generation’s parents, with no regards to the fitness function. Because of this Monte-Carlo-like approach, it can take very long for the algorithm to converge.


Tournament Selection Fang and Li (2010) samples individuals with replacement from a population of and applies the fitness function to those individuals in order to select the one with best fitness score, also known as the fittest individual. One can think of this method as a battle of the fittest, where individuals face each other in tournament fashion to decide the fittest. The fittest individuals from each tournament round will then constitute the parents responsible for forming the next generation.

Roulette wheel

Roulette Wheel Selection (RWS) Jebari and Madiafi (2013) is a popular way of parent selection in which individuals have a fitness-proportionate probability of being selected. In that way, if an individual is very fit, it has a higher chance of being chosen, otherwise their chance is lower.


Breeder Selection Mühlenbein and Schlierkamp-Voosen (1993) follows the same strategy used for breeding animals and plants, where the goal is to preserve certain desired properties from the parents in their children. This is achieved by conserving the genetic material from the fittest individuals while still giving some mutation leeway by adding a few random individuals (lucky few) to the mix of parents for the next generation.

2.2.2 Crossover

Crossover is the reproduction method in genetic algorithms, and it consists of choosing the parts of each parent that will be present in their child. In this work we use what is called a uniform crossover, shown in Fig 3. In this type of crossover, each bit is chosen from one of the parents with probability of 0.5. The advantage of this method is that the same parents are able to form a large number of children with a more diverse set of genes.

Figure 3: Uniform crossover as reproduction method.

2.2.3 Mutation

This genetic operator is used to ensure genetic diversity within a group of individuals and to ensure the algorithm doesn’t converge to a local minimum. The mutation operator works by flipping bits in a chromosome according to a mutation probability, as shown in Fig. 4.

Figure 4: Mutation of a bit in a chromosome.

3 Complexity Analysis

In this section we aim to further explain our algorithm’s suitability with respect to its complexity. In brute-force, the total simulation count increases with respect to the solar cell’s layers which are thickness optimized, as shown previously in Eq. (1). In Big-O notation, which represents the upper bound for time complexity in an algorithm, the brute-force method has algorithmic complexity as in Eq. (2):


where is the number of layers and is the number of fitness function evaluations for a layer. In other words, the complexity increases exponentially with the number of layers, and that can be very expensive as that number grows.

Our goal is to efficiently optimize layer thickness in devices composed of a single layer and multiple layers alike. Thus our choice of genetic algorithms. GA is able to converge to an optimal solution by evaluating less individuals than the brute-force method. However, in the classical approach, the same individual might be evaluated multiple times. To prevent this redundancy from happening, we implement GA with dynamic programming. In this approach, there’s a dynamic dictionary, also called lookup table, that serves as memory to store the already evaluated individuals and their respective fitness scores. The dictionary is said to be dynamic because it may change size if the algorithm receives an individual whose fitness score hasn’t been calculated yet. This approach is illustrated with an example in Fig. 5, where in every generation, or iteration, the algorithm searches the memory for a desired individual. If this individual has already been computed, its fitness score can simply be used by the algorithm. Otherwise, the fitness function is evaluated and the lookup table is updated.

Figure 5: Genetic algorithm with dynamic programming, where blue represents values that need to be added to the lookup table in order to update it and grey represents values that have already been evaluated and need only to be copied when necessary.

4 Results and discussion

Since GA is a stochastic algorithm, we calculated the average number of simulations required by the GA and its standard deviation from 5,000 repeated runs per section. The accuracy of the data discussed below are all

, which means that all the 5,000 runs converged to the optimal solution. We have discussed three sections below: single layer - ZnO thickness optimization, single layer - MoOx thickness optimization, and multiple layers - concurrent ZnO and MoOx thickness optimization.

4.1 Single Layer

4.1.1 ZnO optical spacer layer

For the single ZnO optical spacer layer optimization, we fixed the MoOx layer thickness as 10 nm. We applied the brute-force and the genetic algorithm to our task and solved it within the same thickness limits of 0 to 80 nm. The best , which is also the fitness value, was obtained when the ZnO thickness was optimized to 30 nm (as shown in Fig. 1(a)). We have compared the total number of simulations and their respective accuracies for different selection methods. The initial population size, generations count, and mutation probability were the factors that were iterated in order to find the conditions that would use the least number of simulations to optimize the device structure. The population size was varied from 10 to 80 in increments of 10, the generation count from 10 to 100 in increments of 10, and the mutation probability from 5 to 100 in increments of 5. While the brute-force method required 81 simulations in total, the number of simulations required by the genetic algorithm was dependent on the selection method and initialization parameters used. The initialization parameters which provided the least average number of simulations from the 5,000 simulations, while keeping the accuracy at , is provided in Table 1.

Brute-force method: Number of simulations = 81
Optimized ZnO thickness = 30 nm
Selection Method
Parameter Random Roulette Tournament Breeder
Population 20 80 70 60
Generation 40 10 30 10
Mutation prob (%) 80 15 60 75
Mean (simulations) 78.16
Table 1: Comparison results for ZnO single layer optimization

Figure 6 presents the accuracy distribution over different initialization parameters. It was observed that the best result was obtained while using tournament selection model with the population size of 70, generation count of 30, and mutation probability of . It required simulations to reach the optimal solution. Although the GA algorithm was observed to produce only a reduction of in the number of simulations required, this was mainly due to two optimal result points in the data. Since the device with a 24 nm ZnO layer thickness exhibited a of 116.62 and the one with the optimal 30 nm ZnO layer thickness exhibited a near same of 116.67 , the algorithm took longer to converge at the optimal structure. In a practical scenario, however, if both the above mentioned structures were regarded as optimal, the algorithm would converge with high accuracy with much lesser number of simulations.

Figure 6: Single ZnO layer optimization using GA with tournament selection: accuracy () distribution data sliced at population size of 70, generation count of 30, and mutation probability of .

4.1.2 MoOx optical spacer layer

For the MoOx optical spacer single layer optimization, the ZnO thickness was fixed at 30 nm. The brute-force method required 31 simulations to determine the optimized layer thickness of 8 nm (Fig. 1(b)). For finding the best initialization parameter combination, we varied the population size from 5 to 20 in increments of 5, the generation count from 10 to 100 in increments of 10, and the mutation probability from 5 to 100 in increments of 5. The best case results for each selection model is provided in Table 2.

Brute-force method: Number of simulations = 31
Optimized MoOx thickness = 8 nm
Selection Method
Parameter Random Roulette Tournament Breeder
Population 15 5 15 15
Generation 20 100 30 80
Mutation prob (%) 80 75 75 80
Mean (simulations) 13.05
Table 2: Comparison results for MoOx single layer optimization

It was observed that while the roulette method was able to utilize less number of simulations to determine the optimal MoOx thickness, the other methods required nearly the same number of simulations as the brute-force method. We hypothesize that the roulette method’s preferential weighing of the fittest model aided in the convergence to the optimal solution faster. Figure 7 presents the accuracy distribution for the optimum initializing parameter values.

Figure 7: Single MoOx layer optimization using GA with roulette selection: accuracy () distribution data sliced at population size of 5, generation count of 100, and mutation probability of .

4.2 Multi-layer: ZnO + MoOx

As mentioned earlier, multi-layer optimization can take a large number of simulations. The computational and time cost required to run these simulations are expensive. GA can be utilized in order to refine the optimization process to take as less simulations as required. The ZnO layer thickness was incremented by 1 nm from 0 to 80 nm, while the same thickness increment was done from 0 to 30 nm for the MoOx layer. The brute-force method utilized 2,511 simulations to find the optimized optical spacer layer thicknesses of 24 nm ZnO and 8 nm MoOx. We converted the 3D Fig. 2(c) to a 2D Fig. 2(d) by applying labels for each ZnO and MoOx thickness combination. Thus, we have 2,511 labels and the GA algorithm was applied to determine the label pointing to the optimal result. The population size that was varied from 500 to 1,500 in increments of 500, the generation count from 10 to 100 in increments of 10, and the mutation probability from 10 to 100 in increments of 10. Table 3 presents the result from multi-layer optimization.

Brute-force method: Number of simulations = 2,511
Optimized ZnO thickness = 24 nm, Optimized MoOx thickness = 8 nm
Selection Method
Parameter Random Roulette Tournament Breeder
Population 500 1,000 500 500
Generation 90 90 80 90
Mutation prob (%) 10 90 20 50
Mean (simulations) 1,758.77
Table 3: Comparison results for multi-layer optimization

Figure 8 presents a reduction in the number of simulations required by the roulette selection method to obtain the optimal solution. As the complexity became higher, having more randomness in the population through a high mutation probability rate aided constructively to reduce the number of simulations required. Due to this, the roulette selection method was able to show a best average number of simulation count of from 5,000 repetitive runs.

Figure 8: Multi-layer optimization using GA with roulette selection: accuracy () distribution data sliced at population size of 1,000, generation count of 90, and mutation probability of .

5 Conclusion

We have presented that the genetic algorithm can perform better than the conventional parameter sweep used in simulations. In our best case scenario, it exhibited no loss in accuracy, while outperforming the brute-force method by up to

with the correct initialization parameters. In the worst case scenario, the GA utilized the same number of simulations as the brute-force method, demonstrating that it cannot be outperformed by brute-force. The GA is dependent on its initialization parameters and the selection method chosen. This article does not discuss on an automated way to assign these parameters as it is not in its research scope. However, the results suggest that there is possibility for greatly refining the parameter sweep method through the use of evolutionary algorithms as shown with both single and multi-layer optimization of the solar cell structure.


This research was supported by Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Science and ICT (2018R1D1A3B07049992/ 2018R1A2B6008815), and also by the BK21 Plus project funded by the Ministry of Education, Korea (21A20131600011). This work was also supported by MOTIE (Ministry of Trade, Industry & Energy) (project number 10063474). This work was also supported by the NRF grant funded by the Korea government (MSIT)(No. 2017R1A4A1015565).


  • L. C. Andreani, A. Bozzola, P. Kowalczewski, M. Liscidini, and L. Redorici (2019) Silicon solar cells: toward the efficiency limits. Advances in Physics: X 4 (1), pp. 1548305. Cited by: §1.
  • D. B. Conkey, A. N. Brown, A. M. Caravaca-Aguirre, and R. Piestun (2012) Genetic algorithm optimization for focusing through turbid media in noisy environments. Opt. Express 20 (5), pp. 4840–4849. Cited by: §1.
  • C. Darwin (2004) On the origin of species, 1859. Routledge. Cited by: §1.
  • Y. Fang and J. Li (2010)

    A review of tournament selection in genetic programming

    In International Symposium on Intelligence Computation and Applications, pp. 181–192. Cited by: §2.2.1.
  • R. A. Gouvea, M. L. Moreira, and J. A. Souza (2019) Evolutionary design algorithm for optimal light trapping in solar cells. Journal of Applied Physics 125 (4), pp. 043105. Cited by: §1.
  • S. Jafar-Zanjani, S. Inampudi, and H. Mosallaei (2018) Adaptive Genetic Algorithm for Optical Metasurfaces Design. Scientific Reports 8 (1), pp. 11040. External Links: ISSN 2045-2322 Cited by: §1.
  • K. Jebari and M. Madiafi (2013) Selection methods for genetic algorithms. International Journal of Emerging Sciences 3 (4), pp. 333–344. Cited by: §2.2.1.
  • K. Man, K. Tang, and S. Kwong (1996) Genetic algorithms: concepts and applications [in engineering design]. IEEE transactions on Industrial Electronics 43 (5), pp. 519–534. Cited by: §1, §2.2.
  • T. Mueller, E. Johlin, and J. C. Grossman (2014)

    Origins of hole traps in hydrogenated nanocrystalline and amorphous silicon revealed through machine learning

    Phys. Rev. B 89, pp. 115202. Cited by: §1.
  • H. Mühlenbein and D. Schlierkamp-Voosen (1993) Predictive models for the breeder genetic algorithm i. continuous parameter optimization. Evolutionary computation 1 (1), pp. 25–49. Cited by: §2.2.1.
  • J. Piprek, D. Lasaosa, D. Pasquariello, and J. E. Bowers (2003) Optimization of gaas amplification photodetectors for 700% quantum efficiency. IEEE Journal of Selected Topics in Quantum Electronics 9 (3), pp. 776–782. External Links: ISSN 1077-260X Cited by: §1.
  • C. Tsai, Y. Fang, and C. Lin (2015) Application of genetic algorithm on optimization of laser beam shaping. Opt. Express 23 (12), pp. 15877–15887. Cited by: §1.
  • P. Vincent, S. Shin, J. S. Goo, Y. You, B. Cho, S. Lee, D. Lee, S. R. Kwon, K. Chung, J. Lee, et al. (2018) Indoor-type photovoltaics with organic solar cells through optimal design. Dyes and Pigments 159, pp. 306–313. Cited by: §1, §2.1.
  • P. Vincent, D. Song, J. Jung, J. Kwon, H. B. Kwon, D. Kim, E. Choe, Y. Kim, H. Kim, and J. Bae (2017) Dependence of the hybrid solar cell efficiency on the thickness of zno nanoparticle optical spacer interlayer. Molecular Crystals and Liquid Crystals 653 (1), pp. 254–259. Cited by: §1, §2.1.
  • C. Wang, S. Yu, W. Chen, and C. Sun (2013) Highly Efficient Light-Trapping Structure Design Inspired By Natural Evolution. Scientific Reports 3, pp. 1025. Cited by: §1.
  • W. Q. Zhang, S. A. V., and T. M. Monro (2009) A genetic algorithm based approach to fiber design for high coherence and large bandwidth supercontinuum generation. Opt. Express 17 (21), pp. 19311–19327. Cited by: §1.