Deep Learning Based Antenna Selection for MIMO SDR System †

In this paper, we propose and implement a novel framework of deep learning based antenna selection (DLBAS)-aided multiple-input–multiple-output (MIMO) software defined radio (SDR) system. The system is constructed with the following three steps: (1) a MIMO SDR communication platform is first constructed, which is capable of achieving uplink communication from users to the base station via time division duplex (TDD); (2) we use the deep neural network (DNN) from our previous work to construct a deep learning decision server to assist the MIMO SDR platform for making intelligent decision for antenna selection, which transforms the optimization-driven decision making method into a data-driven decision making method; and (3) we set up the deep learning decision server as a multithreading server to improve the resource utilization ratio. To evaluate the performance of the DLBAS-aided MIMO SDR system, a norm-based antenna selection (NBAS) scheme is selected for comparison. The results show that the proposed DLBAS scheme performed equally to the NBAS scheme in real-time and out-performed the MIMO system without AS with up to 53% improvement on average channel capacity gain.


Introduction
Massive multiple-input-multiple-output (MIMO), which is one of the most promising techniques in the 5G as well as the coming 6G wireless communication [1][2][3], shows its superiority in terms of Rayleigh-fading resistance, high channel capacity, considerable spectral efficiency, etc. In recent year, there have been more and more theoretical studies on massive MIMO systems (e.g., [4][5][6]). However, multiple radio frequency (RF) chains, which are linked with the same number of antennas, are equipped in the conventional MIMO systems, which leads to high hardware costs and power consumption. In particular, there are usually hundreds of RF chains equipped in massive MU-MIMO systems, while the number of RF chains in practical systems is often limited. As a remedy, antenna selection (AS) techniques are capable of retaining MIMO advantages, while achieving low system complexity and of different users. These cases have enlightening significance for us to apply DL in SDR to solve problems in communication systems.
To the best of our knowledge, most studies on AI communications only stay at the level of theoretical research, and few of theoretical investigations are capable of achieving hardware implementation. In this paper, we propose and implement a novel DL-based antenna selection (DLBAS)-aided MIMO SDR communication system. More specifically, we separate an arithmetic unit from the MIMO SDR communication platform and build an AI decision server which uses the DNN model proposed from our previous work [24], aggregating a well-trained ML/DL model. The AI decision server applies the multithreading mechanism, which is capable of accelerating the response speed, and adopts TCP for data interaction with MIMO SDR platform, which ensures reliable data delivery.
The rest of this paper is organized as follows. Section 2 proposes the DLBAS-aided MIMO SDR communication system. In Section 3, the performance of DLBAS-aided MIMO SDR communication system is analyzed. The conclusions are given in Section 4.

The Implementation of DLBAS-Aided MIMO SDR System
In this paper, we propose a novel structure of DLBAS-aided MIMO SDR system, and its block diagram is depicted in Figure 1. The base station (BS) and the user parts in Figure 1 are used the basic structure of AS-aided MIMO system from [22,23], which are built by 8 × 2 AS-aided MIMO system based on NI USRP-RIO SDR platform comprising an eight-antenna BS and two single-antenna users. However, the BS in Figure 1 is modified to work with the deep learning decision server. In the downlink, after the channel estimation in the BS, the channel state information (CSI) is uploaded to the deep learning decision server, which is running on a PC to make intelligent selection for AS.

TCP Socket
Wireless Channel The structure of DLBAS-aided MIMO SDR system is shown in Figure 2. The Control Subsystem and DLBAS Actuator are running on the BS HOST. Specifically, the Control Subsystem, which consists of Modules Status Monitor, DLBAS Parameters Configuration Controller, and Performance Displayer, is used to input system parameter and display the system performance. More specifically, DLBAS Parameters Configuration Controller firstly receives the input settings from users, i.e, the number of selected antennas, the internet protocol (IP) address, and the port of Deep Learning Decision Server, which would be transmitted to the DLBAS Actuator. Moreover, during the system functioning, the Modules Status Monitor can record the working status of each module of the system, such as the status of USRP-RIOs and their antennas, and then the recorded information will be displayed by the Performance Displayer, which is helpful to check whether the various modules of the system are working properly. According to these information, DLBAS Actuator connects the DL decision server at the period of system initialization. During the system functioning, the channel state will be estimated in the BS by the channel simulation model [22], and the DLBAS Actuator uploads the estimated CSI towards DL decision server, which is introduced in Section 2.1, and receives the intelligent decision result from DL Decision Server via TCP Connector. Note that the type of estimated CSI is float, and the Float to Int Convertor is to transform the float value into integer value by IEEE 754 standard.

