# Automated Design of CubeSats using Evolutionary Algorithm for Trade Space Selection
## 4 CubeSat Design
### Optimization  
Now to solve the described CubeSat design problem implemented as a multidimensional multiple-choice knapsack problem, an evolutionary algorithm is used. The constraints described in Equation (6) divide the search space into two regions--feasible and infeasible regions. The constraints are handled using the penalty function approach. For each solution \(\mathcal{G}^{(i)}\), \(i\) being the index of the gene, the constraint violation for the inequality constraints \(\mathbb{G}_{j}\big{(}\mathcal{G}^{(i)}\big{)}\leq 0\) are calculated as in Equation (19).  
\[\omega_{j}\big{(}\mathcal{G}^{(i)}\big{)}=\left\{\begin{array}{l}\big{|} \mathbb{G}_{j}\big{(}\mathcal{G}^{(i)}\big{)},\text{ \emph{if} }\mathbb{G}_{j}\big{(}\mathcal{G}^{(i)}\big{)}>0\\ 0\text{ \emph{otherwise}}\end{array}\right. \tag{19}\]  
Thereafter, all constraint violations are added together to get the overall constraint violation as in Equation (20). There are 10 constraints in the optimization problem and constraint 10 is decomposed into 2 inequality constraints.  
\[\Omega\big{(}\mathcal{G}^{(i)}\big{)}=\sum_{j=1}^{11}\omega_{j}\big{(}\mathcal{ G}^{(i)}\big{)} \tag{20}\]  
This constraint violation is then multiplied with a penalty parameter, \(\mathcal{P}\), and then the product is added to each of the objective function as in Equation (21).  
\[\mathcal{F}\big{(}\mathcal{G}^{(i)}\big{)}=f\big{(}\mathcal{G}^{(i)}\big{)}+ \mathcal{P}\Omega\big{(}\mathcal{G}^{(i)}\big{)} \tag{21}\]  
The fitness function, \(\mathcal{F}\), takes into account the constraint violations. For a feasible solution the corresponding \(\Omega\) term is zero and \(\mathcal{F}\) becomes equal to the original objective function \(f\). However, for an infeasible solution, \(\mathcal{F}>f\), thereby adding a penalty corresponding to the total constraint violation. Once the fitness function is derived, the steps for an EA are used to optimize the problem. Initially, a random parent population, \(P_{0}\), is created of size \(N_{P}\). Each individual of the parent population comprises of the design variables represented by the gene, \(\mathcal{G}\), chosen by a discrete uniform distribution \(\mathcal{G}_{j}=\mathcal{U}\Big{(}\mathcal{G}_{j}^{(U)},\mathcal{G}_{j}^{(L)} \Big{)}\), where \(\mathcal{G}_{j}\) is the j-th design variable and \(\mathcal{G}_{j}^{(U)}\) and \(\mathcal{G}_{j}^{(L)}\) are the upper and lower bounds of the design variables. For each individual, the value of the fitness function \(\mathcal{F}(\mathcal{G})\) is evaluated using the simulation environment as shown in Figure 6. Next, the usual tournament selection, crossover, and mutation operators are used to create an offspring population, \(Q_{0}\), of size \(N_{Q}\)[34]. For crossover, a blend crossover (BLX-\(\alpha\)) operator is used [35]. During mutation, we use a non-uniform mutation  
Figure 9: Illustration of communication line-of-sight.  
operator. The mutation operator is constructed such that the probability of creating a solution closer to the parent is more than the probability of creating one away from it [36]. By comparing the current population with previously found best solutions, elitism is introduced into the algorithm. For the \(t^{th}\) generation, first a combined population \(R_{t}=P_{t}+Q_{t}\) is formed. The population \(R_{t}\) is of size \(N\ +N_{Q}\). Since all previous and current population members are included in \(R_{t}\), elitism is automatically ensured. Next, the fitness of each individual in \(R_{t}\) is calculated according to the fitness function \(\mathcal{F}(\mathcal{G})\). Based on the value of the fitness function, the population is sorted in ascending order and the best \(N\) individuals are selected for the next generation. The new population, \(P_{t+1}\), of size \(N\) is again used for selection, crossover, and mutation to create a new population, \(Q_{t+1}\), of size \(N_{Q}\). The process is repeated until the desired results are obtained, or the max number of generations are achieved.