## 2 MUI Cancellation Algorithm of the Proposed SAC Receiver
Hardware Implementation of the Proposed OCDMA Receiver Based on Recursive Interference Cancellation  
In this section, we investigate hardware implementation supporting the proposed algorithm of MUI cancellation. To demonstrate the RIC has the potential to be implemented in a practical communication scenario, Figure 3 shows the PON topology based on OCDMA for downstream communications. PON supports various multimedia transmissions, such as voice, video, and image over a broadband optical access network. In optical line terminal (OLT), the received electrical data is firstly conveyed to optical pulses and then encoded with optical code by the OCDMA transmitter. The combined OCDMA signal is broadcast to several optical network units (ONUs) by splitting its power \begin{table}
\begin{tabular}{c c c c c} \hline \hline \(i\) & \(\mathbf{C_{i}}\) & \(d_{i}\) & \(\mathbf{C_{i}}d_{i}\) & **User Type** \\ \hline
1 & \(\mathbf{C_{1}}=\{1,\,1,\,1,\,0,\,0,\,1,\,0\}\) & \(d_{1}=1\) & \(\{1,\,1,\,1,\,0,\,0,\,1,\,0\}\) & Interference User \\ \hline
2 & \(\mathbf{C_{2}}=\{1,\,1,\,0,\,0,\,1,\,0,\,1\}\) & \(d_{2}=1\) & \(\{1,\,1,\,0,\,0,\,1,\,0,\,1\}\) & Interference User \\ \hline
3 & \(\mathbf{C_{3}}=\{1,\,0,\,0,\,1,\,1,\,1\}\) & \(d_{3}=0\) & \(\{0,\,0,\,0,\,0,\,0,\,0\}\) & Nonactive User \\ \hline
4 & \(\mathbf{C_{4}}=\{0,\,0,\,1,\,0,\,1,\,1,\,1\}\) & \(d_{4}=0\) & \(\{0,\,0,\,0,\,0,\,0,\,0\}\) & Nonactive User \\ \hline
5 & \(\mathbf{C_{5}}=\{0,\,1,\,0,\,1,\,1,\,0\}\) & \(d_{5}=0\) & \(\{0,\,0,\,0,\,0,\,0,\,0\}\) & Nonactive User \\ \hline
6 & \(\mathbf{C_{6}}=\{1,\,0,\,1,\,1,\,0,\,0\}\) & \(d_{6}=0\) & \(\{0,\,0,\,0,\,0,\,0,\,0\}\) & Nonactive User \\ \hline
7 & \(\mathbf{C_{7}}=\{0,\,1,\,1,\,0,\,0,\,1\}\) & \(d_{7}=1\) & \(\{0,\,1,\,1,\,1,\,0,\,0,\,1\}\) & Target User \\ \hline \hline \(\mathbf{R_{1}}=\mathbf{C_{1}}d_{1}+\mathbf{C_{2}}d_{2}+\mathbf{C_{7}}d_{7}=\{2,\, 3,\,2,\,1,\,1,\,2\}\) & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: A numerical example of data transmissions of optical code-division multiple access (OCDMA) signals for user number \(K=7\). \begin{table}
\begin{tabular}{c c c c} \hline \hline \(i\) & \(\mathbf{R_{i}}\) & **Correlation Subtraction** & \(d_{i}\) \\ \hline
1 & \(\mathbf{R_{1}}=\{2,\,3,\,2,\,1,\,1,\,2\}\) & \(\mathbf{R_{1}}\odot\mathbf{C_{1}}-\mathbf{R_{1}}\odot\overline{\mathbf{C_{1}}}=8-4 =4\) & \(d_{1}=1\) \\ \hline
2 & \(\mathbf{R_{2}}=\mathbf{R_{1}}-\mathbf{C_{1}}d_{1}=\{1,\,2,\,1,\,1,\,0,\,2\}\) & \(\among all users. At ONU, the OCDMA receiver takes the inverse processes to decode and demodulate the received optical signals. Figure 4 shows the receiver architecture designed with two array waveguide gratings (AWGs), an electrical controller, and a balanced detector. We use the example of user classification and M-sequence coded signals in Table 1. OCDMA signals with the code length of 7 are encoded/decoded by the 7 \(\times\) 7 AWGs. At the 1 st stage, the received signal \(\mathbf{R_{1}}\) is sent to the 1 st input port of the AWG encoder. The seven output signals are divided into two groups, with four signals in the first group and three in the second. The output ports of the signals (1, 2, 3, and 6) in the first group correspond to the chip positions of chip ones in code sequence \(\mathbf{C_{1}}\) = {1, 1, 1, 0, 0, 1, 0}; the numbers in the second (4, 5, and 7) correspond to the chip positions of chip zeros. Then, the first and the second grouped signals are transmitted to the upper and the lower branch of the balanced detector, respectively. The 1 st interference bit \(d_{1}\) is extracted by the result of correlation subtraction computing at the detector output. As for interference regeneration, \(d_{1}\) is converted to the optical domain by an electrical-optical modulator (EOM) with a broadband light source (BLS). The modulated optical signal is sent to the 1 st input port of the AWG encoder. The signals at the 1 st, 2 nd, 3 rd, and 6 th output ports are connected to generate interference term \(\mathbf{C_{1}}d_{1}\).