## 4 Simulation Setup  
In this paper, the architecture of our system can be seen in Figure 4. The Communication and Deep Learning Toolbox in MATLAB Software is used for simulation. We chose four typical and promising modulation formats, OOK, BPSK, QPSK, and 16 QAM. A total of 20,000 frames are generated for each modulation format with a length of 1024 samples. Since the network makes each decision based on a single frame rather than multiple consecutive frames, such as video, each frame must pass through a separate channel. In the transmitter side, the input symbols to the system are sampled and transmitted by a gamma-gamma atmospheric channel with random strength, which ranges from weak to strong added to AWGN whose SNR is generated randomly. At the receiver, the received signal is  
\[y(t)=x(t)\times h(t)+w(t) \tag{10}\]  
where, \(x(t)\) is the transmitted signal, \(h(t)\) is the gamma-gamma atmospheric channel, and \(w(t)\) is AWGN. Each frame contains 256 symbols, eight sampling points per symbol, and uses a gamma-gamma random variate. Therefore, a coherent time of atmospheric turbulence can be simulated. However, the AWGN is generated for each time step. Figure 3: Gamma-gamma probability density function for three different turbulence regimes, weak, moderate, and strong with different \(\alpha\), \(\beta\), and \(\sigma_{l}^{2}\) values, respectively. Figure 2: Values of \(\alpha\) and \(\beta\) under different turbulence regimes: weak, moderate to strong, and saturation. A random number of samples is removed from the beginning of each frame to remove transients and ensure that the frame has a random starting point relative to the symbol boundary. To improve the robustness against atmospheric optical turbulence and AWGN, random parameters are used to ensure the applicability of training data. We set the \(\sigma_{l}^{2}\) equals as 0.2, 1.6, and 3.5, representing the strength of turbulence of weak, moderate, and strong, respectively, for which the three parameter values have been used in most cases [18]. Additionally, we set the SNR of AWGN ranges from 10 to 30 dB. For a given turbulence regime, random fluctuations were added to the signal corresponding to \(\sigma_{l}^{2}\) of a particular turbulent regime to make sure all the data of every situation can be considered. For the subsequent circumstance, the complex input is used as the input dimension of two real inputs, and \(y(t)\) is introduced into a narrow two-dimensional convolution network as a set of \(2\times 1024\) vectors, in which in-phase and quadrature sampling (I/Q) constitute this two-row data, which can be regarded as a two-dimensional image. Figures 5 and 6 show the time domain diagrams and spectrograms of processed data for four modulation formats at present, respectively. In addition, Figure 7 shows the modulation constellation of the four modulation schemes when the SNR is 10 dB in the case of the weak turbulent channel as a typical example. It can be seen from the constellation points that the modulated signal has been disturbed by turbulence fluctuation and channel additive noise. Next, the input data were separated into 80% for training, 20% for validation label accordingly. By ensuring that the number of tags for each modulation format is the same, class imbalance in training data is avoided. In this way, frames of four modulation formats were generated and channel-faded, and their corresponding tags stored and provided to the CNN network. Figure 4: Proposed optical communication system. Figure 5: Amplitude of the real and imaginary parts of the example frames against the sample number. The blue lines are for the real part, while the red ones are for the imaginary part. Weak turbulence with SNR = 10 is as an example above. In the network structure adopted in this paper, six directly connected blocks are used. Each block is directly connected with four layers: convolution layer, BN layer, ReLU layer, and pooling layer.