# Prognostics of Electromechanical Actuator with Partial Time Scaling Invariant Temporal Alignment
## 6 Quantification of Time Series Alignment
Let \(\mathbb{T}[:,k]\) be the column \(k\) representing the set of values taken by \(\mathcal{T}_{k}([1;n])\) at a given iteration. If the source shares similarities with the target series, after detailing the alignment method in Section 5, it is reasonable to suppose that the images of the function \(\mathcal{T}\) should be almost identical between each iteration. On the other hand, a completely random alignment could result in wide variety among the image sets of each function \(\mathcal{T}_{k}\). The image set of an assignment function \(\mathcal{T}_{k}\) is a repetition arrangement of \(n\) elements (the indices of the source points) in a set of \(m\) elements (the indices of the target points). There are then a total of \(\mathcal{A}_{m}^{n}=m^{n}\) possible image sets. In the matrix \(\mathbb{T}\) with \(K\) columns, there would still be \((\frac{m^{n}}{K})\) different column combinations. Thus, if convergence from the source to the target does not occur for a completely random alignment, the columns of \(\mathbb{T}\) would all be different. In other words, for all \((i,j)\in[1;K]^{2},i\
eq j\Rightarrow\mathbb{T}[:,i]\
eq\mathbb{T}[:,j]\). Conversely, in the limiting case where the alignment is perfectly consistent, all columns of \(\mathbb{T}\) would be identical. In other words, for \((i,j)\in[1;K]^{2},\mathbb{T}[:,i]=\mathbb{T}[:,j]\). According to the definition of the function \(\mathcal{T}\), this would mean that the points of the source \(\tilde{X}_{j}^{l}\) would all move, as the alignment progresses, towards the same points of the target \(\tilde{Y}_{j}^{h}\). Thus, in the advection model, the direction of the displacement vector of each point \((t_{i},x_{i})_{j}^{l}\) in the source would remain constant as the iterations progress. This leads to the creation of Hypothesis 1. **Hypothesis 1**. : _In the case of a perfectly consistent alignment, a unique direction of movement is associated with each source point during the convergence process._  
Hypothesis 1 alone is insufficient to establish a function \(\mathcal{L}\) capable of quantifying the quality of an alignment. This hypothesis, on its own, permits pathological alignment scenarios, such as the complete inversion of all points in \(X_{j}^{l}\) when aligning it with \(Y_{j}^{h}\). In this scenario, the first point \(X_{j}^{l}[1]\) would align with the last point \(Y_{j}^{h}[m]\), while the last point \(X_{j}^{l}[n]\) would align with the first point of \(Y_{j}^{h}[1]\). Such an alignment would inherently be considered suboptimal. Given the behavior of the advection model described in Algorithm A3 and the characteristic monotonicity of our descriptors in the ideal case, this particular alignment example would result in the substantial alteration of the initial value of the source cloud point. In other words, for a given point with an index \(i\), during \(K\) iterations of the algorithm, \(X_{j}^{l}[i]|_{k=0}\
eq X_{j}^{l}[i]|_{k=K}\). Preventing such configurations necessitates constraining the angular variation in point directions within \(\tilde{X}_{j}^{l}\) within the advection model. The limiting scenario, in this regard,  
The developed cost function will then be applied to the matrix \(\mathbb{S}_{j}^{l}\) and produce a positive real number. It is defined in Equation (6). \[ \begin{split}\mathcal{L}\colon\mathcal{M}_{n,K}(\mathbb{R})& \rightarrow\mathbb{R}_{+}\\ \mathbb{S}_{j}^{l}&\mapsto\frac{1}{nK}\sum_{i=1}^{ n}\sum_{k=1}^{K}(x_{i1}-x_{ik})^{2}\end{split}  \tag{6}\]  
Hypotheses 1 and 2 are modeled by the term \(\sum_{i=1}^{n}(x_{i1}-x_{ik})^{2}\), which represents the sum of squared differences between the intermediate states of the series and its initial state. Hypothesis 3, on the other hand, is modeled by the normalization factor \(K\), representing the number of iterations of the alignment algorithm present in the denominator of expression 6. Indeed, the more iterations that it takes to align the source to the target, the more the source series is dilated.