5.2.1. Fault Diagnosis

The fault-diagnosis routine is at first tested against the database of 25 simulation cycles representative of health conditions to check for the eventual occurrence of false alarms. As anticipated, such a database is built considering the expected distribution of actuator parameters, such as geometrical quantities, physical properties, and according to production tolerances. Similarly, temperature variations, load, and command histories are also randomly drawn from probability distributions representative of the expected operative conditions. Under such a hypothesis, the fault-detection algorithm provided no false alarms. The fault diagnosis was then employed to detect and classify the faults affecting the simulated dataset, achieving the results depicted in Figure 22, where the classification rate is expressed in percentage. Under the assumption of just one failure mode occurring at any time, consistent with the objectives of the technological demonstrator, the fault-diagnosis algorithm provides acceptable results, with misclassification occurring only between the efficiency loss and magnet degradation failure modes. In particular, 4% of the cases associated with the occurrence of magnet degradation were incorrectly classified as efficiency losses within the mechanical transmission, while the opposite situation occurred for 12% of the simulated efficiency losses patterns. No misclassifications were observed for the other failure modes, although this result is probably skewed by the absence of possible concurrent degradation modes.

**Figure 22.** Confusion matrix for fault classification and example of the fault diagnosis algorithm for the turn-to-turn short failure mode.
