*3.3. Fit of Distributions*

The next step was to assess the form of distributions of the individual states. Considerations in this respect were presented using the example of state S6, and for the others the same was done. The goodness of fit to the selected theoretical distributions that were considered most likely was verified based on a Cullen and Frey graph, presented for state S6 in Figure 2.

**Figure 2.** Cullen and Frey graph for the state S6.

For further analysis, the Weibull and Beta distributions were selected, for which the estimated parameters are presented in Table 2, while the goodness of fit of empirical data to the individual distributions is presented in Figure 3.



**Figure 3.** The assessment of goodness of fit of the empirical data of *S*<sup>6</sup> state to the Weibull and Beta distributions.

For each of them the *AIC* (Akaike information criterion) was calculated according to the formula (16) and based on that, the one with the better fit was selected.

$$AIC = -2\ln L + 2k\_\prime \tag{16}$$

where *k*—number of parameters in the model, *L*—credibility function.

The same calculations were made for the other states. The proposed distributions are presented in Table 3.


**Table 3.** Goodness of fit results for states S1–S6.

Not all the distributions could be fitted to the parametric ones. Moreover, none of the distributions belong to the family of exponential distributions, which is a condition for using the Markov process [25]. The form of distributions makes the parameters estimation possible based on the semi-Markov model only. In order to compare whether meeting the condition of the distribution form affects the obtained results, the subsequent part of the article compares the limit values of the probabilities of the object's dwelling time according to two different models.

#### **4. Case Study**

#### *4.1. Estimation of the Semi-Markov Model Parameters*

First of all, based on the actual relationship between the states defined in Figure 1, the transition probability matrix was calculated. If *ni* denotes the number of instants of the system waiting in state *si*, while *nij* denotes the number of state transitions from state *si* to state *sj*, then the transition estimator from state *si* to state *sj* shall be determined from the formula:

$$
\mathfrak{d}\_{ij} = \frac{n\_{ij}}{n\_i}.\tag{17}
$$

The distribution of probability of changes of the distinguished operating states (in one step), assuming that each graph arch of the exploitation process representation (Equations (2) and (10)) corresponds to the value of probability *pij*, is presented in Table 4.


**Table 4.** The *pij* inter-states transition probability matrix.

For the process studied, some limits exist:

$$\lim\_{n \to \infty} p\_{ij}(n) = \pi\_j \text{ i, } j = 1, 2, \dots, 6 \text{ i } \neq j,\tag{18}$$

where *pij*(*n*)—probability of transition from state *Si* to state *Sj* in *n* steps.

**Definition 2.** *A probability distribution* [25]:

$$
\pi = \left\lfloor \pi\_j \colon j \in \mathcal{S} \right\rfloor. \tag{19}
$$

Satisfying a system of linear equations:

$$\sum\_{i \in S} \pi\_i \cdot p\_{i\uparrow} = \pi\_{\uparrow\prime} \quad \not{p} \in \mathcal{S}\_{\prime} \tag{20}$$

and

$$\sum\_{i \in \mathcal{S}} \pi\_i = 1,\tag{21}$$

is said to be a stationary probability distribution of the Markov chain witch transition matrix *P* = *pij* : *i*, *j* ∈ *S* . In matrix form, the Equation (20) takes the following form:

$$
\Pi^T P = \Pi^T \leftrightarrow \left(\mathbf{P}^T - I\right) \cdot \Pi = 0,\tag{22}
$$

Stationary probabilities π*<sup>j</sup>* were calculated in accordance with Equation (22). For the process studied, for the 6-state model, the determination of the stationary probabilities π*<sup>j</sup>* required solving the following matrix equation:

$$
\begin{bmatrix}
\pi\_1 \\
\pi\_2 \\
\pi\_3 \\
\pi\_4 \\
\pi\_5 \\
\pi\_6 \\
\pi\_6
\end{bmatrix}^T \cdot \begin{bmatrix}
0 & p\_{12} & p\_{13} & p\_{14} & 0 & 0 \\
p\_{21} & 0 & p\_{23} & p\_{24} & 0 & 0 \\
p\_{31} & 0 & 0 & p\_{34} & 0 & 0 \\
p\_{41} & 0 & 0 & 0 & p\_{45} & 0 \\
p\_{51} & p\_{52} & p\_{53} & 0 & 0 & p\_{56} \\
p\_{61} & 0 & p\_{63} & 0 & 0 & 0
\end{bmatrix} = \begin{bmatrix}
\pi\_1 \\
\pi\_2 \\
\pi\_3 \\
\pi\_4 \\
\pi\_5 \\
\pi\_6 \\
\pi\_6
\end{bmatrix}^T,\tag{23}
$$

with the normalization condition:

⎡

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

$$
\pi\_1 + \pi\_2 + \pi\_3 + \pi\_4 + \pi\_5 + \pi\_6 = 1,\tag{24}
$$

which is equivalent to the following system of equations:

$$\begin{cases} \pi\_2 \cdot p\_{21} + \pi\_3 \cdot p\_{31} + \pi\_4 \cdot p\_{41} + \pi\_5 \cdot p\_{51} + \pi\_6 \cdot p\_{61} = \pi\_1 \\ \pi\_1 \cdot p\_{12} + \pi\_5 \cdot p\_{52} = \pi\_2 \\ \pi\_1 \cdot p\_{13} + \pi\_2 \cdot p\_{23} + \pi\_5 \cdot p\_{53} + \pi\_6 \cdot p\_{63} = \pi\_3 \\ \pi\_1 \cdot p\_{14} + \pi\_2 \cdot p\_{24} + \pi\_3 \cdot p\_{34} = \pi\_4 \\ \pi\_4 \cdot p\_{45} = \pi\_5 \\ \pi\_5 \cdot p\_{56} = \pi\_6 \\ \pi\_1 + \pi\_2 + \pi\_3 + \pi\_4 + \pi\_5 + \pi\_6 = 1 \end{cases} \tag{25}$$

