# Optical Code Construction of 2D Spectral/Spatial BIBD Codes for SAC-OCDMA Systems
## 5 Results and Analysis
### Simulation Analysis  
The proposed coding scheme and corresponding system architecture performance was verified by implementation in a highly acknowledged software called Optisystem. The simulation model was developed according to the structure of the transmitter and receiver modules in Figures 1 and 2, respectively. For the simulation setup, the transmitter module contains a broadband source (BBS) with a 30 nm spectral width. For a single user, the end-face of the BBS is fed into a 1:3 power splitter used to split the spectrum into three equal portions for the spectral encoding operation. The spectral encoder is employed using a multiplexer arrangement (MUX) with three input ports and a single output port. Each port is used to carry the signal toward a specially configured bandpass filter to allow the spectrum according to the chip placement of the spectral coding sequence (Figure 7). The spectrally encoded spectrum is then fed into the Mach Zehnder Modulator (MZM), which is further connected to the spatial encoding arrangement. For a single user, the spatial encoder is employed using a power splitter arrangement with 1:w2 ports. Each port is used to split the spectrally encoded spectrum in equal proportions and forward it towards a specific star coupler. The connection between the output legs of the power splitter and star coupler is defined by the placement of 1s in the spatial code sequence. Outputs of the star coupler are further divided into two parts where the upper side is used to provide the encoded spectrum to balanced detector 1 of the desired user and the bottom side is configured to provide the encoded received signal to balanced detector 2 of the user compliment to the desired one. Figure 6: Relationship between BER and broadband source spectral width with 20 active users and a data rate of 622 Mbps. As proof of concept simulation analysis was performed for a total of six users. Code sequences from Table 2 were used to design the simulation model. Wavelengths and star couplers allocation for a single user (User 1) was selected as shown in Table 5. EDFAs were employed in the simulation model to compensate for the power drops across the network. Finally, the analysis was performed for a back-to-back model by connecting the transmitter and receiver module directly. The balanced detector is essentially made from the combination of uniform FBG filters with a bandwidth of 0.4 nm to recover the signal with maximum auto and zero cross-correlation at the receiving end. Figure 8 shows the eye diagram for the proposed setup when six users communicate simultaneously at 1, 1.5, 2, and 2.5 Gbps. It is evident from the eye openings that the proposed model can provide the required performance and support multiple users communicating at significant data rates. Figure 9 shows the variation of BER and Q factor as a function of data rate for six users at \(-\)10 dBm received power. The Q-factor performance provides a qualitative description of the optical receiver performance; the performance of an optical receiver depends on the signal-to-noise ratio (SNR). The Q-factor suggests the minimum SNR required to obtain a specific BER for a given signal. Obtained Q and BER values at different data rates are as follows: 1 Gbps (Max. Q = 8.4, Min. BER = 4.6 \(\times\) 10\({}^{-14}\)), 1.5 Gbps (7.4, 3.9 \(\times\) 10\({}^{-11}\)), 2 Gbps (7.01, 6.59 \(\times\) 10\({}^{-10}\)), and at 2.5 Gbps (6.42, 8.36 \(\times\) 10\({}^{-9}\)), respectively. It is clear from the results that the SAC based OCDMA system with the proposed code provides low error performance for data rates up to 2.5 Gbits/s. The increase of the data rate has a negative impact on both the BER and Q factor in which chips spacing became minimal, thus, increasing inter-symbol interference (ISI), eventually leading to performance deterioration. Figure 7: Simulation model of 2D-BIBD code for six users at 1 Gbps and \(-\)10 dBm input power.