## 3 Methodology
### SHI Construction
#### 3.2.1 Parameters Selection and Feature Extraction  
In different degradation stages, the focus of the health condition was different, and different characteristics were needed to reflect the change. Therefore, it was of great significance to dynamically extract system features from many state features to represent the system state changes. Due to the large inertia and multi-parameter data of the ship mechanical system, DKPCA based on correlation dimension was proposed to select the number of characteristic principal components of the nonlinear dynamic data. First, the input-standardized data were preprocessed with the fractal theory and dynamic theory, and the optimal lag dynamic data matrix \(\widetilde{X}\) was constructed to reduce the autocorrelation and correlation between data, where \(\widetilde{X}\triangleq\left[X(\text{t})X(\text{t}-\Delta)\ldots X(\text{t}- l\Delta)\right]\in R^{(N-l)\times m(l+1)}\), which is the reconstruction matrix, and \(X(\text{t})\) is the m-dimensional observation data at time \(t\), \(\Delta\) is the interval time, \(l\) is the lag time factor, and \(N\) is the number of samples. The \(l\) was substituted into Equation (1) to calculate:  
\[r_{n}=r-\sum_{i=0}^{l-1}(l-i+1)\times r_{n}(i), \tag{1}\]  
where \(r_{n}\) was a cyclic function, and the initial \(r_{n}(i)\) was calculated when \(l=0\). And \(r=m(l+1)-C_{\text{D}}\), where \(C_{\text{D}}\) is the correlation dimension of the dynamic data matrix [24]. Its calculation method is shown in Equation (2):  
\[C_{\text{D}}(\varepsilon)=\frac{2}{N_{D}(N_{D}-1)}\sum_{i=1}^{N_{D}}\sum_{j=i+1 }^{N_{D}}H(\varepsilon-\delta_{ij}), \tag{2}\]  
where \(\varepsilon\) is the distance of two points on the attractor and related to \(\delta_{ij}\), \(\delta_{ij}=\left\|x_{j}-x_{i}\right\|^{2}\) is the Euclidian distances between \(ij\) rows to the input matrix \(\widetilde{X}\), and \(N_{D}=N-l\). The H represents an indicator function defined as \(\text{H}(z)=\left\{ \begin{matrix}1&\text{if }\ z\geq 0\\ 0&\text{else}z<0\end{matrix} \right.\). As the \(\varepsilon\) gets smaller, Equation (2) can be rewritten as:  
\[C_{\text{D}}=\lim_{\varepsilon\to 0}\frac{\log(C_{\text{D}}(\varepsilon))}{ \log(\varepsilon)}. \tag{3}\]  
In Equation (3), assuming a sufficient number of points have been acquired lying closely in the underlying space, then the slope of the linear part of the \(\log-\log\) plot of \(C_{\text{D}}\) versus \(\varepsilon\) represents the \(C_{\text{D}}\). Calculate \(r_{n}\) using Equations (1)-(3) until \(r_{n}\leq 0\), then the value of the correlation dimension corresponding to \(l\) in different cases can be obtained, and the most appropriate \(l_{opt}\) can be selected to construct \(\widetilde{X}_{opt}\in R^{N_{D}\times m(l_{opt}+1)}\). The KPCA was used to analyze the matrix \(\widetilde{X}_{opt}\) to obtain the mapping data matrix as follows:  
\[t^{k}=\frac{1}{\sqrt{\lambda^{k}}}\sum_{i=1}^{N}a_{i}^{k}K(x_{i},x), \tag{4}\]  
where \(k=1,2\ldots,N\), \(K(x_{i},x)\) represents the core matrices after centering, and \(\lambda^{k}\) and \(\alpha_{i}^{k}\) are the eigenvalues and eigenvectors, respectively, of matrix \(K(x_{i},x)\). The eigenvalue size was used to simply filter the data to reduce the amount of data calculation and obtain the corresponding data matrix \(G_{p}=\left\{ \begin{matrix}t_{j}^{k}\\ \end{matrix} \right\}_{k=1}^{p}\in R^{N_{D}\times p}\), where \(j=1,2,\ldots,N_{D}\). The \(C_{\text{D}}\) was applied to obtain the number of principal components of \(G_{p}\) and \(G_{t}\) (\(G_{t}=G_{p}A\), and the matrix \(A\) is the loading matrix obtained with an orthogonal transformation of the covariance matrix) and obtain the correlation dimension \(d_{G_{p}}\) and \(d_{G_{t}}\). Then, the number of principal components of the matrix data was \(\gamma=\max\left(\left[d_{G_{p}}\right],\left[d_{G_{t}}\right]\right)\), and the \(\left\|\right.\) is rounded up [25].