# Near-Field-Based 5G Sub-6 GHz Array Antenna Diagnosis Using Transfer Learning
## 2 Research Method
### Preparation of training  
As mentioned earlier, the classification layer of the pre-trained network is modified according to the purpose of the user and used as transfer learning. Table 1 shows the structure of Alexnet implemented in MATLAB. Alexnet consists of five convolutional layers and three fully connected layers. In five convolution layers, feature maps are extracted with the filter kernel and activated with the ReLU function. Through intermediate normalization, max pooling, etc., a \(6\times 6\times 256\) feature map is finally obtained. Then, two fully connected layers convert the \(6\times 6\times 256\) feature map into a one-dimensional form and connect it to 4096 neurons. This is the step of feature extraction from Alexnet. Only subsequent layers are modified to suit the purpose. The user changes the number of neurons in the third fully connected layer (layer 23 in Table 1), which consists of 1000 neurons, and also modifies the output layer (layer 25 in Table 1) to the corresponding class. If the specific port failure diagnosis of Section 3.2 described later is applied, layer 23 is modified to a fully connected layer composed of 17 neurons, and layer 25 is modified to corresponding classes such as pass, port 1 failure, etc. Figure 1: Concept diagram of transfer learning. As input data, near-field data are required. However, it takes considerable time and financial resources to obtain more than thousands of sample data by measurements; thus, it is practically impossible to obtain sample data. Therefore, a realistic method is to obtain the sample data required for training from simulation, instead of measurements. In this study, near-field data based on the change in the excitation signal were used through a combination of post-processing results of the CST microwave studio (MWS). This allows collecting near-field data of an array antenna within a few seconds by a simple post-processing as well as reduces the time and cost for obtaining a sample database. The sample database was secured by linking MATLAB and CST MWS [16]. The labeling of the input data was implemented in MATLAB, and the near-field data were calculated through a combination of post-processing results after applying an excitation signal in CST MWS corresponding to the labeling. After re-importing the calculated near-field data in MATLAB, the sample data were obtained by adding the above data to the database. Near-field data were extracted from the CST MWS environment, as shown in Figure 2. A \(4\times 4\) patch array antenna with radiating elements arranged at \(0.5\lambda\) intervals was used as the antenna under test (AUT), and the operating frequency of the array antenna was 3.55 GHz in the 5G sub-6 GHz band. The area surrounding the array antenna at a distance of \(1\lambda\) (84.5 mm) was extracted at a distance of \(3\lambda\) (243.5 mm) above the array antenna. The total area was \(330\times 330\) mm\({}^{2}\), and the interval between the sample points was set as 10 mm. The total number of sample points extracted was \(34\times 34\). The data were extracted from a computer environment with Intel i5-9400F CPU and 16 GB RAM, and approximately 9.2 s was required for each datum.