# Evolutionary Maximization of Energy Amount Harvested by Means of Panel of Thermoelectric Modules
## 3 Thermoelectric Panel with Evolutionary MPPT
### Genetic Operations  
During the genetic material recombination process, better fitted individuals are preferred, so the reproduction (mating) pool is collected respectively to their qualities. Initially, chromosomes are sorted, respectively, to achieved fitness values (represent power point received) in descending order. This means that the one with currently the best phenotype is the first one in this queue (obtains rank 1, i.e., the highest in the population), while the code of the worst phenotype is ordered as the last one (i.e., with \(K\) rank, integer number equal to population size). Next, the mating pool is completed randomly with success selection when the below formula is fulfilled:  
\[\left[P_{mn}+(1-P_{mn})\frac{K-r}{K}\right]>Rand(1), \tag{10}\]  
where \(P_{mn}\) is minimal probability assumed for selection (this parameter regulates selection pressure, gives chance to worse chromosomes to be recombined too, protects before algorithm stagnation at local optimums) and \(r\) means the rank of a candidate.  
After parental pool determination, the pairs of \(k_{1}\)-th and \(k_{2}\)-th chromosomes are pointed randomly among them (\(k_{1}\), \(k_{2}\) = 1,..., \(K\)) and crossover procedure is started. The proposed evolutionary system uses weighted sum to calculate resultant, recombined \(n\)-th gene (\(n\) = 1,..., \(N\)) from the formula:  
\[\tilde{c_{n}}=\frac{Fit(\mathbf{D}+\mathbf{C}_{k1})}{Fit(\mathbf{D}+\mathbf{C}_{k1})+ Fit(\mathbf{D}+\mathbf{C}_{k2})}c_{k1n}+\frac{Fit(\mathbf{D}+\mathbf{C}_{k2})}{Fit( \mathbf{D}+\mathbf{C}_{k1})+Fit(\mathbf{D}+\mathbf{C}_{k2})}c_{k2n}, \tag{11}\]  
where \(c_{k1n}\), \(c_{k2n}\) are parental genes (decimal values coding \(n\)-th channel duty cycle correction), \(Fit(\mathbf{D}+\mathbf{C}_{k1})\), \(Fit(\mathbf{D}+\mathbf{C}_{k2})\) mean fitness values reached for respective parents (power points (6) obtained after correction). This crossover scheme is executed on the selected pairs with probability \(P_{\sigma}\) (the same copies are preserved otherwise) and the proposed recombination scheme allows to inherit a significant part of leading chromosome genes that is spreading to next generations.  
Fully random degradation of genetic material is called mutation and for the proposed system it is a simple replacing of genes pointed with small probability \(P_{mu}\) by a completely new integer number uniformly chosen from the allowed range \(\langle-C_{MX},\ldots,0..,C_{MX}\rangle\). The goal of this operation is to make testing of solutions different from the dominating one available and it is especially important e.g., when TE system load rapidly changes (MPP should be searched on another part of solutions space).  
Finally, after the described recombination steps, offspring chromosomes are ready to proceed into the next generation. For the specific problem of MPPT, a special succession technique is applied and this may be seen in Figure 3 diagram. The first eight chromosomes of the newly created population are constructed from a subset of specialized individuals:  
\[[\mathbf{P}_{1},\ldots,\mathbf{P}_{8}]=[\mathbf{C},\mathbf{C},\mathbf{C},2 \mathbf{C},4\mathbf{C},\,0,-1,1], \tag{12}\]  
which are the last vector of the best corrections found and vectors created from the fourth, half of them as well as the two and the four times of them. Additionally, there are the zeroed vector and fully completed ones with decimal \(-1\) or \(1\), and they assure previously found power point preservation, minimal (one step) decreasing or increasing of duty cycles, respectively. This solution gives a chance to efficiently test corrections of vector \(\mathbf{D}\) by currently the best vector \(\mathbf{C}\) (elitist model) and makes possible its keeping or local adjusting (i.e., down or up, with the system counter resolution maximal preciseness). The evolutionary controlled MPPT algorithm explained was tested by means of simulation and practical experiments described in the next two sections.