# Probabilistic Condition Monitoring of Azimuth Thrusters Based on Acceleration Measurements
## 2 Materials and Methods
### Condition Monitoring Algorithm
#### 2.2.4 Shaft Speed Selection  
To select the appropriate shaft speed ranges for condition monitoring, statistical tests for normal distribution are included in the identification stage in the algorithm. Firstly, the samples in training data are sorted in the order of magnitude based on the shaft speed. Then, specific quantiles are computed from them which is illustrated in the upper left plot in Figure 7. In this study, the quantiles were the deciles and the zeroth quantile (minimum). The samples are categorized in separate ranges based on the quantiles with the goal to analyze the data set in separate ranges with varying sizes. The ranges are illustrated in the upper right plot in Figure 7 where 55 separate ranges are shown. The first range covers the speed values from the minimum to the first decile, the second range covers the speed values from the minimum to the second decile, and so on. In practice, the amount of data is limited, and therefore, the user should set a minimum sample size for each range. In the lower left plot in Figure 7, the user set the limit to 60 samples. This limit is also used later in the experiments in Section 3. If the number of samples in a range is too low, the data may not be extensive enough for the identification of a robust model. The residual values for each feature are calculated in each range where the sample size is above the defined limit by using Equation (3). A statistical test for normal distribution is then done on each set of residual values separately assuming they are independent data sets. The one-sample Kolmogorov-Smirnov test was used in this study. It is a nonparametric test to evaluate if the empirical cumulative distribution of the data is equal to the hypothetical cumulative distribution [41]. The applied statistic is the maximum absolute difference between the empirical Cumulative Distribution Function (CDF) calculated from the data vector \(x\) and the hypothesized CDF  
\[D^{*}=\max_{x}(\big{|}\hat{F}(x)-G(x)\big{|}), \tag{4}\]  
Figure 7: Illustration of stages in shaft speed range selection using data from thruster 1. First, the samples are sorted based on shaft speed and quantiles are calculated (**upper left**). The data are then categorized in different ranges based on the quantiles (**upper right**). Only the ranges with enough samples are taken to the test of normal distribution (**lower left**). The (**lower right**) plot shows the number of normal distributed residual sets inside each tested shaft speed range. In this example, only the range no. 26 became selected because it had the widest range from the fourteen overlapping ones that had the highest number of normal distributed sets. where \(\hat{F}(x)\) is the empirical CDF and \(G(x)\) is the CDF of the hypothesized distribution, which is in this case the normal distribution. However, other suitable tests for normal distribution, such as the Anderson-Darling test [42], could be used as well. The results are presumably slightly different then. The _kstest_ function in Matlab(r) was used with the default significance level (\(\alpha=0.05\) or \(5\%\)) for the null hypothesis rejection in this study. The hypothesis result H = 0 indicates that null hypothesis is not rejected at the \(\alpha\) significance level, i.e., the data are normal distributed. The result H = 1 indicates that the null hypothesis is rejected at the defined significance level, and then the data do not come from the standard normal distribution. While the shaft speed selection is an exploratory study by nature, multiplicity corrections were neglected on the hypothesis tests [43]. In the lower right plot of Figure 7, the independent hypothesis results of the residual sets of the \(11\) features introduced in Table 3 are put together. The plot shows the number of normal distributed residual sets in each range. From these ranges, the algorithm selects the ranges where the highest number of normal distributed residual sets were obtained (\(11\) in this case).