Base Station User
The FPGA Control Subsystem is running on the FPGA of each USRP-RIO. The DLBAS Actuator transmits the AS enable signals, which are updated according to the decision result received from DL decision server, to the FPGA Control Subsystem via panel (FP) transmission, which is the module used to control FPGA variables in HOST module in LabVIEW. Then, each FPGA Control Subsystem can control the data links of their USRP-RIO based on the received enable signals. The method for data link control is to regulate the data output in first-input-first-output (FIFO). More specifically, in each USRP-RIO, the data links of selected antennas stay connected, while those of unselected antennas are cut off. Data in disconnected antenna data links need to keep forward to prevent blocking the FIFO.
A deep learning algorithm is adopted to build a predictive model functioning in the Deep Learning Decision Server to make intelligent decision. The following subsections describe the details of implementing the DLBAS scheme.

The Structure of Deep Learning Decision Server
Based on the structure of DLBAS-aided MIMO SDR system mentioned above, we design a DL decision server to assist the SDR platform for making intelligent decision, implying that the data-driven decision making method takes place in the optimization-driven decision making method. The top part of Figure 2 depicts the block diagram of DL decision server. In Figure 2, it is obvious that the DL decision server consists of three parts: Data Communication module, Logic/Data Processing module, and Deep Learning Decision module. The detail information of each module is as follows.

Deep Learning Decision Module
During the system functioning, a huge amount of data on historical scenarios may have been acquired and stored at the HOST. Many optimal or near-optimal solutions are exploited to deal with these data as the computing capability of the computer becoming stronger. By extracting the feature in these historical scenarios data, the DL decision module can be forwarded to guide BS how to make decision for antenna selection in MIMO communication system.
The process of DL decision module is shown in Figure 3. At the MIMO SDR platform, many historical data are acquired. To construct the dataset, at first, as data preprocessing, feature selection is carried out to identify and remove some irrelevant attributes of historical data. Through feature selection, some key attributes are selected and presented as a feature vector. This will improve the quality of the dataset and enable the machine learning process to function more effectively.
Further, a label is needed for each feature vector because a supervised learning algorithm in machine learning is adopted. More specifically, optimal or near-optimal solutions will be adopted to find the label of each feature vector. Therefore, the feature vector with the same solutions belongs to one class and as many data as possible of each class will be collected. To build the machine learning model, all samples in the dataset are split randomly into training and testing datasets. Normally, 70-90% of the samples are assigned into the training dataset, and the other samples are assigned into the testing dataset. The training set is used to build a machine learning model and the testing dataset is used to evaluate the model. Through model optimization, a predictive model can be built which will be used to make decision for new data. More specifically, with the aid of machine learning model, a high performance solution of future real-time scenarios can be searched offline and can give a decision in time. All the real-time scenarios are transformed into a mathematical multi-class classification problem and the predictive model will predict one class for one new feature vector. The classifier can be described as where F T is the new feature vector extracted from the new data, and l is the output class index showing that the new data belongs to the lth class.  Although computing resources are consumed to build a predictive model, the computing work can be carried out offline. Moreover, the new feature vector will be collected and forwarded to update the dataset, which is very important for tracing the evolution of real scenarios, including user behaviors and wireless propagation environment. The dataset can be used to develop the machine learning model and all this work can also be accomplished during the off-peak time.

Logic/Data Processing Module
The Logic/Data Processing Module is used as a bridge between the Data Communication Module and Deep Learning Decision Module. First, the Logic/Data Processing Module is capable of undoing the header of information to extract the payload in the received information. Then, the payload is sent as input of the Deep Learning Decision Module for intelligent decision output.
Second, to improve the resource utilization ratio of DL decision server, we set up the DL decision server as a multithreading server, which is asynchronous event-driven. Therefore, the Logic/Data Processing Module needs to cope with the communication logic between different threads, as shown in Figure 4. More specifically, the Logic/Data Processing Module manages a container, which saves the state of event drivers and the decision result. Firstly, the module initializes its state. Then, the main thread in the Logic/Data Processing Module selects one assistance thread corresponding to the active event driver. The selected thread may generate new DL decision, modify the state of the decision result in the container, and kill itself at last. Finally, the main thread reads the decision saved in the container and transmits the result to Data Communication Module.

