# Prognostics of Electromechanical Actuator with Partial Time Scaling Invariant Temporal Alignment
## 5 Alignment by Successive Displacements  
After creating the database filled with reference curves, we need to define a similarity measure to allow the comparison with new data. We need to synchronize all the candidate time series to a reference and compute the distance between them. Hence, we use time series alignment (a principle also named _time series registration_). Let \(X=(x_{j})\) with \(j\in[1;m]=\mathcal{J}\) and \(m\in\mathbb{N}\) an unknown time series called the _source_ and \(Y=(y_{i})\in\mathfrak{F}_{n,p,q}\) with \(i\in[1;n]=\mathcal{I}\) a time series called the _target_. In our framework, we hypothesize that \(m\leq n\), and, if not, one can use interpolation methods to supersample \(Y\). The goal of the time series alignment method is to find an injective function \(\mathcal{T}:\mathcal{I}\in\mathbb{N}\hookrightarrow\mathcal{J}\in\mathbb{N}\) that associates with each index of points of \(X\) its corresponding neighbor in \(Y\), thus characterizing the alignment. Note that all points of \(Y\) do not need to be associated with all points of \(X\). All of this provides a natural time for rescaling. In state-of-the-art methods, the partial assignation of one time series to another can be considered as assigning the values of a 2-dimensional point cloud between one  
Figure 4: Smoothed statistical descriptors for the used actuators. Figure 5: Smoothed percentile descriptors for the used actuators. another. In this framework, time series values taken from \(\mathfrak{D}_{f}\) can be considered a matrix \(\mathbb{X}_{j,k}\in\mathcal{M}_{n,2}(\mathbb{R})\) with the time vector explicitly created. Thus, \(\mathbb{X}_{j,k}\) is the concatenation of \(X_{j,k}=(x_{i})_{1\leq i\leq n,j,k}\) and \(T_{j,k}=(t_{i})_{1\leq i\leq n,j,k}\in\mathbb{N}\) representing the time. For simplicity, timestamps can be replaced by integer indexes in ascending order. By doing so, we only keep the precedence relationship between each point. The time series alignment problem can then be reframed as an association problem between two point clouds with a heterogeneous number of points. This problem was studied by [11] with point clouds of several dimensions. The method called Sliced Partial Optimal Transport (SPOT) [11] was originally applied to histograms to transfer the color space of one image to another. The algorithm principle is illustrated in Figure 6.  
The first step of Figure 6 represents all the point clouds (i.e., times series). Note that, in our framework, we wish to align the data coming from the same descriptor between each other. Hence, we wish to align \(\mathbb{X}_{j,k}\in\mathcal{M}_{n,2}(\mathbb{R})\) (in red in Figure 6) with \(\mathbb{Y}_{j,l}\in\mathcal{M}_{n,2}(\mathbb{R})\) (in blue in Figure 6) with \((j,k,l)\in\mathbb{N}^{3}\). In other words, we wish to align the same features between different actuators. In the second step of the method, the two point clouds are projected along one direction chosen randomly. We can note them, respectively, as \(X_{j,k}^{\perp}\), \(Y_{j,l}^{\perp}\in\mathbb{M}_{n,1}(\mathbb{R})\). In the third step, an injective association between the points of \(X_{j,k}^{\perp}\) and \(Y_{j,l}^{\perp}\) is computed: the assignation function \(\mathcal{T}\). Finally, at the last step, [11] solves an optimal transport equation to determine a uniform amount of movement to apply to every point of \(\mathbb{X}_{j,k}\). Note that this movement is done in the \(2-\)dimensional space, along the projection direction chosen at step 1 of Figure 6 (represented by the green vectors in Figure 6). Tested with the data at hand, our implementation of the method of [11] did not have relevant registration results. For example, the temporal ordering of each point was modified during the advection of the source \(\mathbb{X}_{j,k}\) to the target \(\mathbb{Y}_{j,l}\), which is problematic when trying to estimate a RUL with the time series processed. This is why we modified the SPOT [11] behavior to adapt this method to time series.