# Windowed Joint Detection and Decoding with IR-HARQ for Asynchronous SCMA Systems
## 3 Windowed Joint Detection and Decoding Algorithm
### Windowed Joint Detection and Decoding Algorithm
Additionally, the functionality of this scheme for the user \(j\) at time unit \(t\) during operation is illustrated in Figure 4.  
In addition, if the window size is set to \(w=1\), then the iteration process between MUD\({}_{s}\) (MUD\({}_{t},\dots,\)MUD\({}_{t-w+1}\)) and DEC\({}_{t}\) reduces to the original joint detection and decoding algorithm discussed in this paper. We can see the details in Figure 5, where the slashed rectangles indicate successfully decoded blocks, and the vertically lined rectangles represent blocks that failed to be decoded. The traditional joint detection and decoding algorithm, as shown in Figure 5, performs the iterations between the decoder and detector at the same time unit. However, the windowed joint detection and decoding algorithm exchanges the information between the detector and decoder not only at the current time units but also at the previous \(w\) time units, resulting in a noticeable improvement in complexity. Although achieving performance improvement comes at the cost of complexity, it is a worthy trade-off for the decoding algorithm for the system with HARQ. Figure 3: Decoding diagram with the windowed joint detection and decoding algorithm. (**a**) Windowed joint detection and decoding algorithm at different time units with \(w=3\). (**b**) The extrinsic information exchanged between \(\text{MUD}_{s}\), \(s\in[t-w+1,t]\) and \(\text{DEC}_{j}\), \(j=1,\dots,J\) at time unit \(s\). ```
1:Initialization: \(D_{\max}=4\), \(w=3\), Iter\({}_{\text{out}}=5\), Iter\({}_{\text{cnt}}=0\), var\({}_{w}=0\). 2:if time unit \(t<w\)then
3: var\({}_{w}=t+1\). 4:else
5: var\({}_{w}=w\). 6:endif
7: MUD\({}_{1}\) performs the MPA multi-user detection and sends the extrinsic information to DEC\({}_{t}\) according to (7);
8:whileIter\({}_{\text{cnt}}<\text{Iter\_{out}}\)do
9:for\(j=1,2,\ldots,J\)do
10: According to the current column and row indexes of the parity matrix, start the incremental decoding in DEC\({}_{j}\):
11:if decoded correct then
12: Continue. 13:else
14: Save the extrinsic information;
15:endif
16:endfor
17:if All the users decode correctly then
18: break;
19:else
20: DEC\({}_{i}\) sends the extrinsic information to the detector MUD\({}_{i}\), \(i=t,t-1,\ldots,t-w+1\) according to (6);
21:endif
22: MUD\({}_{t},\ldots,\text{MUD}_{t-w+1}\) carry on the MPA multi-user detection separately;
23: MUDs deliver the extrinsic LLRs to the DEC\({}_{t}\) according to (6). 24: Iter\({}_{\text{out}}++\);
25:endwhile
26:for\(j=1,2,\ldots,J\)do
27:if decoded correct then
28: Send ACK to the transmitter ; hence, the new initial block will be sent. 29: Update current column and row indexes. 30:else
31: Update current column and row indexes. 32: Send NACK to the transmitter ; hence, the corresponding redundant parity bits will be sent. 33:endif
34:endfor
```  
**Algorithm 1** Windowed Joint Detection and decoding Algorithm. Figure 4: The process of the \(j\)th user decoding at the time unit \(t\). Figure 5: Decoding diagram with the original joint detection and decoding algorithm.