## 2 System Description of OFDM-OCDMA RoF System
Figure 6c,d illustrate the spectral diagrams of the signals in I-channel and Q-channel magnified at 100\(\times\), respectively. The signals were magnified 100\(\times\) before they were transmitted to the OFDM demodulator because after the signals in I-channel and Q-channel were modulated onto the optical carriers and encoded, signal power decreased due to insertion loss, which drastically reduced the power of the signals once they were detected by the receivers. Therefore, the detected electrical signals were magnified 100\(\times\) to fully display the signal spectrum in the oscilloscope box and to compensate for the loss of signal power during insertion loss and transmission process. In the OFDM demodulator block, a down-converter was used to downscale the balanced signals to baseband OFDM signals. The downscaled signals were transmitted to a built-in OFDM demodulation block for demodulation, and then to a 4-QAM demodulation block to restore the signals to digital signals, as illustrated in Figure 5c. Finally, the two signals were combined to form complete OFDM signals, which were transmitted to the OFDM demodulator for demodulation. Figure 6e illustrates a spectral diagram of the complete OFDM signals. Figure 4: A spectral diagram of the signals at the various nodes of the BS: (**a**) the upscaled signals in I-channel; (**b**) the upscaled signals in Q-channel; (**c**) the optical carrier; (**d**) the modulated, vertically polarized signals; (**e**) the modulated, horizontally polarized signal; (**f**) the combined signals; and (**g**) the encoded signals. Figure 5: _Cont._  
Figure 5: An architectural diagram of a receiver in a simulation environment: (**a**) the architectural diagram of the receiver; (**b**) the OCDMA decoder for the vertical SOP (decoder(v)); and (**c**) the OFDM demodulator. Figure 6: _Cont_. In order to address problems of transmission distance, optic fiber was used as the transmission medium. However, this section only investigates the optic fiber simulation results after adding attenuation factors; the simulation results after adding chromatic dispersion (CD) parameters are analyzed in detail in next sections, and a compensation mechanism is also proposed. To determine accuracy, the present study employed Matlab to process the digital signals of the transmitter modulated through 4-QAM demodulation in an access simulation environment. However, the usable data length was 32,768 due to limited memory, suggesting that when using a single BS with predetermined parameters, the receivers of the OFDM-OCDMA system obtained the minimum bit error rate (BER) measured value is limited in \(3\times 10^{-5}\). Figure 7 is BER curve diagrams at different transmission distances. Regarding the transmission distance, keeping the input laser source power fixed at 10 dBm and setting the attenuation factor in the optic fiber at 0.2 dB, the BER increases with increased distance. The BER for system architecture with a data length of 32,768 was \"0\" when the transmitted distance is smaller than 80 km. The cluster points in the constellation diagram also become gradually more blurred. In addition, calculations using the Matlab software indicated that the receiver could completely restore the received signals without errors when the transmission distance was shorter than 80 km. Figure 6: Spectrograms of each node signal: (**a**) vertical SOP signal at the receiver; (**b**) horizontal SOP signal at the receiver; (**c**) I-channel signal after balance detection and amplification; (**d**) Q-channel signal after balance detection and amplification; and (**e**) the complete OFDM signal at the receiver. Figure 7: Curve diagram of bit-error-rate (BER) in relation to different transmission distances.