## 3 Simulation Setup and Results  
### Feasibility of the Proposed Bi-OCDMA  
The simulation was conducted using the well-known optical system software, OptiSystem version 10. Based on the architecture in Figures 1 and 2, the first simulation was conducted with a single-user scheme to verify the feasibility of the proposed Bi-OCDMA scheme. The power of the CW laser array was set to 0 dBm to minimize the nonlinear effect, and one PRBS generator was used to generate the user's information bit randomly with a sequence length of 512 bits and 8 samples per bit for transmission over the system. Next, these information bits were fed to the PSK generator with a 0-degree phase offset and passed through the electrical bias and electrical gain for signal normalization before being used as a modulation signal. A phase modulator was utilized to modulate the information signals using the optical modulation signals. In addition, the coupling coefficients of all \(2\times 2\) couplers in the simulation were set to 0.5. A polarization splitter was used to split the signals into two orthogonal polarization states (0 degand 90 deg, i.e., horizontal and vertical states). An optical adder was used in this simulation to combine the two optical signals. A polarization combiner was used to combine the two polarization states. In this simulation, an FSO channel with a short-to-mid range was set as the transmission medium. An ideal circulator was used to direct the optical signal from one port to another and prevent the signal from propagating in an unintended direction. A uniform FBG was employed to reflect and transmit the wavelength based on the signature code. A photodiode was utilized as the detector for the received optical signals. A low-pass Bessel filter was used with a cut-off frequency of its linear phase response up to a bit rate of 0.75. An electrical subtractor was applied to subtract two electrical signal outputs to complete the bipolar scheme with balanced photodetection. A 3R regenerator was used to regenerate electrical signals. An optical spectrum analyzer was used to measure and investigate the optical spectra. An oscilloscope visualizer was used to monitor the output signals of the system. A BER analyzer was used to observe several parameters of the system  
Figure 3: Proposed Bi-OCDMA architecture for two users. performance, that is, BER and Q-factor. The overall parameters used in the simulations are listed in Table 2.  
The modified M-sequence code with a code length of eight was used as the signature code. Based on Table 1, user#1 was assigned with the codeword \(X=[\lambda_{1H},\lambda_{2V},\lambda_{3H},\lambda_{4H},\)\(\lambda_{5H},\)\(\lambda_{6V},\)\(\lambda_{7V},\)\(\lambda_{8V}]\) for user data bit of \"0\" and \(\overline{X}=[\lambda_{1V},\)\(\lambda_{2H},\)\(\lambda_{3V},\)\(\lambda_{4V},\)\(\lambda_{5V},\)\(\lambda_{6H},\)\(\lambda_{7H},\)\(\lambda_{8H}]\) for user data bit of \"1.\"  
Figure 4 presents the measured spectra when bit \"1\" was transmitted after phase modulation and passing over the polarization splitter. Figure 4a illustrates the measured spectra at the upper side, \(\lambda_{1}\), \(\lambda_{3}\), \(\lambda_{4}\), \(\lambda_{5}\) measured at vertical polarization, and the light intensities were \(-3\) dBm. Figure 4b shows the measured spectra at the lower side, \(\lambda_{2}\), \(\lambda_{6}\), \(\lambda_{7}\), \(\lambda_{8}\) measured at horizontal polarization, and the light intensities were \(-3\) dBm.