State Initialization
Output the decision

Data Communication Module
Data Communication Module is responsible for connecting DL decision server with the MIMO SDR platform via transmission control protocol (TCP).
The process of TCP connection between the MIMO SDR platform and DL decision server is depicted in Figure 5. Owing to TCP's advantages of connection-oriented property and ordered transmission, the DL decision server can achieve reliable data communication with less overhead. In the period of system initialization, the DL decision server listens for MIMO SDR platform access, which is a client/server model. Once MIMO SDR platform sends its request for access, it would establish a connection with DL decision server through TCP three-way handshake protocol. Then, the MIMO SDR platform can transmit some communication data towards Data Communication module in DL decision server, as shown in Figure 2, while the decision result at DL decision server would be sent to the MIMO SDR platform via Data Communication module.

ACK Communication information
Decision result

Connection Establish
Information Transport Figure 5. The process of TCP connection between the MIMO SDR platform and DL decision server.

The Design of Dataset and Neural Network for Antenna Selection
We considered different machine learning methods for AS, such as deep neural network (DNN), K-nearest neighbors (KNN), and eXtreme Gradient Boosting (XGBoost) algorithm, and the results demonstrate that DNN has better performance on AS [24]. Therefore, we adopt DNN to construct the classification model for MIMO antenna selection. The implementation process of DNN for AS in the SDR MIMO platform is introduced in the following subsections.

The Generation of Dataset
To construct neural network classification model, the dataset is firstly obtained, which consists of CSI samples and labels from MIMO SDR system. Then system trains the DNN using the obtained dataset. Due to the limitation of our MIMO SDR hardware setup, the current measured dataset only supports a maximum of eight antennas in the base station with two single-antenna users. In this way, when new CSI comes in, by using the trained DNN classification model, we obtain the optimal antenna subset which can achieve better channel capacity.
Let C denote the field of complex numbers. Firstly, we obtain the estimated CSI H ∈ C N×M from MIMO SDR platform, which can be expressed as where h ij denotes the (i, j)th complex value element of H and N and M stand for the number of receive antennas and transmit antennas, respectively. Then, by exploiting the estimated CSI as sample data, we use the optimal or near-optimal result of norm-based antenna selection (NBAS) algorithm described in [22] as the corresponding label. In DNN-based systems, the training dataset is required to be real-valued numbers, while the MIMO channels are complex-valued. In this case, the steps of dataset acquisition are summarized in Algorithm 1: Convert the estimated CSI matrix H to a real-value vector h ∈ R 1×N M as h = [|h 11 |, |h 12 |, · · · , |h 1M |, |h 21 |, |h 22 |, · · · , |h 2M |, · · · , |h N M |]. 3: Obtain the optimal antenna subset by NBAS. The antenna subset is replaced by the label l ∈ [l 1 , l 2 , · · · , l s ], where s = ( N N s ) and N s denotes the number of selected receive antennas.

4:
Convert the label l to one-hot vector z. 5: until All samples are generated

The Design of Neural Network
In the DNN module, we opt for using the fully connected neural network to select the optimal antenna subset, of which the corresponding DNN model refers to and improves the method in [24], and it is shown in Figure 6. It can be seen that the self-designed DNN model consists of an input layer, two hidden layers, and an output layer [25]. The input layer is an input vector h j = [h 1 , · · · , h N M ] with 1 × N M representing the processed real-valued CSI according to Equation (3). Each hidden layer has 500 nodes and more hidden layers will make the model more complicated. W i is the weighting matrix and its dimension jointly depends on the number of nodes of (i − 1)th layer and ith layer. a ij corresponds to the ith layer output vector, and we usually employ rectified linear unit (ReLU), of which the form is as the nonlinear activation function. The output vector of the jth sample in the output layer can be expressed asẑ For example, the output vector of the lth class of antenna subset iŝ In the phase of neural network training, real-valued matrix X and corresponding one-hot label matrix Z are input to the network. For each training sample input, we have a s-dimension vectorẑ as the output. With using K 1 training samples, stochastic gradient descent algorithm will be employed to optimize the cross-entropy loss function between true label z and predicted labelẑ. The corresponding loss function is formulated as Additionally, to further optimize the DNN model used in the proposed AS-aided MIMO system, L 2 regularization technique is utilized in the loss function to avoid overfitting and the moving average model is invoked to make the final model more robust.

