# Efficient Low-Complexity Turbo-Hadamard Code in UAV Anti-Jamming Communications
## 3 Low-Complexity Turbo-Hadamard Codes Based on Tail-Biting
### The Tail-Biting Turbo-Hadamard Decoder  
The tail-biting turbo-Hadamard code is kind of multiple turbo-code which can be APP-decoded by means of the Bahl, Cocke, Jelinek and Raviv (BCJR) algorithm [29]. The decoder structure is shown in Figure 5. The \(M\) component tail-biting convolutional-Hadamard decoder is involved in dealing with each component code. The log likelihood ratio (LLR) of every information bit is calculated and exchanged from one component decoder to another during decoding. The LLR of parity bits will not be calculated or exchanged. The received symbols \(\hat{\mathbf{c}}\) can be rearranged as a symbol block \(\hat{\mathbf{C}}\), which can be written by  
\[\hat{\mathbf{C}}=\{\mathbf{D}_{r},\mathbf{P}_{r}^{(1)},...,\mathbf{P}_{r}^{(M)}\}, \tag{13}\]  
where \(\mathbf{D}_{r}\) denotes the information bit block of the received symbols, and \(\mathbf{P}_{r}^{(m)},m=1,...,M\) denotes the \(m\)th component parity bit block (note that \(\mathbf{P}_{r}^{(m)}\) corresponds to \(\{\mathbf{q}^{(m)},\mathbf{P}^{(m)}\}\)). In the beginning of the iteration, the initial prior LLR of information bits \(\mathbf{L}^{0}=\mathbf{D}_{r}\) is entered into DEC-1. As the iteration progresses, in the \(m\)th APP decoder, the non-self prior LLR of information bits \(\mathbf{L}_{a}^{(m)}\) is calculated by  
\[\mathbf{L}_{a}^{(m)}=\mathbf{\tilde{L}}^{(m)}-\mathbf{E}_{pre}^{(m)}, \tag{14}\]  
where \(\mathbf{\tilde{L}}^{(m)}\) denotes the prior LLR of information bits fed into the DEC-m, and \(\mathbf{E}_{pre}^{(m)}\) denotes the extrinsic LLR of information bits in previous iteration (initialized by zeros). Figure 5: An APP tail-biting turbo-Hadamard decoder. The APP decoder processes the non-self prior LLR of information bits \(\mathbf{L}_{a}^{(m)}\) and the prior LLR of parity bits \(\tilde{\mathbf{P}}^{(m)}=\mathbf{P}_{r}^{(m)}\) into the posterior LLR of information bits \(\mathbf{L}^{(m)}\) based on the BCJR algorithm (See details in Algorithm 2). The extrinsic LLR of information bits \(E^{(m)}\) is calculated in an extrinsic LLR computing unit (ECU) by  
\[\mathbf{E}^{(m)}=\mathbf{L}^{(m)}-\mathbf{L}_{a}^{(m)}. \tag{15}\]  
```
0: Block extrinsic prior LLR of information bits \(\mathbf{L}_{a}\) of size \(K\times r\), and block prior LLR of parity bits \(\mathbf{\tilde{P}}\) of size \(K\times(2^{r}-r)\). 0: Block extrinsic LLR of information bits \(\mathbf{E}\) of size \(K\times r\), and block posterior LLR of information bits \(\mathbf{L}\) of size \(K\times r\). 1: Initialize \(k_{1}=1,k_{2}=1,k_{3}=1=,k_{4}=1\), \(\mathbf{a}_{0}=0\), \(\mathbf{b}_{K}=0\). 2:repeat
3: Calculate \(\mathbf{g}_{k_{1}}\) with \(\mathbf{L}_{a_{k_{1}}}\) and \(\tilde{\mathbf{P}}_{k_{1}}\) according to (17) in GCU. 4:\(k_{1}=k_{1}+1\). 5:until\(k_{1}=K\). 6:repeat
7: Calculate \(\mathbf{a}_{k_{2}}\) with \(\mathbf{g}_{k_{2}}\) and \(\mathbf{a}_{k_{2}-1}\) according to (21) in ACU1. 8: Calculate \(\mathbf{b}_{K-k_{2}}\) with \(\mathbf{g}_{K-k_{2}+1}\) and \(\mathbf{b}_{K-k_{2}+1}\) according to (23) in BCU1. 9:\(k_{2}=k_{2}+1\). 10:until\(k_{2}=K\)
11:\(\mathbf{a}_{0}=\mathbf{a}_{K}\), \(\mathbf{b}_{K}=\mathbf{b}_{0}\) according to [30]. 12:repeat
13: Calculate \(\mathbf{a}_{k_{3}}\) with \(\mathbf{g}_{k_{3}}\) and \(\mathbf{a}_{k_{3}-1}\) according to (21) in ACU2. 14: Calculate \(\mathbf{b}_{K-k_{3}}\) with \(\mathbf{g}_{K-k_{3}+1}\) and \(\mathbf{b}_{K-k_{3}+1}\) according to (23) in BCU2. 15:\(k_{3}=k_{3}+1\). 16:until\(k_{3}=K\)
17:repeat
18: Calculate \(\mathbf{L}_{k_{4}}\) with \(\mathbf{g}_{k_{4}}\), \(\mathbf{a}_{k_{4}}\) and \(\mathbf{b}_{k_{4}+1}\) according to (25) in LCU. 19: Calculate \(\mathbf{E}_{k_{4}}\) with \(\mathbf{L}_{k_{4}}\) and \(\mathbf{L}_{a_{k_{4}}}\) according to (15) in ECU. 20:\(k_{4}=k_{4}+1\). 21:until\(k_{4}=K\)
```  
**Algorithm 2** Tail-Biting Convolutional-Hadamard APP Decoder Algorithm.