# Toward Explainable AutoEncoder-Based Diagnosis of Dynamical Systems
## 3 Preliminaries
### Temporal Sequence Representation  
As LTI systems are universal approximators of temporal sequences [31], a temporal sequence can be regarded as the output of an LTI system of unknown parameters. Hence, we can use a temporal sequence to diagnose an LTI system. Assume that we have a system \(\mathcal{S}\) that generates a language \(\mathbb{B}\) consisting of valid temporal sequences, or behaviors. A behavior is a temporally indexed sequence \(\xi=\{\xi_{1},\ldots,\xi_{T}\}\); a behavior is valid if \(\xi\) is consistent with an underlying system model, e.g., as described by Equations (1) and (2). In the following, we consider that each behavior is valid, i.e., \(\xi\in\mathbb{B}\). In this article, we assume that each behavior is time invariant, linear, and has bounded zero-mean noise. We define a vector \(\xi|_{\lambda}\) as a \(\lambda\)-length trajectory of a signal. We can represent a signal of length \(\lambda\in T\) in terms of a data matrix. We adopt a Hankel matrix of depth \(\lambda\in T\) for signal \(\xi\in\mathbb{R}^{qT}\), as follows:  
**Definition 1** (Hankel matrix). : \[\mathbf{H}_{\lambda}(\xi)=\left[ \begin{array}{cccc}\xi_{1}&\xi_{2}&\ldots&\xi_ {T-\lambda+1}\\ \xi_{2}&\xi_{3}&\ldots&\xi_{T-\lambda+2}\\ \ldots&\ldots&\ldots&\ldots\\ \xi_{\lambda}&\xi_{\lambda+1}&\ldots&\xi_{T}\end{array} \right]\] (6)  
_where \(\xi=[\xi_{1},\xi_{2},\ldots,\xi_{T}]\) denotes an acquired signal sequence, \(\lambda\) is the embedding dimension, and \(T-\lambda+1\) is the length of each sub-sequence._  
With this input encoding, the size of the associated Hankel matrix \(\mathbf{H}\) is \(q\lambda\times(T-\lambda+1)\). As can be seen in Definition 6, if the Hankel matrix \(\mathbf{H}\) is square, \(\mathbf{H}\) is also a symmetric matrix. The Hankel matrix, as can be seen in Definition 6, encodes a time-series signal with minimal pre-processing, and hence places limited computational burden on the overall inference process. The Hankel matrix \(\mathbf{H}\) embeds the observability matrix \(\Gamma\) of the system, since \(\mathbf{H}=\Gamma X\), where \(X\) is the sequence of hidden states of the LTI system, and \(\Gamma\) is defined as follows:  
\[\Gamma=\left[ \begin{array}{c}C\\ CA\\ \ldots\\ CA^{\lambda}\end{array} \right] \tag{7}\]  
Therefore, \(\mathbf{H}\) provides information about the dynamics of the temporal sequence. Given an input-output measurement \((u,y)\), we can estimate \(A,C\), and the initial state \(\mathbf{x}_{0}\) to identify the corresponding LTI system for classification purposes. The identification of the triple is, however, a non-convex problem and thus, given a finite measurement \((u,y)_{T}\), the triple \((A,C,\mathbf{x}_{0})\) used to generate such a measurement is not guaranteed to be unique [32]. Consequently, system identification is computationally expensive and not robust, which makes it unsuitable for diagnosis purposes. These problems can be avoided by using subspace identification on Hankel matrices associated with the measurement signals [33]. Here, given a dynamical system, all output measurements lie on a single subspace, assuming a noiseless output. This means that the subspace spanned by the columns of a Hankel matrix is equivalent to the subspace of the associated LTI system. Therefore, the subspace spanning an LTI system can be computed and used for diagnosis, without identifying the underlying LTI system. Equation (7) shows that the columns of \(H\) and \(\Gamma\) span the same subspace regardless of the initial values of the LTI system. This means that given two measurements \(\xi\) and \(\xi^{\prime}\) from the same LTI system operating in the same mode, the smallest principal angle between the subspaces of the Hankel matrices \(H(\xi)\) and \(H(\xi^{\prime})\) is zero [32]. In other words, the subspace angles between the Hankel matrices of two output measures can be used to identify whether these outputs could be produced by the same LTI system.