# All-Integer Quantization for Low-Complexity Min-Sum Successive Cancellation Polar Decoder
## 4 All-Integer Quantization for Successive Cancellation Decoding Algorithm  
Quantization is an essential process in decoding algorithms, significantly impacting both performance and computational complexity. Generally, quantization techniques can be classified into uniform and nonuniform (nonlinear) quantization. Uniform quantization maintains a fixed step size across the entire dynamic range, making it computationally efficient and straightforward to implement. In contrast, nonuniform quantization employs variable step sizes, allocating finer resolution to small-magnitude values and coarser steps to larger values. The SC decoding performance comparison between uniform and nonuniform quantization is presented in [9]. While nonuniform quantization can improve precision for specific distributions, it introduces additional computational overhead. Uniform quantization is chosen in this work due to its low computational complexity and ability to maintain simplicity in the decoding process. This approach ensures the fast execution and low complexity of the SC decoding algorithm, which is crucial for efficient real-time decoding in practical systems. In general, a quantization function is characterized by a quantization step and quantization level denoted by \(q\) bits. Throughout the experiments, the quantization step is consistently set to 1 to preserve symmetry around zero, and this choice is maintained throughout the analysis without further discussion. To signify integer uniform quantization, the function \(Q(x,q)\) can be defined as  
\[Q(x,q)= \begin{cases}\lfloor x+0.5\rfloor&,-T(q)+1<x<T(q)-1,\\ \text{sign}(x)(T(q)-1)&,\text{otherwise},\end{cases}  \tag{8}\]  
where \(x\) is the input to the function and can be either a real or an integer value. The quantization boundary \(T(q)\) is defined as \(2^{q-1}\), where \(q\in\{2,3,4,...\}\), and \(q\) refers to the number of bits used to determine the quantization levels. For example, 3-bit quantization assigns values to eight specific levels. However, in 3-bit quantization, this approach utilizes seven distinct levels as \(\{-3,-2,-1,0,1,2,3\}\) to maintain symmetry and uniformity around zero. In this work, a C-based implementation is employed to study all-integer quantization behavior. Integer rounding and clamping techniques are applied to simulate this process in the polar decoder. By replicating hardware-like integer quantization through simple arithmetic operations, this software-based approach efficiently evaluates the impact of quantization on the decoding performance before actual hardware deployment. The CPU (Central Processing Unit) serves as the computational platform for this implementation, allowing flexibility in testing different mathematical computations. To clearly illustrate the integration of the quantization function \(Q(x,q)\) into the SC decoder, the SC decoding algorithm and its key sub-algorithm are shown in Algorithms 1 and 2. ```
Input: Received LLRs \(LLR_{1}^{N}\), frozen bit positions \(\mathcal{A}^{c}\) Output: Estimated codeword \(\hat{u}_{1}^{N}\)  Initialize LLRs: \(L_{i,n+1}\gets LLR_{i}\), where \(n\) is \(\log_{2}(N)\); for\(i=1\) to \(N\)do RecursivelyUpdateLLR(\(i,1\)) // begin with stage 1; if\(L_{i,1}\in\mathcal{A}^{c}\)then \(\hat{u}_{i}\gets 0\); else \(\hat{u}_{i}\gets 1\); ifi mod \(2=0\)then  UpdateBit(\(\hat{u}_{1}^{i-1},i,1\)) // apply Equation (5); return\(\hat{u}_{1}^{N}\)
```  
**Algorithm 1**Successive Cancellation Decoding Algorithm  
During the recursive LLR update process, the function \(Q(x,q)\) is applied to quantize values at multiple stages of Algorithm 2, including LLR inputs and the results of addition or subtraction operations. This ensures that the SC decoding algorithm consistently processesand operates on integer values, maintaining uniformity throughout the computation. Considering Equation (3), the quantization function (8) can be used to approximate nonlinear functions, i.e., \(Q(\tanh(x),q)\) and \(Q(\tanh^{-1}(x),q)\).