# Deep Learning-Based Spread-Spectrum FGSM for Underwater Communication
## 4 SS-FGSM Performance Analysis
### Receiver Complexity  
To calculate the receiver complexity, we consider any floating-point number (flops) required in each decision of the receiver decoder. The detection computation complexity at the receiver side is determined by calculating the total number of flops (TNCO) required for each detection method. The current schemes of the SMTs are required to perform searching between a combination of \(\ (2)^{R}\), where \(R\) denotes the data rate achieved by each SMTs scheme. In addition, we consider in each operation, \(\sum\limits_{j=1}^{N_{t}}\|\mathbf{y}_{j}(t)-\ x_{q}(t)\mathbf{h}_{qj}(t,\tau)\|^{2}\) one combined multiplication (i.e., four actual multiplications) to compute \(\mathbf{x}_{q}(t)\mathbf{h}_{qj}(t,\tau)\) and four real multiplications to calculate the square norm. The conventional SM has utilized the ML decoder as a detection algorithm and by using the computation of \(\sum\limits_{j=1}^{N_{t}}\left\|\mathbf{y}_{j}(t)-\ \mathbf{x}_{q}(t)\mathbf{h}_{qj}(t,\tau)\right\|^{2}\) as a definition to calculate the TNCO, the SM receiver's complexity can be expressed as follows [17]:  
\[\text{TNCO}_{SM}=8N_{r}(2)^{R_{SM}}. \tag{33}\]  
In the same way, the receiver's complexity of the GSM has been computed as in the conventional ML detector. However, as multiple transmit antennas are activated in GSM to transmit the same constellated symbol, its receiver's complexity is increased compared to the conventional SM. The GSM receiver's complexity is expressed as follows [17]:  
\[\text{TNCO}_{\text{GSM}}=8N_{r}(2(N_{u}-1))(2)^{R_{\text{GSM}}}. \tag{34}\]  
The maximum TNCO required for the ML detector in the case of QSM is expressed as follows [17]:  
\[\text{TNCO}_{\text{QSM}}=8N_{r}(2)^{R_{\text{GSM}}}. \tag{35}\]  
In FGSM, the receiver's complexity is different, where for the number of transmit ML detector has \(\frac{N_{t}}{2}-1\) maximum summation for the number of transmitting antennas are more than three, \(N_{t}\geq 3\). The complexity computation of the FGSM is expressed as follows [17]:  
\[\text{TNCO}_{FGSM}=8N_{r}\left(2\left[\frac{N_{t}}{2}-1\right]\right)(2)^{R_{ FGSM}}. \tag{36}\]  
For the EFGSM, the receiver's complexity has been decreased significantly since the search of ML is divided into two independent groups represented by primary constellation, carrying \(log_{2}(M)\) bits and secondary constellation carrying \(log_{2}\left(\frac{M}{2}\right)\) bits. The EFGSM receiver's complexity is expressed as follows [20]:  
\[\text{TNCO}_{EFGSM}=8N_{r}\left(\left(2\left[\frac{N_{t}}{2}-1\right]\right)(2 )^{R_{F}}\right)+\ \left(\left(2\left[\frac{N_{t}}{2}-1\right]\right)(2)^{R_{S}}\right)\right], \tag{37}\]where \(R_{P}\) is the data bit rate transmitted over the primary signal constellation and it is equal to \(log_{2}(M)\), while the \(R_{S}\) is the data bit rate transmitted over the secondary signal constellation and it is equal to \(log_{2}\Big{(}\frac{M}{2}\Big{)}\). In the GCIM, the receiver's complexity depends on the dispreading of real and imaginary parts of modulated data and the demodulation operation. Hence, in each real and imaginary parts of the received signal, the signal is multiplied first by \(\mathcal{N}\) codes, each code has \(\mathcal{N}\) length before summation to find the maximum value and get the correct spreading code used in mapping data. Then, the dispreads signal is demodulated following the modulation type of transmitter. Therefore, complexity computation of GCIM can be expressed as follows:  
\[\text{TNCO}_{GCIM}=2\mathcal{N}^{2}+2\mathcal{N}+2^{log_{2}(M)}. \tag{38}\]  
For the proposed scheme, we calculated the computation complexity for two types of detector, ML-detection based, and DL-detection based. For MLSS-FGSM, the complexity computation is calculated as in the conventional FGSM multiplied by complexity due to the estimation of spreading codes.