## 2 Modeling of Residual Life Prediction for Electrical Connector
### Model of Using States Based on HSMM  
According to the degradation process of electrical connectors, these using states are degraded gradually. However, the degraded using states are difficult to observe. Combined with the intermittent failure \"severity\" proposed previously, the using state of a connector can be estimated using the area of intermittent failure extracted from contact resistance curve. The HSMM is introduced to modeling the using state.  
An HSMM is a Hidden Markov Model (HMM) with temporal structures. An HMM is a dual stochastic process, and a Markov chain that has some states and generates random characters. A complete HMM can be described using the following parameters:  
1. The states number in the model are \(N\). Let \(N\) states are \(s_{1},s_{2},\,\ldots,s_{N}\). Assuming that the state at time \(t\) is \(q_{t}\), \(q_{t}\in(s_{1},s_{2},\,\ldots,s_{N})\).
2. The number of distinct observations which is correspond to intermittent failure \"severity\" is \(M\). the \(M\) observation symbol are denoted by \(V_{1}\), \(V_{2}\), \(\ldots\), \(V_{M}\). Assuming that the observation at time \(t\) is \(O_{t}\), \(O_{t}\in(V_{1},V_{2},\,\ldots,V_{M})\).
3. The initial state distribution \(\pi\), \(\pi=(\pi_{1},\,\pi_{2},\,\ldots,\,\pi_{N})\), where \(\pi_{i}=P(q_{1}=s_{i})\), \(1\leq i\leq N\).
4. The state transition probability distribution \(A\). \(A=(a_{ij})_{N\times N}\), \(1\leq i,j\leq N\), where \(a_{ij}=P(q_{t+1}=s_{i})\), \(1\leq i,j\leq N\).
5. The observation probability distribution in state \(j\), \(B=(b_{jk})_{N\times M}\), where \(b_{jk}=P(O_{t}=V_{k}\,|\,q_{t}=s)\), \(1\leq j\leq N\), \(1\leq k\leq M\).  
To predict the residual life of an electrical connector, it is necessary to analyze the time duration of each state first. Since the hypothesis of the Markov chain, the time duration obeys the geometric distribution implicitly. It is obvious that the time duration of each state obeys exponential distribution which is not suitable for many practical applications. To overcome this limitation, the HSMM is introduced to modeling the transition process of states [22].  
Unlike HMM, an HSMM allows modeling of the time duration of the hidden states and is therefore capable of prognosis. The HSMM-based modelling framework for the residual life prediction of electrical connectors is described in Figure 6.  
A state generates a segment of observations in HSMM, and the states are called macro-states. Each macro-state has \(N\) segments, let \(q_{n}\) be the time index of the end-point of the \(n\)th segment (\(1\leq n\leq N\)).  
Figure 6: Schematic of HSMM modeling framework.  
Compared with HMM, an HSMM allows modeling of the time duration of the hidden states, and the time duration distribution function of each state is defined.  
\[P_{i}(d)=P(d|q_{t}=i),\ \ \ 1\leq i\leq N\ \,\ \ \ 1\leq d\leq D \tag{2}\]  
where the \(P_{i}(d)\) represents the probability of staying in state \(i\) with \(d\) time steps, \(D\) denotes the maximum duration within any state.  
Combined with HMM and state duration distribution, an HSMM can be described as  
\[\lambda=(\pi,A,B,P_{i}(d)) \tag{3}\]  
where \(\pi\), \(A\), \(B\) denote the initial state distribution, the transition model and the observation model respectively.  
Corresponding to the nth macro-state, the observations are \(O_{d_{n-1}+1},\cdots,O_{d_{n}}\) and these observations have the same micro-state label. It is worth noting that the transition of macro-states \(s_{q_{l-1}}\to s_{q_{l}}\) is Markov process, but the transition of micro-states \(s_{t-1}\to s_{t}\) is not Markov process.