## 5 Application of CEVTI
### Application of CEVTI for CDMA
#### 5.1.1 Channel Coefficient Estimation  
According to Equation (26), the update of the channel coefficient vector is:  
\[q_{\mathbf{a}}^{t+1}(\mathbf{a})\propto\frac{1}{T}\text{exp}\sum_{d_{i}}q_{d_ {i}}^{t}\eta_{g}(\mathbf{r}\mathbf{d},\alpha) \tag{29}\]  
Similarly, the update of the codeword parameter is:  
\[q_{d_{i}}^{t+1}(d_{i})\propto\frac{1}{T}\text{exp}\int\mathbf{da}\sum_{d_{-i}} q_{d_{-i}}^{t}\eta_{l}(\mathbf{r}\mathbf{d},\alpha) \tag{30}\]  
Observe that when \(d_{i}\
otin\mathcal{C}_{i}\), \(q_{d_{i}}=0\). Furthermore, \(\eta_{g}(\mathbf{r}\mathbf{d},\alpha)\propto\text{log}p(\mathbf{a}\mathbf{d} \ \mathbf{r})\), which is not intuitive to compute, it can be simplified by computing \(p(\mathbf{r}\mathbf{a}\mathbf{,}\mathbf{d})\) instead, since by the chain rule, \(p(\mathbf{a}\mathbf{,}\mathbf{d}|\\ textbfr)=p(\mathbf{r}\mathbf{|a}\mathbf{,}\mathbf{d})p(\mathbf{a})p( \mathbf{d})/p(\mathbf{r})\), and dropping \(p(\mathbf{d})\) when updating \(p(\mathbf{a})\) does not impact the result. According to Equation (1), we can easily compute the analytical distribution of \(p(\mathbf{r}\mathbf{|a}\mathbf{,}\mathbf{d})\) using Gaussian density equation. Therefore, the above equation can be rewritten as:  
\[q_{\mathbf{a}}^{t+1}(\mathbf{a})\propto\frac{1}{T}\text{exp}\sum_{d_{i}}q_{d_ {i}}^{t}\text{log}p(\mathbf{r}\mathbf{|a}\mathbf{,}\mathbf{d}) \tag{31}\]  
Similarly, the update of the codeword parameter is:  
\[q_{d_{i}}^{t+1}(d_{i})\propto\frac{1}{T}\text{exp}\int\mathbf{da}\sum_{d_{-i}} q_{d_{-i}}^{t}\text{log}p(\mathbf{r}\mathbf{|a}\mathbf{,}\mathbf{d}) \tag{32}\]  
Assuming the noise vector \(w[l]\) of Equation (1) is \(\Sigma_{w}\), and \(\mathbf{a}\) is also Gaussian distribution, we need to update the mean and covariance of \(\mathbf{a}\) separately, i.e.,  
\[q_{\mathbf{a}}^{t+1}(\mathbf{a})\propto\frac{1}{T}\text{exp}\sum_{d_{i}}q_{d_ {i}}^{t}\text{log}p(\mathbf{r}\mathbf{|a}\mathbf{,}\mathbf{d}) \tag{33}\]in which  
\[\text{log}p(\mathbf{r}|\mathbf{a},\mathbf{d},\Sigma_{w})=\text{const}*|\Sigma_{w} |^{-1} \tag{34}\]  
Defining  
\[\begin{split} d_{i}^{t}[l]\triangleq\mathbb{E}_{q_{d}^{t}}\{d_{i} [l]\}=\mathbb{E}_{q_{d_{i}^{t}}}\{d_{i}[l]\}\\ =\sum_{d_{i}\in\mathcal{C}_{i},d_{i}[l]=1}q_{d_{i}}^{t}(d_{i})- \sum_{d_{i}\in\mathcal{C}_{i},d_{i}[l]=-1}q_{d_{i}}^{t}(d_{i})\\ \mathbb{E}_{q_{d}^{t}}\{d_{i}[l]*d_{j}[l]\}\triangleq\begin{cases} d_{i}[l]*d_{j}[l],&i\
eq j,\\ &1,&i=j\end{cases}\end{split} \tag{35}\]  
and  
\[(\Omega_{w}^{t})^{-1}\triangleq\mathbb{E}_{q_{\Sigma_{w}^{t}}^{t}}\{\Sigma_{w} ^{-1}\} \tag{37}\]  
so that:  
\[q_{\mathbf{a}}^{t+1}(\mathbf{a})\propto\frac{1}{T}\text{exp}[-(\mathbf{a}- \mathbf{a}^{t+1})^{H}{\Sigma_{\mathbf{a}}^{t+1}}^{-1}(\mathbf{a}-\mathbf{a}^{ t+1})] \tag{38}\]  
where \(\mathbf{a}\) is:  
\[\begin{split}\mathbf{a}_{\text{mean}}^{t+1}&= \Sigma_{\mathbf{a}}^{t+1}(\sum_{l=0}^{L_{p}-1}D_{p}[l]^{H}S[l]^{H}(\Omega_{w}^{ t})^{-1}r[l]\\ &+\sum_{l=L_{p}}^{L-1}\hat{D}^{t}[l]^{H}S[l]^{H}(\Omega_{w}^{t})^{ -1}r[l])\end{split} \tag{39}\]  
and the covariance of \(\mathbf{a}\) is:  
\[\begin{split}\Sigma_{\mathbf{a}}^{t+1}&=\frac{1}{T ^{2}}(\Sigma_{\mathbf{a}}^{-1}+\sum_{l=0}^{L_{p}-1}D_{p}[l]^{H}S[l]^{H}(\Omega_ {w}^{t})^{-1}S[l]D_{p}[l]\\ &+\sum_{l=L_{p}}^{L-1}\hat{D}^{t}[l]^{H}S[l]^{H}(\Omega_{w}^{t})^ {-1}S[l]\tilde{D}[l]\\ &+\sum_{l=L_{p}}^{L-1}\mathbf{E}^{t}[l]^{H}\text{Diag}\{S[l]^{H} (\Omega_{w}^{t})^{-1}S[l]\}\mathbf{E}^{t}[l])^{-1}\end{split} \tag{40}\]  
in which \(\mathbf{E}^{t}=\text{diag}\{1-(\hat{d}_{1}[l]^{t})^{2},\cdots,1-(\hat{d}_{N}[ l]^{t})^{2}\}\).