## 2 Spacecraft Attitude Dynamics, Determination and Control
### Attitude Determination and Control Architecture  
The attitude determination and control architecture is implemented to guarantee the correct execution of the proposed attitude determination and control subsystem. The proposed ADCS architecture scheme is reported in Figure 2 highlighting the main data interfaces at the element level, and the algorithm process. The ADCS algorithm is sequential and continuously running whenever the system is active. The subsystem architecture foresees a close integration of the ADCS with the electrical power subsystem (EPS) of the spacecraft, which is responsible for the management of the solar arrays and the generation of the associated telemetry data. In fact, the power generation of the solar arrays is subjected to a closed-loop control action from the EPS to have proper regulation and conditioning of the incoming electrical current. Moreover, the solar arrays may be subdivided into different sections or strings, and multiple current readings may be available. Anyhow, \(N\) current measurements from independent groups of solar cells, \(I_{Si}\), shall be available for the ADCS processing. Each current value must be associated with a group of primary solar cells with a unique \(\hat{\mathbf{n}}_{S}\). The ADCS processes these data to obtain the Sun angle with respect to the primary solar arrays:  
\[\alpha_{S}=f(I_{S1},\ldots,I_{SM}),\text{ with }\{\hat{\mathbf{n}}_{S1},\ldots, \hat{\mathbf{n}}_{SM}\}=\hat{\mathbf{n}}_{S}\text{ and }M\leq N. \tag{11}\]  
This is done by knowing the way in which the solar cells are grouped and oriented. The maximum current values for each group of solar cells, \(I_{0i}\), shall be known by ground characterization and testing. Moreover, these parameters could be also updated along the mission lifetime in a way to re-calibrate the algorithms and account for solar arrays degradation and aging. Although, it shall be noted that the proposed algorithm is not very sensitive to a calibration error in these values, being the control logic designed to minimize the Sun angle. In fact, a wrong value for \(I_{0i}\) would result in the algorithm not reaching \(\alpha_{S}=0\), but a different minimum numerical value, always associated with the  
Figure 2: Solar arrays pointing ADCS scheme, with data interfaces and visual algorithm schema. maximum power generation. The sole negative effect is associated with slightly larger oscillations around the correct pointing state. This is due to a non-exact scaling term \(f(\alpha_{S})\). Furthermore, relative errors between different groups of solar cells are not relevant since they are averaged along the process in Equation (11), and they are associated with a single normal direction. The electric measurements of secondary solar panels, \(I_{Si}\) with \(M<i\leq N\) (i.e., solar cells aligned in other directions), are not directly used from the ADCS and Equation (11), but they can be exploited together with the primary measurements to detect if the spacecraft is currently shadowed by the Earth and no Sun pointing shall be commanded. In fact, the ADCS shall be capable to detect the eclipse condition and issuing an eclipse flag, \(ecl\). The proposed algorithms achieve this by comparing the overall power generation of all the available solar cells with respect to a minimum threshold:  
\[ecl=1,\text{ if }\sum_{i=1}^{N}I_{Sj}<I_{S_{ecl}}, \tag{12}\]  
where \(I_{S_{ecl}}\) is a calibration parameter very close to zero to reduce the number of false eclipse events. Moreover, the presence of solar cells shall not leave uncovered directions. If this is not the case, or if no secondary solar cell is available, the eclipse condition shall be detected on-board with a proper orbital model or GNSS sensor, or by exploiting Sun presence sensors placed on the external surfaces of the spacecraft.