## 1 Introduction
By employing the switch as user data to polarize the optical signals with a series of fiber Bragg gratings (FBGs) and optical circulators as the decoding devices, the proposed scheme successfully mitigates MAI in FSO communication systems. The system drawbacks due to the limitation in the speed of the optical switch caused the limited transmission rate of the system [21]. In our subsequent work [22], another bipolar optical code-division multiple-access (Bi-OCDMA) scheme with a dual electro-optical modulator (EOM) was proposed to improve the transmission rate and spectral-polarization coding performance compared to the switch method in a previous study. In this method, the properties of the two EOMs need to be kept as similar as possible; moreover, the signal power is limited because the proposed scheme only transmits the signal with a wavelength corresponding to chip \"1\" in the signature code [22]. However, for the modulation of optical signals, several techniques have been proposed; one of these is phase modulation, which is a modulation technique that encodes a message signal as variations in the instantaneous phase of a carrier wave. The phase modulator is the simplest EOM with superiority in improving immunity toward noise. In 2014, [PERSON] et al. [23] utilized a single-phase modulator for the simultaneous generation of time-domain spectral phase encoding/decoding (SPE/SPD) and differential phase-shift keying data modulation in the OCDMA system. The scheme proved that the flexibility and confidentiality of the OCDMA system can be improved by using a single-phase modulator [23]. In addition to the system design, channel impairments, such as atmospheric conditions and turbulence-induced fading, affect the performance of wireless optical communication. In [24], different detection schemes in SAC-OCDMA systems were investigated in the presence of different atmospheric impairments. The simulation results indicate that the SPD technique has the best performance among the detection methods. Another performance analysis of climatic turbulence was simulated in [25] with the hybrid SAC-OCDMA-OFDM method to reduce the signal fluctuations and quality degradation caused by weather conditions. The simulation results showed that the SPD detection receiver achieved better BER performance than the modified AND detection receiver. The results denoted in [25] also revealed that the proposed triangular matrix-zero cross-correlation code achieved better BER performance than the proposed pulse shifting substitution-zero cross-correlation code. Furthermore, different signature codes for SAC-OCDMA have been proposed and investigated in many studies. Several well-known SAC codes were adopted for the simulation in this study and are listed as follows:  
1. Modified quadratic congruence (MQC) code: With fixed in-phase cross-correlation, the MQC code resolves the interference, which is the main factor limiting the performance of the OCDMA system [26]. 2. Walsh-Hadamard code: The Walsh-Hadamard code maps messages of length \(n\) to codewords of length \(2^{n}\), and each non-zero codeword has a Hamming weight of exactly \(2^{n-1}\)[27; 28]. 3. Maximum length sequence (M-sequence) code: M-sequence code is a type of pseudo-random binary sequence with length \(2^{m-1}\). The bit sequences can be generated using maximal linear feedback shift registers and periodically reproduce every sequence of bits that can be represented by the shift registers [29]. 4. Multi-diagonal (MD) code: Another SAC code imposing the diagonal property is the MD code, which also has the property of zero cross-correlation. It has been shown that the MD code has been implemented in many OCDMA systems [30; 31; 32; 33]. In this study, a Bi-OCDMA system for FSO communication was implemented by utilizing the phase modulator for polarization coding with the SAC code as the signature code. The main contributions of this study are as follows:  
1.