## 2 Proposed Methodology of This Study  
The aim of this section is to explore the methodology adopted and the underlying concepts of data-driven methods employed, to better understand the reasons behind the main design choices. First of all, an overview on the framework, the setting of the testing environment, and the strategy of data processing are given. Afterwards, some insight on data-driven techniques for detection is presented: firstly, the basic one based on thresholds in Section 2.1; then, some theoretical background of the main two Machine Learning methods adopted is provided in Sections 2.2 and 2.3, highlighting the reason for their use and their limitations. Finally, in Section 2.4, most of the typical faults of a satellite's ADCS are summarized in a restricted number of anomalous scenarios: these are adopted in a modular way as the baseline for building the large datasets employed in this study, for training and simulation purposes. As shown in Figure 1, two detection methods with radically different approaches are followed: one is a relatively simple variance-based detection algorithm, relying on thresholds and logical relations, which takes data directly from the simulation and is explored in detail in Section 2.1. The other approach involves the characteristic process pipeline for Machine Learning techniques: data from sensors and actuators is gathered into large datasets containing signal records from hundreds of simulations. Each element of these datasets is then further processed: instead of storing and working with entire signals, only a few time- and frequency-domain features are extracted to significantly reduce the number of inputs for the learning agents to train on. All of the features are explained and motivated in Section 3, while the full list of employed classifiers is detailed in Section 5. This work approaches the use of Machine Learning in fault detection in a spacecraft's ADCS context, while trying to extract general observations, so that the methodology can potentially be extended to other pivotal subsystems, and even at a higher system level directly. Innovative learning algorithms are benchmarked against a variance-based method, which is already fully implemented in the functional simulation, and is explored in detail in Section 2.1. Trained learning agents in this study are tasked with many different duties, with the number of output classes heavily dependent on the specific task. Figure 2 shows all the detection methods and the instances in which they are employed: the testing considers first the baseline threshold-based algorithm for a simple detection, and the classifiers for a 4-class classification mimicking a similar behavior. Then, learning agents are tested and specialized on two-class detection, on signals containing one or multiple faults: in addition to that, there is the potential for a real diagnosis, instead of simple detection, which is tested  
Figure 1: Scheme of data-driven detection performed. Outputs of sensors and actuators, the signals studied in this work, follow two different pipelines: in one case, they are directly processed by a threshold-based detection. In parallel to that, signals generated during many simulations are gathered in datasets, then processed to extract and rank by importance only a few meaningful features. These are the actual inputs to train learning agents, which are the other detection elements of this study. on the same families of classifiers. As final tests, two specific case studies are proposed, where trained classifiers are fully implemented in the functional simulation loop of the satellite, in synergy with the already mentioned variance-based detection algorithm. All of the tests conducted and the results retrieved are reported in Section 5 in detail. The data to train the learning agents does not come from an actual mission, but is generated in an acceptably realistic way through the MATLAB(R2024b) Simulink(r) simulator presented in Section 4.