# 6G Technology for Indoor Localization by Deep Learning with Attention Mechanism
## 4 Numerical Results  
This paper utilizes terahertz waves as the form foundation for the indoor communication system. The frequency is set from 120 GHz to 134 GHz for a sixth-generation communication system with 289 receiving antennas, which are from coordinates (1.0, 1.0, 1.0) m to (9.0, 9.0, 1.0) m, with a spacing of 0.5 m between each pair of points, evenly distributed throughout the entire laboratory. Figure 5a shows the floor plan of the actual simulation environment. Three transmitting antennas, each positioned at a height of 1 m, are located at Tx1 (9.5, 1.0, 1.0) m, Tx2 (0.5, 5.5, 1.0) m, and Tx3 (9.5, 9.0, 1.0) m, respectively, for positioning. Placing the transmission antenna in the corner is a deliberate arrangement. If it were positioned in the center of the indoor area, then naturally, all receiving antennas would receive the best transmission signals. By placing the antenna in the corner, we can determine whether the transmission signals received by receiving antennas in different  
Figure 4: CA module with several convolutional layers to extract channel-specific features and attention weights for enhanced feature representation. locations behave as expected. Specifically, in the peripheral corners, the greater distance or the transmission signals that have undergone more reflected waves result in a larger RMSE (Root Mean Square Error) for the receiving antennas. There is one wooden bookcase and one metallic bookcase on the right and upper side of the room. There are also three wooden tables positioned in the middle and lower sections. The heights of the bookcase and the table are 2 m and 0.7 m, respectively. Figure 5b illustrates the layout of the 289 (17 \(\times\) 17) receiving antennas within a 10 \(\times\) 10 m environment. Each red dot represents a receiving antenna (Rx), evenly spaced with a 0.5 m interval. All Rx antennas are positioned at a uniform height of 1 m. This layout ensures comprehensive coverage for capturing signal data across the laboratory space. To simulate real-world conditions, we introduced 10%, 15%, and 20% three different noise levels into the environment. Given the variability of noise in real-world scenarios, we have measured the CSI 200 times for each receiver at each noise level, resulting in a dataset of 57,800 (289 \(\times\) 200) CSI samples. The dataset was then split, with 80% allocated for training and 20% for testing. We trained the CNN model using the ADAM optimizer with the following training parameters: a learning rate ranging from 10\({}^{-4}\) to 10\({}^{-5}\), a minibatch size of 32, and 40 epochs. The positioning system is tested by three different configurations: CNN (baseline), CNN with SA, and CNN with CA. The performance of the algorithms is evaluated using the Root Mean Square Error (RMSE) metric as follows:  
\[RMSE=\frac{1}{n}\sum_{i=1}^{n}\sqrt{\left(X_{\text{true,i}}-X_{\text{pred,i}} \right)^{2}+\left(Y_{\text{true,i}}-Y_{\text{pred,i}}\right)^{2}} \tag{3}\]  
where \(N_{t}\) is the total number of test points. RMSE values for three different algorithms under four different scenarios with 10% noise are provided in Table 1.  
There are four transmitter scenarios. Three Txs denote three transmitters with all Line-of-Sight (LOS) waves. Block Tx1 represents a scenario for NLOS waves with a blocked wooden board at Tx1, while Tx2 and Tx3 are LOS waves. A wooden board with dimensions 2 \(\times\) 0.2 \(\times\) 1.5 m (length \(\times\) thickness \(\times\) height) is placed in front of Tx1 at a distance of 0.1 m. Similarly, Block Tx2 is a scenario with a blocked wooden board at Tx2, while Tx1 and Tx3 are LOS waves. A wooden board with dimensions 2 \(\times\) 0.2 \(\times\) 1.5 m (length \(\times\) thickness \(\times\) height) is placed in front of Tx2 at a distance of 0.1 m. Block Tx3 denotes a scenario with a blocked wooden board at Tx3, while Tx2 and Tx3 are LOS waves. Figure 5: Floor plan of simulation environment: (**a**) two bookcases, three tables, and three transmitting antennas.