# A Novel Anti-Jamming Technique for INS/GNSS Integration Based on Black Box Variational Inference
## 2 Problem Description
### Estimating MNCM with VBAKF  
The statistical characteristics of V will be changed when GNSS is disturbed. Consequently, the MNCM is uncertain. At this point, if we continue to use the MNCM of the initial setting, the estimated values of the navigation parameters are not accurate. Therefore, MNCM should be estimated accurately to improve navigation accuracy. The idea of estimating MNCM by VBAKF can be summarized as follows. First, the real distribution of MNCM is replaced with an approximate distribution. Then, Kullback-Leibler divergence (KLD) is used to measure the degree of similarity between the approximate distribution and the real distribution. When the evidence lower bound (ELB) reaches the maximum value, the KLD value is zero. That is, the approximate distribution is equal to the real distribution. Thus, the problem of estimating MNCM turns into the problem of solving the maximum value of ELB. The ELB maximum value can be solved by the VB general formula. However, the condition for using the VB general formula to solve the ELB maximum value is that the approximate distribution and likelihood distributions must be conjugate. Figure 1: The influence of the time-varying noise on the velocity errors. Figure 2: The influence of the time-varying noise on the position errors. The steps for estimating time-varying MNCM by VBAKF are as follows. In the framework of the Kalman filter, the likelihood distribution \(p(\mathbf{Z}_{k}|\mathbf{R}_{k})\) is a Gaussian distribution, i.e.,  
\[p(\mathbf{Z}_{k}|\mathbf{R}_{k})=\text{N}(\mathbf{Z}_{k};\mathbf{H}_{k}\mathbf{X}_{k},\mathbf{R}_{k}) \tag{3}\]  
where \(\mathbf{R}\) is the MNCM. \(\text{N}(\cdot;*,*)\) denote the Gaussian probability density function (PDF). In order to satisfy the conjugate condition, the prior distribution of MNCM \(p(\mathbf{R}_{k}|\mathbf{Z}_{1:k-1})\) is assumed to be an Inv-Gamma distribution or Inv-Wishart distribution. We take the Inv-Gamma distribution, for example. It can be described as  
\[p(\mathbf{R}_{k}|\mathbf{Z}_{1:k-1})=\prod_{i=1}^{d}\text{Inv-Gamma}\Big{(}\mathbf{R}_{k,i} ;\mathbf{\hat{\mathbf{\kappa}}}_{k|k-1,i},\mathbf{\hat{\mathbf{\rho}}}_{k|k-1,i}\Big{)} \tag{4}\]  
where \(d\) is the dimensions of \(\mathbf{R}\). \(\mathbf{\alpha}\) and \(\mathbf{\beta}\) are the parameters of the Inv-Gamma distribution. Inv-Gamma \(\left(\cdot;*,*\right)\) denotes the Inv-Gamma PDF. After the kth observation, we will replace \(p(\mathbf{R}_{k}|\mathbf{Z}_{1:k})\) with a new approximate distribution \(q(\mathbf{R}_{k}|\mathbf{Z}_{1:k})\). For simplicity, we omit the statement that the parameter \(\mathbf{R}_{k}\) is dependent on \(\mathbf{Z}_{1:k}\) in the approximate distribution. Thus, the new approximate distribution can be expressed as \(q(\mathbf{R}_{k})\). According to the VB general formula, and taking the log of both sides of the general formula, we can obtain the ELB, which can be expressed as  
\[ \begin{array}{ll}\ln q(\mathbf{R}_{k})&=\text{E}[\ln p(\mathbf{R}_{k}|\mathbf{Z}_{1:k- 1})]+\mathbf{C}\\ &=\sum\limits_{i=1}^{d}\Big{[}\left(-\mathbf{\kappa}_{k|k-1,i}-\frac{1}{2}-1\right) \ln\mathbf{R}_{k,i}^{2}\Big{]}-\sum\limits_{i=1}^{d}\frac{1}{\mathbf{R}_{k,i}}\Big{[} \mathbf{\beta}_{k|k-1,i}+\frac{1}{2}\text{E}\Big{[}((\mathbf{Z}_{k}-\mathbf{H}_{k}\mathbf{X} _{k})_{i})^{2}\Big{]}\Big{]}+\mathbf{C}\end{array}  \tag{5}\]  
where \(\mathbf{C}\) is the constants. The VB general formula used in (5) can be described as  
\[q(\theta_{i})=\frac{\exp\Big{(}\text{E}_{q(\theta_{k+i})}[(\ln p(y,\theta))] \Big{)}}{\int\exp\Big{(}\text{E}_{q(\theta_{k+i})}[\ln p(y,\theta)]\Big{)}\ \text{d}\theta_{k}} \tag{6}\]  
where \(\text{E}[\cdot]\) denotes the expectation of \(q(\theta_{i})\).