# Deep-Learning-Based Stream-Sensing Method for Detecting Asynchronous Multiple Signals
## 5 Learning-Based Asynchronous Stream Sensing
### Training Methodology
#### 5.4.2 Training Framework  
To train our ASensNet, we developed a training framework that combines MATLAB and PyTorch. The input data \(\mathbf{I}_{\text{R}}\) and \(\mathbf{I}_{\text{I}}\) vary according to the wireless channel between a rescue UAV and mobile devices. In practice, the wireless channel is changed quickly and is infinitely diverse. Hence, it is impossible to collect adequately correlated dataset for all channel cases in advance. In other words, it is not easy to create an unbiased channel dataset. For this work, it is inappropriate to use the typical way of learning with a precollected dataset. Algorithm 2 shows our training architecture. Our training framework generates input data in real time, and then updates our ASensNet. The MATLAB-based generator generates \(N_{\text{data}}\) received signals by asynchronously transmitting rescue signals. Using the MATLAB Engine API for Python [43], the generated data are sent to a PyTorch-based learning function. Then, the PyTorch-based learning function updates the ASensNet with the generated data. As a result, with our framework, the ASensNet is continuously updated with various input data. Note that generated channels are realistic by considering large-scale fading, small-scale fading with multiple channel taps, and various mobile device distributions. The realistic elements create an infinite number of channel cases. Therefore, this training approach does not incur an overfitting problem. The problem occurs when a deep-learning network is trained with a limited amount of data. That is, the deep learning network is biased towards the given data. However, our training approach is to train the ASensNet with infinitely changing channel data. In other words, the proposed network can be trained with an unbiased channel dataset. The MATLAB-based generator randomly deploys \(N_{\text{device}}\) mobile devices around a rescue UAV. The UAV is equipped with ten antennas (\(N_{\text{R}}=10\)), while mobile devices have a single antenna. Mobile devices start their transmission asynchronously. For the outdoor wireless channel between the UAV and mobile devices, the ITU RMa pathloss model [35] is implemented as large-scale fading, and five multipath taps are used for small-scale fading. The transmit power of an UAV and a device is set to 36 dBm, complying with the regulation [36]. Finally, the altitude of the UAV is assumed to be 25 m. For a channel impulse response, each channel tap from the first to last one exponentially decreases in magnitude. For time-varying channels, all channel impulse responses change every time \(N_{\text{device}}\) is determined. For time-varying channels, all channel impulse responses change whenever \(N_{\text{device}}\) is changed. With various \(N_{\text{device}}\in[0,9]\), the deployment of mobile devices changes with the change in impulse responses. Mobile devices are randomly deployed around a rescue UAV, and the SNRs of the signals transmitted from the mobile devices are different. Note that at the UAV, the difference in arrival time between the earliest signal and each of the other signals is actually determined randomly within \([0,T_{\text{sym}})\). In reality, the SNR value is not necessarily proportional to the distance between the receiver and transmitter. Even if the distance is short, the SNR value may be small depending on the surrounding environment of both the transmitter and receiver. Hence, the difference in arrival time of the signals is randomly selected regardless of SNR values, from which wecan believe that our evaluation can cover all possible situations in the real world. Finally, \(N_{\text{FFT}}=64\), \(N_{\text{sym}}=20\), and \(T_{\text{CP}}=0.2\) usec. ```
Initialization (1) Start running MATLAB and Python. (2) Determine \(N_{\text{data}}\). (3) Go to 'MATLAB-based Generator'. procedureMATLAB-based Generator (1) Start collecting \(N_{\text{data}}\) input data. for\(k\gets 1\) to \(N_{\text{data}}\)do - Select \(N_{\text{device}}\) within \([0,N_{\text{R}}-1]\).