## 2 MUI Cancellation Algorithm of the Proposed SAC Receiver  
For an OCDMA system with \(K\) active users, the receiver performs MUI elimination \(K-1\) times to remove \(K-1\) interference users. Assuming the \(K\)th user is the target user, the \(i\)th interference user is canceled at the \(i\)th stage, where \(1\equiv I\equiv K-1\). At each stage, the receiver executes MUI estimation and mitigation, which are performed by the spectral decoder and recoder, respectively. We define \(\mathbf{C}_{i}\) and \(d_{i}\) as the signature code and transmitted bit of the \(i\)th interference user, respectively. At the \(i\)th stage, the received multiplexed OCDMA signal \(\mathbf{R}_{i}\) is defined as follows:  
\[\mathbf{R}_{i}=\sum_{j=i}^{K-1}\mathbf{C}_{j}d_{j}+\mathbf{C}_{K}d_{K}, \tag{1}\]  
where \(\mathbf{C}_{K}\) and \(d_{K}\) are the signature code and the transmitted bit of the target user, respectively. Figure 1 shows the relative phases of the MUI estimation and mitigation at the 1 st stage of the proposed receiver. First, \(d_{1}\) is detected by sending \(\mathbf{R_{1}}\) to decoder \(\mathbf{C_{1}}\), and it is re-encoded with signature code \(\mathbf{C_{1}}\) to construct the 1 st interference term \(\mathbf{C_{1}}d_{1}\). For MUI mitigation, \(\mathbf{C_{1}}d_{1}\) is subtracted from the received signal \(\mathbf{R_{1}}\), and the signal entering the 2 nd stage is defined as \(\mathbf{R_{2}}=\mathbf{R_{1}}-\mathbf{C_{1}}d_{1}\). In each round of interference estimation/elimination, MUI is partially removed. Similar procedures are repeated \(K-1\) times until all \(K-1\) interference users are eliminated. Finally, only the target signal is left, and \(d_{K}\) can be recovered by passing \(\mathbf{C_{K}}d_{K}\) through decoder \(\mathbf{C_{K}}\). Next, we describe the detailed process of decoding interference bit \(d_{i}\) based on balanced detection. In this system, SAC signals are generated by employing M-sequences codes as the user signatures [24]. M-sequences codes are one of the quasiorthogonal codes that have been widely used in OCDMA networks with good correlation properties. The code characteristics can be interpreted as (\(N\), \(\omega\), \(\lambda\))  
Figure 1: Relative phases of multiuser interference (MUI) estimation/elimination at the 1 st stage of the proposed receiver. Table 2 illustrates the processes of MUI elimination for the proposed OCDMA receiver. At the 1 st stage, \(\mathbf{R_{1}}\) is sent to decoder \(\mathbf{C_{1}}\), performing \(\mathbf{R_{1}}\odot\mathbf{C_{1}}-\mathbf{R_{1}}\odot\overline{\mathbf{C_{1}}}\). The result of the correlation subtraction makes a decision about data bit \(d_{1}=1\). This indicates that \(\mathbf{C_{1}}\) is included in the \(\mathbf{R_{1}}\) and the 1 st user is an interference user. Then, \(d_{1}\) is re-encoded with \(\mathbf{C_{1}}\) to regenerate interference term \(\mathbf{C_{1}}d_{1}=\{1,\,1,\,0,\,0,\,1,\,0\}\). By removing \(\mathbf{C_{1}}d_{1}\) from \(\mathbf{R_{1}}\), the resultant signal is updated to \(\mathbf{R_{2}}=\mathbf{R_{1}}-\mathbf{C_{1}}d_{1}=\{1,\,2,\,1,\,1,\,0,\,2\}\). At the 2 nd stage, \(\mathbf{R_{2}}\) is successively sent to decoder \(\mathbf{C_{2}}\) with a similar operation to determine \(d_{2}=1\). The MUI of the 2 nd user is identified and then cancelled by performing \(\mathbf{R_{2}}-\mathbf{C_{2}}d_{2}\). For the next four stages, we find data bits \(d_{3}\), \(d_{4}\), \(d_{5}\), and \(d_{6}\) are all zero. Therefore, MUI cancellations are not performed in these rounds, and \(\mathbf{R_{i}}\) is identical to \(\mathbf{R_{i+1}}\), for \(3\cong i\cong 5\). At the 7 th stage, all interferences are completely removed and \(\mathbf{R_{7}}=\{0,\,1,\,0,\,1,\,1,\,1,\,0\}\) is arranged for the final decoding. As \(\mathbf{R_{7}}\) matches the target code \(\mathbf{C_{7}}\), we can decide data bit \(d_{7}=1\). This completes one full cycle of 7-stage MUI cancellation. The processes start over again when a new coded bit and other interferences arrive at the receiver.