# Turbo Decoder Design based on an LUT-Normalized Log-MAP Algorithm
## 3 The Normalized Log-MAP Algorithm  
The function \(\log(1+e^{-|\mathrm{a}-\mathrm{b}|})\) is a nonlinear calculation in Equation (8) that will consume lots of logic resources in decoder design, so we need to simplify the function \(\log(1+e^{-|\mathrm{a}-\mathrm{b}|})\) in \(\max^{\star}\). In [4; 5], two commonly used algorithms for approximating the nonlinear function \(\log(1+e^{-|\mathrm{a}-\mathrm{b}|})\) are as follows:  
(a) The \(\max^{\star}\) approximation method of the Max-Log-MAP algorithm is shown in Equation (10). \[\log(1+e^{-|\mathrm{a}-\mathrm{b}|})\approx 0 \tag{10}\]  
(b) The \(\max^{\star}\) approximation method of the LUT-Log-MAP algorithm is shown in Table 1[9]. The Max-Log-MAP algorithm consumes fewer logic resources, but has a poor decoding performance. The LUT-Log-MAP algorithm has a better decoding performance, but consumes a large amount of logic resources. The LUT-Log-MAP algorithm reduces the complexity of the Log-MAP algorithm in hardware implementation with only 0.1 dB decoding performance loss, so it can be said that the performance of the LUT-Log-MAP algorithm is better. However, the LUT-Log-MAP algorithm involves a large number of lookup table operations in hardware implementation, as well as having a large consumption of logical resources. So finding a \(\max^{*}\) approximation method becomes the key point in obtaining considerable decoding performance and reducing logic resource consumption. It can be seen from Figure 2 that function \(\log(1+e^{-|\mathrm{a-b}|})\) has a small range of \(0<\log(1+e^{-|\mathrm{a-b}|})<0.7\) with arbitrary real numbers a and b. Therefore, we try to establish Equation (11) by finding a fixed normalization factor \(\eta\left(\eta>1\right)\). \[\max(\mathrm{a,b})+\log(1+e^{-|\mathrm{a-b}|})\approx\eta\cdot\max(\mathrm{a, b}) \tag{11}\]  
From the approximation method of the LUT-Log-MAP algorithm [6], when \(|\mathrm{a-b}|>2\), the value of function \(\log(1+e^{-|\mathrm{a-b}|})\) approaches zero and becomes the Max-Log-MAP algorithm [7]. A lookup table is used to facilitate the algorithm in hardware implementation. Combining this idea, the proposed Nor-Log-MAP algorithm will determine the value of \(\eta\) under condition \(|\mathrm{a-b}|\leq 2\), and the value of \(\eta\) in \(|\mathrm{a-b}|>2\) will be equal to 1. Then, the optimal range \(|\mathrm{a-b}|\) can be verified under this fixed \(\eta\). The Nor-Log-MAP algorithm based on the above concept is shown in Equation (12). \[\max^{*}(\mathrm{a,b})\approx\left\{ \begin{array}{ll}\eta\cdot\max(\mathrm{a,b})&,if|\mathrm{a-b}|<\mathrm{range}\\ \max(\mathrm{a,b})&,\mathrm{otherwise}\end{array} \right. \tag{12}\]  
Turbo codes with a 1/2 code rate and 192 code length are used in a MATLAB simulation. As the final result needs to support hardware implementation, all the variables' values in the algorithm will go through Q2 quantization (Q total bits with 2 fractional bits) [8]. The Q2 quantization involves a decimal number with two fractional bits going through binary conversion, followed by the removal of the fractional bits and converting into a decimal number. Therefore, in the process of simulation, \(|\mathrm{a-b}|\leq 2\) will be \(|\mathrm{a-b}|\leq 8\) by Q2 quantization. We can achieve the lookup table method based on Q2 quantization, as shown in Table 2 [8], and this method is also used in normalized quantization. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \(|\mathrm{a-b}|\) & \(|\mathrm{a-b}|\)=0 & 0\(<|\mathrm{a-b}|\)\(\leq\)0.75 & 0.75\(<|\mathrm{a-b}|\)\(\leq\)2 & \(|\mathrm{a-b}|\)\(>\)2 \\ \hline \(\log(1+e^{-|\mathrm{a-b}|})\) & 0.69 & 0.5 & 0.25 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The \(\max^{*}\) approximation method for a lookup table. In addition, our experiments illustrate that these legal options result in very slight performance differences, as shown in Figures 3 and 4. The optimal factor can be discovered from the experiments that used a 192 code length, as described in this study.