## 2 The Electrical Machine Used  
The electrical machine used in this study is a 15 kW, 12-pole surface permanent magnet machine used in medium hybrid electric vehicles [38]. The magnets have 4.5 mm radial length and they are made of Neodymium iron boron. The model of the machine is constructed using finite element analysis, which is a widely used numerical model, being simple and accurate [31; 39]. The electromagnetic, thermal, and vibration models of the machine are built. The inputs of the prognostic model, where the RUL will be calculated at its end, are torque, temperature, and vibration. The model will be built for undamaged machines and for machines with radial cracks of different depths in one of the 12 magnets. A two-pole section of the healthy machine's laminated sheet is shown in Figure 1; it is developed using 'MATLAB'. In Figure 2a, a meshed view of the laminated sheet with a zoom on the cracked magnet is presented. The depth of the crack in Figure 2a is 1 mm. The considered first faulty state of the machine is the machine with a 1 mm radial crack in one magnet. A crack with depth less than 1 mm is not considered because it is at this depth where a change in the air gap flux density, torque, temperature, and vibration is detectable compared to the healthy state of the machine. The radial length of the surface magnet is 4.5 mm; yet, we chose the final state of the fault to be a radial crack of 4 mm depth in the magnet instead of 4.5 mm. Although a 4.5 mm crack depth is a representation of a total fracture of the magnet, modeling it will cause a major change in the topology of the machine. In all cases, the end purpose of this study is 'prognosis'. Hence, the suggested approach is supposed to detect the presence of this fault before a total failure occurs. In Figure 2b, a meshed view of the laminated sheet where the crack deepens and becomes 4 mm is presented. Figure 1: Two-pole section of the SPMM’s laminated sheet in healthy state. In Figure 3, Figure 4a,b, and Figure 5a,b we are illustrating the air gap flux density, in space, in the healthy case and in the case of 1 mm crack in the magnet as well as a 2 mm crack, 3 mm crack, and 4 mm crack. Figure 4: (**a**) Air gap flux density with a 1 mm crack. (**b**) Air gap flux density with a 2 mm crack. Figure 3: Air gap flux density in the healthy case. Figure 2: (**a**) Crack of 1 mm depth in the first magnet of pole 1 (meshed view). (**b**) Meshed laminated sheet with 4 mm crack in the magnet. In Figure 3, Figure 4a,b and Figure 5a,b, we can see the change in air gap flux density when the crack deepens to reach 4 mm depth. The torque of the machine is directly proportional to the air gap flux density. Hence, this proves that the torque is a good indicator for this type of fault. In Figure 6, we are seeing the change in the vibration of the machine's periphery, in the space domain, for the healthy case and for the case of cracks in the magnet. In Figure 7, the vibration in the case of 4 mm crack and the function of time are illustrated. Figures 6 and 7 show that the vibration is a good indicator for the presence of this type of fault. Figure 5: (a) Air gap flux density with a 3 mm crack. (b) Air gap flux density with a 4 mm crack. Figure 6: Vibration on the machine’s periphery in the case of crack in the magnet. In Figure 8, the temperature on the machine's periphery is illustrated in the healthy case and in the case of 1 mm crack in one magnet. A zoomed view of Figure 8 is shown in Figure 9. In Figure 10, the variation in the temperature function of time in the presence of one crack in one of the twelve magnets is shown. We mention that the data are collected from a virtual sensor located at the outer periphery of the machine in the finite element model. Although the variation in the temperature is not highly detectable for demagnetization fault, temperature will be considered as an input for the model because prognosis is detecting the fault before it occurs or when it occurs at a very small scale.