## 5 Results
### Possible Use in Synergy: Detection and Diagnosis  
As previously stated, combining the two detection philosophies explored in this work tends to give the best results overall. The two final rows of Figure 2 foresee these last case studies, which concern classifiers perfectly embedded and implemented into the functional simulator, instead of being trained and tested in a distinct environment. As a first example of synergy use, it is possible to replicate exactly the scenario described in Section 5.3. In this simulation, during a slew maneuver, one of the axes of the magnetometer starts behaving unexpectedly. In particular, some erratic behavior starts at \(T=44\) s into the simulation, as shown in Figure 9(a).  
This is a particularly troublesome behavior affecting sensors, since the MEKF placed directly down in the pipeline of the spacecraft data processing might filter out the excessive noise, rendering the fault possibly unnoticeable. However, in the functional simulation, the sensor in question is being monitored by standard detection algorithms: the three axes of the magnetometers are being processed live, and an \"Anomaly\" flag is almost immediately turned on (Figure 9(b)). On a spacecraft provided only with a threshold-based algorithm, the detection function would stop here. However, by applying the strategy described in the previous section, it is possible to start an in-depth diagnosis process, operated by a trained classifier, for a more detailed analysis. Therefore, in this example, the Anomaly flag activates a Large Neural Network for fault diagnosis of Magnetometers (specialized in slew maneuvers), precisely the one trained and tested here before, with details and accuracy reported in Table 8. The network is activated immediately, at \(T=44\) s, and its sliding window starts to process the past 20 s of simulation, sliding the window and refreshing its output once every second. After a first round where the algorithm seems to have found evidence of spikes on the signal, the network stabilizes its diagnosis by consistently reporting an erratic behavior from \(T=46\) s onward. If this information is communicated to  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Gyroscope** & **Sun Sensor** & **Magnetometer** & **Actuators** \\ \hline
**Total Time** & 0.428 & 0.411 & 0.446 & 0.468 \\ \hline \hline \end{tabular}
\end{table}
Table 10: Profiler-Times Report (in seconds) on a slew maneuver run for classic detectors. Total simulation time: 16.455 s.  
other recovery systems onboard, other decision processes could pick the most appropriate response, basing their choice on more than a simple binary fault alarm. This example is built by directly plugging in the simulation one of the trained networks showcased before, proving how the testing process has followed a highly modular approach.  
Additionally, a brief initial instance of mislabeling in Figure 10c is understandable, since the network is trained, as explained in Section 2.4, only on signals containing faults that start between the first 5% and the last 20% of the analyzed window: an improved version of the same network could be fed more extreme cases during training, so that during its operation, its quickness on recognizing faults can improve.