# Automated Design of CubeSats using Evolutionary Algorithm for Trade Space Selection
## 4 CubeSat Design
### Solar Power Generation  
For solar power, first the sun-to-satellite line-of-sight, \(LOS_{s}\), is calculated which is essentially a multiplier for the solar panel exposed area to calculate the solar power generated. The \(LOS_{s}\) is 0 if the satellite is in the eclipse and 1 otherwise, however, to implement the umbra and penumbra effects, the discontinuous function is smoothed by using a cubic function [32], as shown in Equation (9). \[LOS_{s}=\left\{\begin{aligned} & 1&&\overset{\rightharpoonup}{r}_{b/e}\overset{ \rightharpoonup}{\chi}_{s/e}\geq 0\\ &\left\{ \begin{aligned} & 1&&,& \quad d_{s}>R_{e}\\ & 3\eta^{2}-2\eta^{3}&,&\quad\alpha R_{e}+d_{s}<R_{e}\\ & 0&&,&\quad d_{s}<\alpha R_{e}\end{aligned}  \right\}\right.\overset{\rightharpoonup}{\chi}_{b/e}\overset{ \rightharpoonup}{\chi}_{s/e}<0 \tag{9}\]  
where \(d_{s}\) and \(\eta\) are given by Equation (10). \[d_{s}=\|\overset{\rightharpoonup}{r}_{b/e}\times\hat{r}_{s/e}\|_{2}\text{ and }\eta=\frac{d_{s}-\alpha R_{e}}{R_{e}-\alpha R_{e}} \tag{10}\]  
The vectors \(\overset{\rightharpoonup}{r}_{b/e}\) and \(\hat{r}_{s/e}\) are shown in Figure 6. The value of \(\alpha\) represents how far this smoothing effect extends into the Earth's shadow, typically \(\alpha=0.9\). Next, with the position of the sun knownwith respect to the satellite, the exposed solar panel area is required to calculate the total solar power generated. The exposed solar panel area is done in two steps. First for each panel having an area \(A_{p}\) and unit normal vector \(\hat{n}_{p}\) and the body-to-sun unit vector \(\hat{r}_{s/b}\), the projected area of each panel on a plane perpendicular to \(\hat{r}_{s/b}\) is given by Equation (11) and shown in Figure 7a. \[A_{proj}= \begin{cases}\hat{r}_{s/b}\cdot\hat{n}_{p}A_{p}&,\hat{r}_{s/b}\cdot \hat{n}_{p}>0\\ 0&,\hat{r}_{s/b}\cdot\hat{n}_{p}\leq 0\end{cases}  \tag{11}\]  
Next, if the satellite consists of deployable solar panels, the effects of shadows projected by one panel onto another must be considered. For two panels [panel 1, panel 2] with areas \(\left\{A_{p1},\ A_{p2}\right\}\) and unit normal vectors \(\left\{\hat{n}_{p1},\hat{n}_{p2}\right\}\), and body-to-sun unit vector \(\hat{r}_{s/b}\), the shadow cast by panel 2 on panel 1 is calculated by two successive projections and an intersection operator as shown in Figure 7b. The first projection is of panel 1 on a plane perpendicular to \(\hat{r}_{s/b}\) given by \(A^{\prime}=\hat{r}_{s/b}\cdot\hat{n}_{p2}A_{p1}\), and the second projection is of panel 2 on a plane perpendicular to \(\hat{r}_{s/b}\) given by \(A^{\prime\prime}=\hat{r}_{s/b}\cdot\hat{n}_{p1}A_{p2}\). Finally, the projected shadow cast by panel 2 on panel 1 on a plane perpendicular to \(\hat{r}_{s/b}\) is the intersection of areas \(A^{\prime}\) and \(A^{\prime\prime}\), as shown by Equation (12). \[A_{shad}=A_{p1}\cap A^{\prime\prime} \tag{12}\]  
Figure 6: Illustration of Sun line-of-sight. Figure 7: Solar panel projected area: (**a**) projected area of a single solar panel; (**b**) projected area of one panel onto another for shadow calculation. Thus, the total exposed solar panel area is expressed as Equation (13). \[A_{exp}=\sum_{i=1}^{n}\Biggl{(}A_{(i)proj}-\sum_{j=1}^{k}A_{shad(j)}\Biggr{)} \tag{13}\]  
where \(n\) is the total number of solar panels, and \(j=\{1,\dots,k\}\) are the neighboring panels for panel \(i\). Finally, the solar power generated is calculated as Equation (14). \[P_{solar}=S_{0}\varepsilon_{cell}A_{exp} \tag{14}\]  
where \(S_{0}\) is the solar constant, and \(\varepsilon_{cell}\) is the efficiency of the photovoltaic solar cells on each solar panel. Figure 8 shows the simulation results of the solar panel exposed area model for a CubeSat with two panels: one body panel and one deployed panel, as shown in Figure 8a. The simulation is performed in MATLAB, and the rendering of the CubeSat model shown in Figure 8a is done in MATLAB VRML.