# Generalization Investigation for Artificial Intelligence-Based Positioning in IIoT
## 4 Evaluation Set Up
### AI Model Construction and Model Training  
In pre-tests, we evaluated several different well-known deep learning architectures such as GoogLeNet, DenseNet, and ResNet. As shown in Figure 6, it turned out that the ResNet provides higher positioning accuracy. ResNet is a feedforward neural network that employs residual mapping and has great performance on image feature extraction. In ResNet, the processing is not purely layer by layer. The processing of certain layers would be skipped to weaken the strong correlation between each layer, which is called a shortcut connection. Benefitting from its residual framework, ResNet solves the vanishing gradient and explosion problems that occur with the superposition of convolutional layers and pooling layers in deep network structures. Our algorithm refers to the 34-layer ResNet structure in [31], basically composed of 3, 4, 6, and 3 residual modules (building blocks as \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Value** \\ \hline Carrier frequency, GHz & 3.5 GHz \\ \hline Bandwidth, MHz & 100 MHz \\ \hline Subcarrier spacing, kHz & 30 kHz for 100 MHz \\ \hline Channel model & InF-DH \\ \hline \multirow{3}{*}{Layout} & Hall size & 120 \(\times\) 60 m \\ \cline{2-3}  & Room height & 10 m \\ \cline{2-3}  & Number of floors & 1 \\ \hline Total gNB TX power, dBm & 24 dBm \\ \hline \multirow{2}{*}{gNB antenna configuration} & (M, N, P, Mg, Ng) = (4, 4, 2, 1, \\  & 1), dH = dV = 0.5 \(\lambda\) \\ \hline gNB antenna radiation pattern & Single sector \\ \hline gNB antenna height & 8 m \\ \hline Penetration loss & 0 dB \\ \hline \multirow{2}{*}{UE antenna configuration} & Mg = 1, Ng = 1, P = 2, \\  & dH = 0.5 \(\lambda\), \\  & (M, N, P, Mg, Ng) = (1, 2, 2, 1, 1) \\ \hline \multirow{3}{*}{UE horizontal drop procedure} & Uniformly distributed over \\  & the convex hull of the \\  & horizontal BS deployment. \\ \hline UE antenna height & 1.5 m \\ \hline UE mobility & 3 km/h \\ \hline Min gNB-UE distance (2D), m & 0 m \\ \hline UE antenna radiation pattern & Omni, 0 dBi \\ \hline \multirow{2}{*}{Clutter parameters: \{density \(r\), height \(h_{c}\), size \(d_{cluster}\)} & High clutter density: \\  & \{40\%, 2 m, 2 m\} \\  & \{60\%, 6 m, 2 m\} \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameter setting for the data set generation. shown in different colors in Figure 7) with convolutions of 64, 128, 256, and 512 channels, respectively. We made the following changes to the ResNet architecture in order to facilitate our task:  
* In module conv1, we modify the convolutional layer to have a kernel size of 3 instead of 7 and a stride of 1 instead of 2. This is because the dimension of channel features of positioning data is \(18\times 256\) rather than \(224\times 224\) in [31] as input in the original model, so the size of the convolution kernel needs to be reduced. We set the stride to 1, and do not carry out downsampling in the first two layers so that the dimensions of the original input can be preserved. Additionally, the subsequent layers perform downsampling like the original model, which is conducive to extracting 18-dimensional BS information;
* In module conv2_x, we remove the max-pooling operation, and we set the convolutional layers to have a stride of 1 instead of 2. After module conv5_x, we replace the fully connected (FC) layer that has 1000 output units (before the classifier) with an FC layer of 2 units outputting a vector of positions (x, y) or 18 units for a vector of device ToAs. We further remove the SoftMax classifier. The detailed AI model structure is shown in Figure 7.  
The positioning problem to be solved is regression, not classification, so the loss function is set to mean squared error (MSE). For training, we deploy an adaptive moment estimation (Adam) optimizer. As for the learning rate, we test several candidate values including 0.005, 0.001, 0.0005, and 0.0001. We found learning rate of 0.001 could achieve a better balance between performance and converging rate.