## 4 Estimation Strategy of RUL Calculation Using Database Model  
### Description of the RUL Strategy  
According to the literature, calculating RUL using database models consists of the following steps [45]:  
* First, an offline database is prepared where data related to each phase of fault is encountered. * Second, a health assessment of the machine is conducted. In our case, the HMM model performed this assessment [37]. * Third, the RUL calculation or prediction is executed. At start, the offline database is elaborated from an executed simulation on real prototype or an equivalent model; in this research, we are going to use an already-built finite element machine model. Then, during the condition monitoring of the system's operation, similarities between online and offline data sensors are tracked and detected. This can be performed by classification or regression [46]. Classification consists of matching data coming from sensors to one of the training data sets we already earned, where each set represents a specific state of the system [47]. Regression consists of predicting the real data from the sets of training data where a relation between these training data are created since the system phase of each set is known. In our case, we will use 'classification' because online data coming from sensors can be generated from the previously developed dynamic FEM model of the machine [34; 35]. Although dynamic FEM is the best real-time representation of the machine performance during healthy and faulty operation, alone it cannot generate online data useful for RUL calculation. Offline data samples can be generated for different machine states as much as needed. For example, the model can generate data representing vibrations detected by a vibration sensor when the machine is healthy, when the machine encounters a 1 mm crack in one magnet, and when the machine encounters a 2 mm crack in one magnet. However, when sampling data representing this vibration when the machine moves from the healthy state to the state of 1 mm crack in one magnet, the state where the crack worsens and becomes 2 mm is not possible. In other words, a model of the machine having any depth of the crack is possible using FEM; however, the time needed for the machine to shift from a faulty state with 'x' mm crack to a state with 'y' mm crack where y > x is not offered in FEM. In FEM, there is no representation of the fault propagation function of time. Hence, many researchers combine the database approach and model based approach to build a rugged strategy for RUL calculation. Data sets for the database approach are generated from analytical analysis and numerical analysis such as FEM. The model-based method is formulated from the physical understanding of the system where a profound knowledge and an accurate representation of the fault propagation, the function of time, are presented. If offline data correspond to the machine life cycle starting with its healthy state, then during the existence of tiny cracks in the magnet until the cracks worsen and become a fracture, the RUL calculation becomes easy. Such offline data could be represented in a data matrix ODM as follows:  
\[ODM= \begin{bmatrix}DM01&DM02&\dots&DM0n\\ DM11&DM12&\dots&DM1n\\ DM21&DM22&\dots&DM2n\\ \vdots&\vdots&\ddots&\vdots\\ DMm1&DMm2&\dots&DMmn\\ \end{bmatrix} \]  
In the above matrix, 'n' is the number of sampling points and'm' is the number of times, during the life cycle of the machine, the data sets are recorded. The first row of the matrix ODM is the data set observed at t = t0, when the machine is healthy. The second row is the data set observed at t = t1, when there is 1 mm crack in the magnet. The mth row is the data set observed at t = tm, when the magnet is completely fractured. Different machine learning algorithm such as K-NN and Gaussian process regression can be used to execute a health assessment of the system and then calculate RUL as proved in paper [48]. A comparison between the current measured data set and the offline data set will be conducted.