The Implementation of Deep Learning Decision Server
As mentioned in Section 2.1, the DL decision server is a multithreading server based on asynchronous event-driven, implying that a multithreading model can achieve the mechanism of event-driven in DL decision server. As mentioned in Section 2.1.2, the Logic/Data Processing module in DL decision server manages a container. This container, as illustrated in Table 1, includes two control signals as event drivers, "IFCALCULATE" and "ISRESULT", which are both initialized as f alse, and a memory to save the decision result. In the DL decision server, the main thread always connects to SDR platform via TCP and the control signals in the container are used to control the execution of assistance thread to update the decision result in the memory of the container. Table 1. The content of the container in DL decision server.

IFCALCULATE boolean ISRESULT boolean Decision Result integer
The logic of the DL decision server in our implemented system is shown in Figure 7. More specifically, when the connection between the DL decision server and SDR platform has been established, the main thread would firstly check the state of the control signal "IFCALCULATE" in the container. If "IFCALCULATE" is False, the DL decision server would create one assistance thread to input CSI from SDR platform into DNN model and update the state of decision result and control signal "ISRESULT" in the container. The DL decision server continues to check the state of the control signal "ISRESULT" when "IFCALCULATE" is True. If "ISRESULT" is False, the DL decision server directly outputs the decision result in the container. The DL decision server outputs the updated decision result and sets "ISRESULT" to False to create an assistance thread when "ISRESULT" is True.  Figure 7. The logic of the DL decision server in DLBAS-aided MIMO SDR system.

Experiment Results and Analysis
In this section, our experiments are based on the constructed DLBAS-aided MIMO-OFDM SDR communication system shown in Figure 2 and described in Section 2, where an eight-antenna BS and a single-antenna user are employed. The MIMO SDR system equipped with N receive antennas, as well as required Ns selected receive antennas, is denoted by (N/Ns). To illustrate the channel capacity performance of DLBAS-aided MIMO systems, a NBAS-aided MIMO system and a no AS MIMO system, as reported in [22], are considered in this section for comparison. Moreover, the prediction precision performance of our designed DNN is also analyzed in our experiments.

The Performance of DNN Model
The test accuracy during the training of the designed DNN model for antenna selection is shown in Figure 8. It can be seen that the test performances keep growing in Figure 8 with the increasing of training epoch and it will be remain stable at about 0.89 in later training periods. Moreover, as shown in Figure 8, the test accuracy is about to reach fit at Epoch 2, which means that the data-fitting speed of the designed DNN is very fast.
The computational complexity of our DNN model is compared with other AS schemes in [24]. For further implementation in Massive MIMO communication system, we consider the prediction time complexity of the network [26]; the computational complexity of the DNN model may be presented as

