## 3 Methodology
### System-Level Health Condition Prediction
#### 3.4.2 Determination of Prediction Starting Time  
A ship mechanical system has high reliability and a stable health value in the initial stage of operation. The existing SHI sequence will often not be enough to reflect the degradation trend of a system in the future. Using the existing data to complete the training and prediction would mean the prediction results were not necessarily accurate. With the increase of the system running time and the deepening of the degradation, the value of the SHI decreased continuously. More and more feature data that could be used to identify the degradation process were included in the SHI series, and the prediction results were close to the real state. Therefore, it was necessary to determine the prediction starting point according to the change trend of the SHI. The time-to-start (TTS) point was used to produce the online prediction of the health condition using real-time measurement data [30]. Based on this process, the baseline-threshold method was applied to determine the TTS.  
(1) Baseline  
The baseline was established with the system SHI. The baseline reflected the best state of the system operation. To simplify the calculation, the arithmetic mean \(\mu\) could be selected to replace the baseline:  
\[\mu=\frac{1}{N_{0}}\sum_{i=1}^{N_{0}}x_{i}, \tag{13}\]  
where \(N_{0}\) is the number of data. The baseline could also be calculated dynamically with the adaptive baseline method according to previous research results [31].  
(2) Threshold setting  
The threshold included the adaptive threshold and failure threshold. The adaptive threshold \(T_{AT}\) was calculated from the baseline, and the upper and lower limits of the adaptive threshold constituted the optimal distribution range of the health value:  
\[\sigma=\sqrt{\frac{1}{N_{0}}\sum_{i=1}^{N_{0}}(x_{i}-\mu)^{2}}, \tag{14}\]  
\[T_{AT}=\mu\pm 2\sigma, \tag{15}\]  
where \(\sigma\) is the standard deviation and the mean value is \(\mu\).  
The failure threshold is the health value corresponding to the system function not meeting the requirements, which were usually determined by the range of the function indicator parameters: \(HI=0\) indicates that the system had lost all functions. In practical application, it is generally believed that when a system cannot meet the functional requirements, the health condition prediction will stop, so health value at this time was set as the failure threshold.  
Under normal conditions, the health value should fluctuate around the baseline and be within the range of the upper and lower limits of the threshold. If the health value ran out of the channel, the health condition changed. As shown in Figure 4, the trigger condition of the state prediction was that when the SHI deviated from the baseline (deviated and did not recover, as shown at point (a) and quickly broke down the threshold (could not return to the threshold range, as shown at point (b). Taking point b as the TTS, the data before this point were taken as the training sample to complete training and prediction. The training data included the data for stable operation and for the descent phase.