# Radar Emitter Structure Inversion Method Based on Metric and Deep Learning
## 4 Res Inversion Method
### RES Inversion Method  
The flow chart of the RES inversion method is shown in Figure 8, and the overall process of RES modeling and RES conversion can be observed in the figure, which shows the training process of the AE network and AEM network, as well as the testing process of the AEM network. The specific steps are summarized as follows.  
1. Building datasets: Modeling training dataset: yhe three classes of RES modeled above are used to generate the training dataset under hetero-mode operating parameters, and corresponding labels are added; Ideal training dataset: yhe ideal training dataset is generated based on the operating parameters of the modeling training dataset; Test datasets: using the three classes of RES models, closed-set test datasets and open-set test datasets are generated.
2. Data preprocessing: In-phase/quadrature (I/Q) data are extracted from complex RF signals, and they are concatenated for normalization. The sampling rate is set to \(f_{s}=1\) GHz, and the pulse width is \(T=10^{-6}\) s; thus, the number of complex RF signal sampling points is 1000. Therefore, the number of input nodes is \(1000\times 2=2000\).
3. Training stage: The specific training process of the network is described as follows: 1. AE network: The ideal training dataset is used as input to the AE network. Both the setup feature encoder and the reconstruction decoder have two hidden layers. The number of output nodes of the feature encoder is set to 50; thus, the number of nodes of each layer of the feature encoder is 2000-600-150-50. The number of nodes in each layer of the reconstruction decoder is 50-150-600-2000. The objective function \(J_{AE}(\{\theta_{e},\theta_{d}\})\) is used to train the AE network. The adaptive moment estimation (Adam) optimizer is used for network training. The learning rate is set to 0.0001, and the batch size is set to 60. The network parameters are selected and determined empirically after many experiments; the parameters \(\theta_{e},\theta_{d}\) of the feature encoder and the reconstruction decoder are obtained, and the trained feature encoder is saved. AEM network: The modeling training dataset and corresponding labels are used as inputs to the AEM network. Each of the setup feature encoder, the reconstruction decoder, and the metric scorer contain two hidden layers. The number of feature encoder output nodes is set to 50. The number of nodes in each layer of the feature encoder is 2000-600-150-50, while the number of nodes is 50-150-600-2000 for each layer of the reconstruction decoder, and 100-50-20-1 is observed for each layer of the metric scorer. The objective  
Figure 8: Flowchart of the RES inversion method.  
function \(J_{AEM}(\{\theta_{e},\theta_{d},\theta_{s}\})\) is used along with the Adam optimizer to train the AEM network. The learning rate was set to 0.0001 and the batch size was set to \(3\times 20\), i.e., a batch contains three classes of RES with 20 samples per class. The network parameters are selected and determined empirically after many experiments. The parameters \(\theta_{e},\theta_{d},\theta_{s}\) of the feature encoder, the reconstruction decoder, and the metric scorer were obtained, and the trained feature encoder and metric scorer were saved. 3. Centroid database: In the last epoch, the centroid of each class of deep RF structure features calculated by each batch is saved and averaged to generate a centroid database, which is used as the centroid of deep RF structure features in the test phase. 4. Test stage: The network is tested using the test dataset. First, the test data are input into the feature encoder of the AEM network to extract the deep RF structure features. For each class in the centroid database, class centroids are then combined together and input into the metric scorer to calculate the similarity score. The maximum matching score corresponds to the class of RES, and the RES inversion is therefore realized.