Results of DLBAS
In different SNR environments with perfect CSI, the comparison of real-time channel capacities of three kinds of algorithm, DLBAS, NBAS, and no AS, during the system functioning is depicted in Figure 9. Figure 9a shows the capacities of these three algorithms when N = 8, N s = 2, while Figure 9b displays that of the three algorithms when N = 8, N s = 4. In Figure 9, the proposed DLBAS algorithm approaches the NBAS algorithm and outperforms no AS, implying that the DLBAS has almost the same channel capacity performance as NBAS. More specifically, in Figure 9a, the channel capacities of (8/2) DLBAS-aided MIMO SDR system and (8/2) NBAS-aided MIMO SDR system are both 9 bits/s/Hz at the 19,780th ms, while the capacity of (2/2) no AS-aided MIMO SDR system is around 7.5 bit/s/Hz, which shows about 1.5 bits/s/Hz performance gain. Moreover, in Figure 9b, the channel capacities of (8/4) DLBAS-aided MIMO SDR system and (8/4) NBAS-aided MIMO SDR system agree in 10 bits/s/Hz at the 18,860th ms, when the capacity of (4/4) no AS-aided MIMO SDR system is around 8 bits/s/Hz, which attains 2 bits/s/Hz performance gain. Moreover, Figure 9 reveals that DLBAS is capable of choosing the best antenna selection choice at most of the time. Therefore, the experimental results in Figure 9a,b demonstrate that the proposed DLBAS scheme performed equally to the NBAS scheme in different SNR environment, implying the correctness of our DLBAS scheme.
In our experiments, SNR can be adjusted by changing the direction of antennas or adding obstacles in the wireless communication environment in order to add noise to plot the measured channel capacity vs. SNR curves. The achievable capacity performances recorded for the (8/2) DLBAS-aided MIMO SDR system, (8/2) NBAS-aided MIMO SDR system, and (2/2) no AS-aided MIMO SDR system in measurement are shown in Figure 10. It is obvious that the channel capacity results of (8/2) DLBAS-aided MIMO SDR system and (8/2) NBAS-aided MIMO SDR system are better than (2/2) no AS-aided MIMO SDR system across SNR from 0 to 20 dB, and the average channel capacity gain is about 59%, as shown in Figure 10. More specifically, when SNR = 20 dB, the measured capacities of (8/2) DLBAS-aided MIMO SDR system and (8/2) NBAS-aided MIMO SDR system are both around 4.2bits/s/Hz and that of (2/2) no AS-aided MIMO SDR system is 2.6 bits/s/Hz, which shows 61% channel capacity gain. Moreover, Figure 11 depicts the channel capacity vs. SNR curves comparison among (8/4) DLBAS-aided MIMO SDR system, (8/4) NBAS-aided MIMO SDR system, and (4/4) no AS-aided MIMO SDR system to further prove the same trend of channel capacity gain in measurement. Specifically, the measured channel capacity results of (8/4) DLBAS-aided MIMO SDR system is better than (4/4) no AS-aided MIMO SDR system across SNR from 0 to 20 dB, and the average channel capacity gain is about 53%. Meanwhile, when SNR = 10 dB, the measured capacity of (8/4) DLBAS-aided MIMO SDR system is around 1.5 bits/s/Hz and that of (4/4) no AS-aided MIMO SDR system is 0.9 bits/s/Hz, which shows 70% channel capacity gain.    However, compared with Figure 10, Figure 11 shows that the measured capacity from (8/4) NBAS-aided MIMO SDR system is slightly higher than (8/4) DLBAS-aided MIMO SDR system; for example, the measured capacity at SNR = 16 dB of (8/4) NBAS-aided MIMO SDR system in Figure 11 is about 0.2 bps/Hz higher than (8/4) DLBAS-aided MIMO SDR system in Figure 11 because the (8/4) DLBAS-aided MIMO SDR system needs more classes than (8/2) DLBAS-aided MIMO SDR system in the DNN classification model, which results in a decrease in the test accuracy. Overall, the results of the NBAS-aided MIMO SDR system and DLBAS-aided MIMO SDR system in Figure 11 are still close.

Conclusions
In this paper, a DLBAS-aided MIMO SDR system is designed and implemented. By adopting the simple yet efficient concept of DL decision server in the MIMO SDR platform, all the real-time scenarios are transformed into a mathematical multiclass classification problem. Via TCP transmission, all the AS decision work can be done online with very low latency. The experimental results verified that the DLBAS-aided MIMO SDR system is capable of achieving near-optimal capacity performance of NBAS-aided MIMO SDR platform, which shows great improvements compared to the MIMO SDR platform without AS, and the average channel capacity gain exceeds 53%. This novel implementation of DLBAS-aided MIMO SDR system will provide practical verification environment for new design and evolution of other new AS algorithms in the MIMO communication system. Our future work is to apply this implementation framework to a real massive MIMO system, which will require more USRPs to support at least 32 antennas in the base station and also more user nodes. To keep the accuracy of the antenna selection result, the DNN model shown in Figure 6 may need to add more layers and more nodes in each layer. This will require more measured datasets and increased training time of the DNN model, but, according to Equation (8), the runtime of generating AS decision will increase slightly.