## 5 Results
### Possible Use in Synergy: MEKF Enhanced Detection  
As a final study case, let us address the main problem found while evaluating threshold-based detection performances: the impossibility to detect drifting signals. A solution could be to set up a learning agent that collects the outputs of the MEKF in the configuration of Figure 11. The classification network is trained on a dataset of 840 short snippets of MEKF-estimated angular rates, recorded during simulated slew maneuvers, half of which behave in an irregular way due to a drift injected on the actuators. Inputs to the learner are the previously explained 26 features from each one of the axes, so a total of 78 elements. Therefore, once the Neural Network is inserted in the loop, the estimated angular rates incoming from the MEKF need to be split into their three axes components; then, they shall be buffered with the desired length of 20 s at a time, and at that point, features are finally extracted. This is a chance both to show the general setup of a trained learning agent in the loop, as well as to address a more specific and peculiar example: detecting drift faults in actuators, by only looking at MEKF outputs.  
Figure 10: Plot **(a)** shows a faulty magnetometer signal. Plot **(b)** highlights how the classic threshold-based detector quickly raises a flag, indicating an anomaly. In Figure **(c)**, the Large Neural Network responsible for diagnostic (from Table 8) attempts to add details to the analysis by pointing out exactly what kind of fault is happening.  
Figure 12 explores exactly this case study: the Neural Network detector starts by emitting a null output for the first 20 s, since it does not have enough data to work with. After that, the window starts moving, and real detection effectively starts: it only takes a few seconds, just enough time to incorporate the start of the anomaly in the window, for the network to realize something is wrong and to raise a flag.  
It is clear how, despite a lower rate of update of the Neural Network output (the window updates each second, so the resolution is much lower than the sampling time of the simulation), it surpasses the classic threshold-based detector by being extremely quicker and more targeted. As previously said, the training in this case was specifically carried out to identify drifts only, which are the anomalies totally oblivious to classic detection,  
Figure 11: MEKF output classification network layout.  
Figure 12: Example of monitored signals from the proposed architecture. Figure (**a**) shows the actuator output, with an injected drift fault starting at time t = 20 s. Figure (**b**) shows the angular rates estimated by the MEKF, with a visible repercussion of a fault happening elsewhere; (**c**) is the “Anomaly” variance-based detector monitoring the actuators, which emits a flag only when the continuous fault injection is stopped; (**d**) is the Large Neural Network monitoring the MEKF outputs. This is one of the mentioned instances where a fault happening on actuators completely bypasses threshold-based detection but is seen and recognized by classifiers strategically trained and placed on the attitude estimation block outputs.  
but it is interesting to notice how the classifier works by monitoring some parameters in a completely different subsystem with respect to the location of the fault. It is easy to imagine other examples of classifiers and classic detection coming together to fill each others' weaknesses and blind spots, even while staying in the realm of simple detection.