**3. Materials and Methods**

The proposed PHM strategy is built around the MM, whose simulations can be run almost in real time [36,37]. The other inputs for the prognostic strategy are, of course, the signals coming from the sensors mounted on the physical system (as shown in Figure 1).

However, real-life actuator data is difficult to obtain, and the failures are very rare indeed. Therefore, in this study, data have been generated through the aforementioned RM, which has been used as a NTB. The authors set up the RM and generated the failure data; the prognostic algorithm was then employed to detect and identify the failures and, after its run, the results were compared and the errors were calculated. Figure 1 shows the overview of the overall methodology. On the right, the reader can notice data coming from sensors or from the database created by the NTB. y

**Figure 1.** FDI methodology overview [10].

The RM and MM are two physical-based models, developed in Simulink starting from equations implementing the real physical behaviours: actual equations are implemented in Simulink blocks (e.g., EM motor equations, dynamic equations, etc.). A more in depth description will be provided in Section 3.2. The models are defined by a set of top level parameters (TLPs), grouped inside a −→*<sup>k</sup>* vector, as better explained later on. Each component of the vector is linked and can be traced back to a failure in the EMA. By altering these parameters, it is possible to inject failures inside the models. For all intents and purposes, the TLPs change the simulation boundary conditions; hence, it is possible to simulate the actuator behaviours in different conditions. Both models have been verified and experimentally validated under nominal and non nominal settings, proving the models' capacity to estimate actual trends with high precision.

During a prognostic routine, the MM is then iteratively run with different sets of TLPs. In fact, in each simulation run, the TLPs are updated following the results obtained by the optimization using the MSA. The algorithm tries to find the monitoring TLPs that alter the MM outputs in order to reduce the error between the predicted and actual trends (real or simulated). A real-time solution is not feasible because of the total running time of the high number of simulation runs, as stated better later on. The error is defined using a suitable fitness function (Equation (4)). As a result, after the optimization process is complete, the output of the MM is extremely similar to the actual one. After finding a satisfactory match, the system's health is evaluated by comparing the related TLPs with the related failures. Therefore, it is possible to execute a basic but effective FDI process by examining TLPs to determine whether a failure is occurring and establish what kind of failure it is.

As stated before, and as [38] explained, the TLPs are grouped inside a normalised vector −→*<sup>k</sup>* (Equation (1)): each component *ki* is strictly linked to a physical system failure and it can assume values between 0 and 1 to characterize different failure magnitudes.

$$
\overrightarrow{\dot{k'}} = [k\_1 \ k\_2 \ k\_3 \ k\_4 \ k\_5 \ k\_6 \ k\_7 \ k\_8]\_\prime \tag{1}
$$


Table 1 shows in a schematic way each TLP along with the effects on the system at the relative maximum and minimum values. Note that maximum eccentricity refers to a situation where the eccentricity modulus is equal to the rotor air gap width.

As far as the failure implementation is concerned, each *k* coefficient is used in the MM and in the RM as a parameter that affects the model behaviour in different ways. For instance, *k*<sup>1</sup> is multiplied with the static or dynamic friction coefficients within the coulombian friction implementation. *k*<sup>2</sup> coefficient multiplies the global backlash value inside the model, appropriately modelled by a Simulink block. On the other hand, *k*3, *k*4, and *k*<sup>5</sup> represent the percentages of each phase affected by short circuit. These coefficients modify the wirings resistance (in a linear way) and inductance (in a quadratic way), hence affecting the electrical modelling of the system, as reported in [39]. The outcome of rotor eccentricity is modelled according to the following formulas [40], shown in Equation (2):

$$\begin{array}{l} \mathcal{c}\_1 = \mathcal{c}\_{1,0} \cdot (1 + k\_6 \cdot \cos(\theta\_m + k\_7)) \\ \mathcal{c}\_2 = \mathcal{c}\_{2,0} \cdot (1 + k\_6 \cdot \cos(\theta\_m + k\_7 + \frac{2\pi}{3})) \\ \mathcal{c}\_3 = \mathcal{c}\_{3,0} \cdot (1 + k\_6 \cdot \cos(\theta\_m + k\_7 - \frac{2\pi}{3})) \end{array} \tag{2}$$

where *c*1, *c*2, and *c*<sup>3</sup> are the resulting back-EMF coefficient for the three phases, starting from the nominal coefficients *c*1,0, *c*2,0, and *c*3,0. On the other hand, *θ<sup>m</sup>* is the mechanical rotor angle. Finally, *k*<sup>8</sup> simply multiplies the proportional gain in the controller block.

The nominal vector (i.e., the vector whose components would lead to a nominal behaviour of the EMA) is, hence, the one reported (Equation (3)):

$$
\overrightarrow{k'} = [0\,0\,0\,0\,0\,0\,0.5\,0.5],
\tag{3}
$$

The fitness function is defined as:

$$e\_{lls} = \sum\_{i} \frac{(I\_{MM,i} - I\_{RM,i})^2}{\left(\frac{\Delta I\_{RM,i}}{\Delta T}\right)^2 + 1} \cdot \Delta T\_{\prime} \tag{4}$$

where *IMM*,*<sup>i</sup>* and *IRM*,*<sup>i</sup>* are the MM and RM current outputs respectively at the instant time *i* [41]. Furthermore, the quadratic error between these two currents is evaluated to consider both the error in time and in the signal. Finally, the first order derivative is calculated numerically using Matlab's gradient command and divided by the integration step Δ*T*. Finally, to avoid the time dependence of the error, it is multiplied by the simulation integration step itself Δ*T*. The current values referred to the two models are considered at each instant of time *i*.

**Table 1.** Top level parameters meaning and effects.

