# Fault Tolerant Spectral/Spatial Optical Code Division Multiple Access Passive Optical Network
## 2 Proposed Architecture  
The proposed architecture is developed by making changes at the OLT and feeder level of the 2D spectral-spatial OCDMA-based PON in [5]. A switching arrangement is introduced at the transmitter module to facilitate traffic switching between clockwise and counterclockwise flow in the case of failures at the feeder level. Furthermore, a conventional tree-based setup is replaced with a ring-based topology to provide desirable connection availability. The transmitter module starts with multiple broadband light sources (BBSs) that are utilized to provide the required spectrum for OCDMA encoding and transmission of the electrical pulses over the optical fiber (OF) medium. The OCDMA code determines the number of BBSs employed at the transmitter module. The proposed architecture is deployed with 2D double-weight zero cross-correlation (2D DW-ZCC) code that is developed with 1D DW-ZCC code sequences employed at the spectral \((X^{th})\) and spatial \((Y^{th})\) domains, respectively [4; 5; 24]. The 1D DW-ZCC code belongs to the family of SAC-OCDMA codes. It is developed with three basic performance parameters, code length \((L=K\times w)\), code weight \((w=2)\), cross-correlation \((\lambda_{c}=0)\), and auto-correlation \((\lambda_{a}=w)\). Here, \(K\) represents the total number of codes or subscribers in the system [5]. The same parameters are now employed along the spectral and spatial domains to develop a 2D structure of DW-ZCC code shown in Table 1, which gives four 2D DW-ZCC codes as \(S_{0,0}=Y_{0}^{T}X_{0}\), \(S_{0,1}=Y_{0}^{T}X_{1}\), \(S_{1,0}=Y_{1}^{T}X_{0}\), and \(S_{1,1}=Y_{1}^{T}X_{1}\). \(S_{0,0}\) is used to represent the first subscriber of the system with a code sequence of \(Y_{0}^{T}X_{0}\). Similarly, \(S_{0,1}\) is used to represent the second subscriber of the network having a unique code sequence of \(Y_{0}^{T}X_{1}\). Here, X is utilized to represent the spectral code sequence, and Y is used to represent information about the spatial code sequences that are utilized to build the 2D DW-ZCC code matrix. It can be observed that user \(S_{0,0}\) is allocated a code sequence of \(Y_{0}^{T}X_{0}\), with \(X_{0}=[1100]\) and \(Y_{0}=[1100]\) being the spectral and spatial code sequences, respectively. In general, the code matrix for 2D DW-ZCC code can be written as \(Z_{ij}=Y_{j}^{T}X_{i}\), where \(i=(1,2,3,\ldots,\ldots,M)\) and \(j=(1,2,3,\ldots,\ldots,N)\) represent spectral and spatial code sequences. Table 1 represents the basic structure of the 2D DW-ZCC codes built with \(X_{0}\), \(X_{1}\), \(Y_{0}^{T}\), and \(Y_{1}^{T}\), respectively [5; 25]. The 2D DW-ZCC code is utilized for the development of the proposed architecture because it provides the following superior features in comparison with the existing counter parts:  
1. Provision of maximum auto-correlation \((\lambda_{a}=w_{1}w_{2})\) and minimum cross-correlation \((\lambda_{c}=0)\), which can also be expressed as \(C^{(d)}(g,h)=\sum_{i=1}^{M}\sum_{j=1}^{N}d_{(i,j)}^{(d)}dz_{(i,j)}(g,h)\). 2. The adjacent placement of binary chips in both the spectral and spatial code sequences significantly simplifies the design of the spectral encoder and decoder modules through the utilization of a single filtering arrangement of binary to spectral encoding and vice versa. \begin{table}
\begin{tabular}{c c c} \hline \hline \(\mathbf{Y_{1}^{T}X_{i}}\) & \(\mathbf{X_{0}=[1100]}\) & \(\mathbf{X_{1}=[0011]}\) \\ \hline \(Y_{0}^{T}\begin{bmatrix}1\\ 0\\ 0\end{bmatrix}\) & \(\begin{bmatrix}1100\\ 1100\\ 0000\end{bmatrix}\) & \(\begin{bmatrix}0011\\ 0001\\ 0000\\ 0000\end{bmatrix}\) \\ \hline \(Y_{1}^{T}\begin{bmatrix}0\\ 1\\ 1\end{bmatrix}\) & \(\begin{bmatrix}0000\\ 1100\\ 1100\end{bmatrix}\) & \(\begin{bmatrix}0000\\ 0000\\ 0011\\ 0011\end{bmatrix}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The 2D DW-ZCC code. 3.