## 3 Proposed Framework
### MS Embedded Particle Filter  
The MSPF hybrid method is based on the Bayesian framework which basically deals with the evolution of object state. The belief network is reinforced by the measurement process through a set of dynamic equations as follows:  
\[\mathbf{s}_{k+1}=\mathrm{f}_{k}(\mathbf{s}_{k}+\mathrm{\gamma}_{k}) \tag{16}\]  
\[\mathbf{Z}_{k+1}=\mathrm{h}_{k}(\mathbf{s}_{k+1}+\mathrm{\eta}_{k}) \tag{17}\]  
where, \(\mathbf{s}_{k}\) and \(\mathbf{s}_{k+1}\) are the object states at time k and k + 1. \(\mathrm{f}_{k}(. )\) and \(\mathrm{h}_{k}(. )\), are the dynamic equations for drawing particles and taking new measurements \(\mathbf{z}_{k+1\cdot k}\) and \(\mathrm{\eta}_{k}\) represent the process and measurement noise respectively. The object state distribution is estimated based on all the previous measurements that theoretically are:  
\[\mathrm{p}(\mathbf{s}_{k+1}|\mathbf{z}_{1:k})=\int\mathrm{p}(\mathbf{s}_{k+1} |\mathbf{s}_{k})\mathrm{p}(\mathbf{s}_{k}|\mathbf{z}_{1:k})\mathrm{d}\mathbf{ s}_{k} \tag{18}\]  
This prior is used in the prediction step when the measurement \(\mathbf{z}_{k+1}\) is available. [PERSON] rule recursively updates this prior in the prediction step as in Equation (19):  
\[\mathrm{p}(\mathbf{s}_{k+1}|\mathbf{z}_{1:k+1})=\frac{\mathrm{p}(\mathbf{z}_{ k+1}|\mathbf{s}_{k+1})\mathrm{p}(\mathbf{s}_{k+1}|\mathbf{z}_{1:k})}{\int \mathrm{p}(\mathbf{s}_{k+1}|\mathbf{s}_{k})\mathrm{p}(\mathbf{s}_{k}| \mathbf{z}_{1:k})\mathrm{d}\mathbf{s}_{k}} \tag{19}\]  
where, \(\mathrm{p}(\mathbf{z}_{k+1}|\mathbf{s}_{k+1})\) is the likelihood distribution and \(\int\mathrm{p}(\mathbf{s}_{k+1}|\mathbf{s}_{k})\mathrm{p}(\mathbf{s}_{k}| \mathbf{z}_{1:k})\mathrm{d}\mathbf{s}_{k}\) is the normalization factor. The posterior density function is approximated through summations or weighted summation over all particles, as in Equation (20):  
\[\mathrm{p}(\mathbf{s}_{k+1}|\mathbf{z}_{1:k+1})\,\sim\sum_{i=1}^{N_{\mathrm{s} }}\mathbf{w}_{k+1}^{i}\Big{(}\mathbf{s}_{k+1}^{i}-\mathbf{\hat{s}}_{k+1}^{i} \Big{)} \tag{20}\]  
where, \(\mathbf{\hat{s}}_{k+1}^{i}\) are the new particles obtained by processing \(\mathbf{s}_{k+1}^{i}\) through the MS procedure using Equations (14) and (15). So now, effectively the PF particle validation process is replaced with the MS procedure by inserting \(\mathbf{\hat{s}}_{k+1}\) into the posterior distribution function in Equation (20). The vector \(\mathbf{w}_{k+1}^{i}\) are the weights associated with each particle and are calculated through Equation (21). \[\mathbf{w}_{k+1}^{i}=\mathbf{w}_{k}^{i}\frac{\mathrm{p}\big{(}\mathbf{z}_{k+1 }\big{|}\mathbf{\hat{s}}_{k+1}^{i}\big{)}\mathrm{p}\big{(}\mathbf{s}_{k+1}^{i }\big{|}\mathbf{\hat{s}}_{k}^{i}\big{)}}{\mathrm{q}(\mathbf{s}_{k+1}^{i}\big{|} \mathbf{s}_{k}^{i}\mathbf{z}_{k})} \tag{21}\]  
Usually the likelihood distribution is used to calculate the weights of the particles:  
\[\mathbf{w}_{k+1}^{i}=\mathbf{w}_{k}^{i}\Big{(}\mathrm{p}\Big{(}\mathbf{z}_{k +1}\Big{|}\mathbf{\hat{s}}_{k+1}^{i}\Big{)}\Big{)} \tag{22}\]  
In order to get normalized weights, \(\mathbf{w}_{k+1}^{i}\) is divided by sum of all weights:  
\[\mathbf{w}_{k+1}^{i}=\frac{\mathbf{w}_{k+1}^{i}}{\sum_{i=0}^{N_{\mathrm{s}}} \mathrm{sum}\Big{(}\mathbf{w}_{k+1}^{i}\Big{)}} \tag{23}\]  
Expectation is used to approximate the posterior densities of Equation (20) given as:  
\[\mathbb{E}(\mathbf{s}_{k+1}|\mathbf{z}_{1:k+1})\,\sim\frac{1}{N_{\mathrm{s}}} \sum_{i=1}^{N_{\mathrm{s}}}\Big{(}\mathbf{w}_{k+1}^{i}\mathbf{\hat{s}}_{k+1}^{ i}\Big{)} \tag{24}\]  
We should be very careful about the degeneration phenomenon, also called sample impoverishment, in which a few particles assume the leading role in approximating the posterior. This leads to a situation where many particles will cluster together as a result of which the sampleset will have repeated particles. This results in a large percentage of particles getting insignificant tinny weights. Consequently, the tracker loses the target due to particles drifting towards one side.