# Identification of Terahertz Link Modulation in Atmospheric Weather Conditions
## 3 Simulation and Discussion
### Performance under Different Weather Conditions
With the assistance of voting algorithms, the confusion of modulation formats in CNN is significantly reduced, and its ability to distinguish different modulation formats is stronger than that of a single CNN network. However, the CNN enhancement algorithm is still not enough when compared with the results from the LSTM network (Figure 2e-h), which can be more than 70% always. These research results provide valuable references for the construction of future base stations. For example, if the construction cost only allows for the use of one neural network, LSTM is the more feasible one. To see the difference between the real and predicted values, we calculated the mean square error (MSE), root mean square error (RMSE) and mean absolute percentage error (MAPE) of LSTM and CNN (using voting algorithms) under various weather conditions, as shown in Table 3. These variables can indirectly reflect the performance of the model, where MSE = \((\sum(y_{\rm{p}}-y_{\rm{r}})^{2})/n\), RMSE = \(((\sum(y_{\rm{p}}-y_{\rm{r}})^{2})/n)^{1/2}\), MAPE = 100% \(\times\)\((\sum(\left|y_{\rm{p}}-y_{\rm{r}}\right|/y_{\rm{r}}))/n\); n is the total quantity, \(y_{\rm{p}}\) is the predicted value, and \(y_{\rm{r}}\) is the real value (\(y_{\rm{p}}\), \(y_{\rm{r}}\in[1,\) n\(]\)). \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Variable** & **Model** & **Clear Weather** & **Rain** & **Fog and Haze** & **Wind** \\ \hline \multirow{2}{*}{MSE} & CNN (Voting) & 0.3568 & 0.4332 & 0.4104 & 0.4144 \\ \cline{2-6}  & LSTM & 0.2084 & 0.248 & 0.28 & 0.2524 \\ \hline \multirow{2}{*}{RMSE} & CNN (Voting) & 0.5973 & 0.6582 & 0.6406 & 0.6437 \\ \cline{2-6}  & LSTM & 0.4565 & 0.4979 & 0.5291 & 0.5024 \\ \hline \multirow{2}{*}{MAPE} & CNN (Voting) & 35.68\% & 43.32\% & 41.04\% & 41.44\% \\ \cline{2-6}  & LSTM & 20.84\% & 24.80\% & 28.00\% & 25.24\% \\ \hline \hline \end{tabular}
\end{table} 
Table 3: MSE, RMSE and MAPE of models. In Table 3, the value of each variable of LSTM is better than that of CNN. The MSE and RMSE of LSTM are, on average, 38.8% and 21.82% lower than those of CNN, and the MAPE is on average 38.8% lower than that of CNN. These results indicate that the difference between the real values and the predicted values provided by LSTM is smaller and that the LSTM model has a more precise identification ability and can be assessed as a better model. A big problem for the neural-network-based identification method is its weak generality capability. This is because the networks are mostly trained with a fixed SNR, and they can only be applied to recognize the modulation formats with the corresponding SNRs [32]. However, due to the serious degradation suffered by terahertz wireless links in outdoor scenarios, the SNR of the identification stage is always varying, resulting in a different SNR level in the training stage. Besides, a degraded performance of neural networks at low SNR levels has been reported [33]. Thus, the efficiency of the identification method with neural works should be evaluated under different SNR levels. Table 4 shows averaged identification accuracy values at a low and a high SNR level. Here, we set the high level as 80 dB, because the identification accuracy can be upgraded to 100%. This value is difficult to achieve in reality, but we think it is still available when large power output, high-gain antenna and ultra-low noise amplifier are realized in future. With a high SNR level of 80 dB, the average identification accuracy of all three network algorithms increases, and it can be almost 100% for the LSTM network, which is much better than that of the CNN network. This means the LSTM can offer a better identification performance always, due to the advantages in its algorithm, as demonstrated above. By calculating the MSE, RMSE, and MAPE at 80 dB, it can be observed that the performance of both models has been improved at a high SNR. The LSTM model still has a stronger identified capability than CNN and can even be considered an excellent model.