After substituting the figures we get:

$$\begin{cases} \pi\_2 \cdot 0.029 + \pi\_3 \cdot 0.043 + \pi\_4 \cdot 0.003 + \pi\_5 \cdot 0.676 + \pi\_6 \cdot 0.982 = \pi\_1 \\ \pi\_1 \cdot 0.141 + \pi\_5 \cdot 0.004 = \pi\_2 \\ \pi\_1 \cdot 0.143 + \pi\_2 \cdot 0.117 + \pi\_5 \cdot 0.001 + \pi\_6 \cdot 0.018 = \pi\_3 \\ \pi\_1 \cdot 0.716 + \pi\_2 \cdot 0.854 + \pi\_3 \cdot 0.957 = \pi\_4 \\ \pi\_4 \cdot 0.997 = \pi\_5 \\ \pi\_5 \cdot 0.319 = \pi\_6 \\ \pi\_1 + \pi\_2 + \pi\_3 + \pi\_4 + \pi\_5 + \pi\_6 = 1 \end{cases} \tag{26}$$

The solution are the stationary probabilities presented in Table 5.

**Table 5.** Stationary probabilities of the Markov chain.


The analysis of the stationary distribution showed (Table 5) that the limit highest transitions probabilities concern states (S1, S4, S5) related to standard activities resulting from the production process technology (all over 27%). Indications of undesirable conditions such as failure (S2) or downtime (S3, S6) range from 4% to 8%, which is a good result.

The calculated limit probabilities relate to the frequency of observations in the sample and do not take into account the duration of individual states, therefore, the limit distribution of the semi-Markov process represents more significant diagnostics. It can be determined using the stationary distribution of the Markov chain and the expected duration of the process states [24,25]. Then the limit probabilities of semi-Markov process are expressed by the formula:

$$P\_{\bar{j}} = \lim\_{t \to \infty} P(t) = \frac{\pi\_{\bar{j}} E(\mathbf{T}\_{\bar{j}})}{\sum\_{j \in S} \pi\_{\bar{j}} E(\mathbf{T}\_{\bar{j}})}. \tag{27}$$

The solution requires to calculate the following forms from the sample of average conditional durations of the process states:

$$\mathbf{T} = \begin{bmatrix} \overline{\mathbf{T}}\_{ij} \end{bmatrix}\_{\prime} \quad i, j = 1, \ 2, \ \dots, \ 6. \tag{28}$$

that are presented in Table 6.


**Table 6.** Average conditional durations of the semi-Markov process states.

Based on the transitions probabilities matrix *P* = *pij* (Table 5) and the matrix of average conditional durations of the states of the process T = *T ij* of random variables T*ij* (Table 6), dependencies describing average unconditional durations of the process states were determined T*<sup>j</sup>* according to the formula:

$$
\overline{\mathbf{T}}\_{\rangle} = \sum\_{i=1}^{6} p\_{ij} \,\overline{\mathbf{T}}\_{ij}. \tag{29}
$$

For this purpose, the following equation system was solved:

$$\begin{cases} \overline{\mathbf{T}}\_{1} = p\_{12} \cdot T\_{12} + p\_{13} \cdot T\_{13} + p\_{14} \cdot T\_{14} \\ \overline{\mathbf{T}}\_{2} = p\_{21} \cdot T\_{21} + p\_{23} \cdot T\_{23} + p\_{24} \cdot T\_{24} \\ \overline{\mathbf{T}}\_{3} = p\_{31} \cdot T\_{31} + p\_{34} \cdot T\_{34} \\ \overline{\mathbf{T}}\_{4} = p\_{41} \cdot T\_{41} + p\_{45} \cdot T\_{45} \\ \overline{\mathbf{T}}\_{5} = p\_{51} \cdot T\_{51} + p\_{52} \cdot T\_{52} + p\_{53} \cdot T\_{53} + p\_{56} \cdot T\_{56} \\ \overline{\mathbf{T}}\_{6} = p\_{61} \cdot T\_{61} + p\_{63} \cdot T\_{63} \end{cases} \tag{30}$$

The obtained expected values of unconditional dwelling T*<sup>i</sup>* times of the process X(t) in the individual operational states are presented in Table 7.

**Table 7.** Unconditional times T*<sup>i</sup>* [minutes] for the 6-state model.


The calculated random variables T*<sup>i</sup>* have finite, positive expected values. This allows to calculate, based on theorem (27), the limit probabilities *Pj* which are presented in Table 8.


**Table 8.** Values of limit probabilities *Pj* of the 6-state model.

Thus determined probabilities *Pj* are limit probabilities determining that the system will remain, for a longer period (*t* → ∞), in the given operational state. This prognosis is more satisfactory than for the frequency of the states occurring. The highest values are achieved by state S1, i.e., operation (over 65%) and less than 17% by state S4, which stems from the necessity to perform maintenance activities. The remaining limit values are satisfactorily small, which shows the correct operation of the machines.

The technical readiness factor was also determined in the form of the sum of appropriate probabilities of reliability states [34]. For the system under analysis, *S*1, *S*4, *S*<sup>5</sup> were considered as fitness states, while the states *S*<sup>2</sup> *S*<sup>3</sup> and *S*<sup>6</sup> as unfitness states. Then, the readiness of the 6-element semi-Markov model can be calculated as the sum of limit probabilities of the respective states:

$$K = \sum\_{j} P\_{j} = P\_{1} + P\_{4} + P\_{5\prime} \tag{31}$$

This gives *K* = 0.85, which means that the machine is in the readiness state for over 85% of the time, which is a very good result.
