# Optical Code Construction of 2D Spectral/Spatial BIBD Codes for SAC-OCDMA Systems
## 1 Introduction
Previous studies show that 2D code families constructed using prime numbers show MAI effects due to shorter temporal length and larger correlation. In the OCDMA environment, 2D-BIBD codes performed better than 2D extended set prime code families due to their easy code construction, optimum temporal length, quantity of users, and good auto and cross-correlation properties [20]. For example, [PERSON] et al. [21] presented a new 1D-BIBD code construction based on zero cross-correlation code (ZCC) properties. The ZCC (\(C,w\)) code is a family of binary sequences of constant Hamming-weight \(w\) and length \(C\). The presented ZCC codes have a size of \(C\ \geq\ N\ \times\ w\ +\ 1\), where \(C\) refers to any prime number and \(N\) is the number of users. The proposed code construction method is easier compared to the existing ones. These codes are further implemented in a SAC-OCDMA system environment. Previously, 1D codes showed limited system performance in terms of code cardinality due to the restricted bandwidth of the source. However, 2D spectral/spatial (S/S) codes were able to solve this problem by extending the number of coded sequences in the spatial domain in which every frequency component is divided according to the spatial code of a particular user. So far, to the best of our knowledge, the 2D-BIBD code based on the spectral spatial approach along with conversion of 1D-BIBD to 2D-BIBD and its implementation in SAC environment is not reported in literature. Further, [PERSON] et al. [22] proposed a 2D maximal area matrices code (2D MM) constructed from a 1D matrices code family. The system performance was not significant due to high MAI among user codes. Similarly, [PERSON] et al. [23] showed that the 2D multidiagonal (MD) code can be derived from 1D MD code using ZCC code properties. [PERSON] et al. [24] showed that the 2D modified double weight code (MDW) can be derived from 1D MDW using an S/S coding approach. In another study, 2D spectral/spatial diluted perfect difference (DPD) code showed interference cancellation properties as well as PINN noise suppression abilities due to its design dependence on perfect difference set and dilution approach [25]. Moreover, [PERSON] et al. [26] discussed the construction of a 2D diagonal eigenvalue unity (DEU) code using an S/S coding approach with minimum cross-correlation and observed that the cardinality was increased when compared to existing 2D-DPD and 1D DEU codes. The advantage of BIBD is that their code families exist for prime and nonprime code weight values. Moreover, they can be designed for any code length (\(L\)), code weight (\(w\)), and cross-correlation (\(\lambda_{c}\)). Therefore, this study's objective was to design and develop a novel 2D-BIBD code using a spectral/spatial coding approach, which can support a higher number of users in the OCDMA environment. The proposed code is constructed using a 1D balanced incomplete block design (BIBD) technique. It is designed and implemented for spectral amplitude coding (SAC) based OCDMA networks and constructed using a 1D-BIBD code matrix. This matrix includes the estimation of the weight values and the number of users, which corresponds to code length. Due to its effective code design approach, the proposed code family yields large cardinality with optimal code length. Further, initial blocks are derived based on primitive elements, and by modulo addition of initial blocks, remaining blocks in the design are obtained. Next, the 1D code matrix is transformed into a 2D code using the cyclic shifting of the 1D-BIBD code set matrix. The 2D-BIBD code development algorithm is presented along with the 2D-BIBD code-based SAC OCDMA. The system performance is analyzed using Gaussian approximation in the presence of various noise sources. We derived BER performance expressions using Gaussian approximations considering the effects of PINN, shot, and thermal noises. 2D-BIBD code performance is compared with existing 2D-DPD and 2D-DEU codes.