# Blind Source Separation of Intermittent Frequency Hopping Sources over LOS and NLOS Channels +
## 3 Method
### Hidden State Filtering
#### 3.3.2 Individually Most Probable States  
There are different ways of finding the \"optimal\" state sequence \(s(1:T)\) given the observed sequence \(z(1:T)\) and the HMM parameter \(\Omega\). One reasonable criterion is to choose, at each time \(t\), the state that is most probable given the observed sequence and the HMM parameter. We denote the belief state as follows:  
\[\gamma_{i}(t)\triangleq P(s(t)=i|z(1:T),\Omega). \tag{14}\]  
It can be shown that variable \(\gamma_{i}(t)\) may be expressed in terms of the forward-backward variables [41]:  
\[\gamma_{i}(t)=\frac{\alpha_{i}(t)\beta_{i}(t)}{\sum\limits_{j\in\{0,1\}} \alpha_{j}(t)\beta_{j}(t)}. \tag{15}\]  
The most probable estimate (MPE) to a state at time \(t\) is the solution to the following problem:  
\[\hat{s}_{\text{MPE}}(t)=\operatorname*{arg\,max}_{i=0,1}\gamma_{i}(t). \tag{16}\]  
We note that the MPE to a state may be computed directly from the forward-backward variables. The MPE state sequence for a source is expressed as follows:  
\[\hat{s}_{\text{MPE}}(1:T)=\{\hat{s}_{\text{MPE}}(1),\hat{s}_{\text{MPE}}(2), \ldots,\hat{s}_{\text{MPE}}(T)\}. \tag{17}\]  
Using the MPE state sequence, the matrix of complex amplitudes containing the filtered vectors can be calculated as outlined in Algorithm 1. ```
1:Input: Matrix of complex amplitudes \(\hat{\mathbf{X}}_{d}\) and HMM model paramter \(\Omega\)
2:Output: Inferred state sequence \(\hat{s}_{\text{MPE}}(1:T)\)
3:for each non-zero row of \(\hat{\mathbf{X}}_{d}\)do
4:for\(t=1:T\)do
5:\(z(t)=1_{c}\{\hat{\mathbf{x}}_{d}(t)\}\)
6: Calculate \(\hat{s}_{\text{MPE}}(t)\) from Equation (16)
7:endfor
8:endfor

#### 3.3.3. Most Probable Sequence of States

The most probable sequence of states given the observed sequence of a source is known as the _maximum_ a posteriori (MAP) estimate and is given by

\[\hat{s}_{\text{MAP}}(1:T)=\underset{s(1:T)}{\arg\max}P(s(1:T)|z(1:T)). \tag{18}\]

The MAP estimate may be computed using the well-known Viterbi algorithm [42]. The following quantity is defined:

\[\rho_{i}(t)\triangleq\underset{s(1:t-1)}{\max}P(s(1:t-1),s(t)=i|z(1:t),\Omega), \tag{19}\]

which represents the joint probability of reaching state \(i\) at time \(t\) and taking the most probable path. A recursive expression for this probability is obtained noting that if \(\rho_{i}(t-1)\) is known, then \(\rho_{j}(t)\) may be computed by accounting for the transition from state \(i\) at time \(t-1\) to state \(j\) at time \(t\). This probability may be computed using quantities previously defined according to

\[\rho_{j}(t)=(\underset{i}{\max}\rho_{i}(t-1))a_{ij})b_{j}(z(t)). \tag{20}\]

The argument that maximizes Equation (20) is denoted as \(\psi_{j}(t)\triangleq\underset{i=0,1}{\arg\max}\left(\rho_{i}(t-1)a_{ij}\right)\). Following this procedure, the first state that can be determined as part of the most probable path is the final state \(s(T)\), since any earlier determination may be affected by later times. The algorithm is summarized as follows:

1. Initialization: \[\rho_{i}(1)=\pi_{i}b_{i}(z(1)),\;i=0,1,\] (21a) \[\psi_{i}(1)=0,\;i=0,1.\] (21b)
2. Recursion: \[\rho_{j}(t)=(\underset{i}{\max}\rho_{i}(t-1)a_{ij})b_{j}(z(t)),\;2\leq t\leq T,\;j=0,1,\] (22a) \[\gamma_{i}(t)=\frac{\alpha_{i}(t)\beta_{i}(t)}{\sum\limits_{j\in\{0,1\}} \alpha_{j}(t)\beta_{j}(t)}. \tag{15}\]0 (22b)
3. Termination: \[\gamma_{i}(t)=\frac{\alpha_{i}(t)\beta_{i}(t)}{\sum\limits_{j\in\{0,1\}} \alpha_{j}(t)\beta_{j}(t)}. \tag{15}\]1 (23)
4. MAP path: \[\gamma_{i}(t)=\frac{\alpha_{i}(t)\beta_{i}(t)}{\sum\limits_{j\in\{0,1\}} \alpha_{j}(t)\beta_{j}(t)}. \tag{15}\]2 (24)

Using the MAP path, the matrix of complex amplitudes containing the filtered vectors can be calculated as outlined in Algorithm 2.