Skip to content

MATLAB scripts that send and receive RF waveform signal samples for the sake of augmenting RF Machine Learning datasets with RF hardware characteristics. Requires the

License

Notifications You must be signed in to change notification settings

alackpour/RF-dataset-collection-MATLAB-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RF-dataset-collection-MATLAB-scripts

MATLAB scripts that send and receive RF waveform signal samples for the sake of augmenting RF Machine Learning datasets with RF hardware characteristics. Requires the use of the Mathworks "USRP Support from Communications" Toolbox to control certain Ettus USRP SDRs.

How to use these scripts

To create an appropriately structured RF waveform dataset to send and receive, first, obtain the source code available from NIST at the following Github repo: https://github.com/usnistgov/SimulatedRadarWaveformGenerator

Then, use the instructions in the NIST waveform generator repo to create at least one dataset MATLAB workspace file where simulated additive white Gaussian distributed noise is added to the radar waveform pulse samples. I found it was useful to limit the size of the batch dataset to 200 samples of 80ms per sample. I also configured the radar waveform generator to randomly create 1/2 of the 200 files without any radar present. This is required to train, validate, and test where a radar detector model can learn how to recognize the absence of a radar form.

After the dataset is created, make sure the sending and receiving USRPs are correctly connected to their host computers and start the send_USRP_data.m script first. Then, once that script is repeatedly sending the selected batch of 200 radar waveform samples, then start the receive_USRP_data.m script and hopefully it will confirm that it has correctly received an entire batch of concatenated radar waveform samples. In the case that the receive script announces that it cannot find a complete set, you can investigate what it is finding by changing the waveform plotting flags at the end of the script. Be aware that enabling plotting can be slow and RAM intensive because there are many samples being plotted. It is also possible that the particular run of the receive script did not correctly receive the batch of waveform samples or a buffer overflow occurred at the receiver and the data is corrupted. I found experimentally that the best solution is to quit all background applications, close all of the plot windows, and try running the script again to see if the batch data can be received correctly.

send_USRP_data.m

MATLAB script that sends (transmits) the simulated radar plus noise waveforms
Step 1: load a single simulated waveform Matlab workspace generated by the NIST CBRS band radar waveform generator (see link below)
Step 2: Configure the USRP radio to send waveform sample data
Step 3: Preappend 80 ms of zero amplitude IQ samples to the beginning of the radar waveform buffer as a Tx sync signal
Step 4: Plot the time domain magnitude of the IQ samples that were sent
Step 5: Enter loop to repeatedly send each of the waveform samples in the radar waveform dataset

This script was tested with MATLAB 2019b
Software was originally design and tested on a Dell Latitude 7440 running Ubuntu Linux 16.04 (i5-4300U Dual Core, 1.9 GHz, 16GB RAM) get Tested with a USRP-N210 with Daughter Board: 'SBXv3 RX'

receive_USRP_data.m

MATLAB script that sends (transmits) the simulated radar plus noise waveforms
Step 1: load a single simulated waveform Matlab workspace generated by the NIST CBRS band radar waveform generator (see link below)
Step 2: Configure the USRP radio to receive waveform sample data
Step 3: Enter loop to receive a finite number of large USRP IQ sample buffers and store them in an array
Step 4: Find and extract the first complete transmitted dataset in the received waveform vector
Step 5: Plot magnitude of time domain IQ samples for basic data quality checking

This script was tested with MATLAB 2020a on a home build PC running Ubuntu Linux 18.04 (i7-920 Quad Core, 2.67 GHz, 24GB RAM, 1TB HDD)
Tested with a USRP-N210 with Daughter Board: 'SBXv3 RX'
Note: because of the relatively high processing requirements for this script, I've found that it works best by first closing all other MATLAB plot windows before running the script from the start. Otherwise, I get overflows that corrupt the data samples. Also, disable any other applications or background processes that could reduce MATLAB performance.

Author Info: Alex Lackpour, alackpour@gmail.com
Date: April 5th, 2021
Version: 1.0, public release

About

MATLAB scripts that send and receive RF waveform signal samples for the sake of augmenting RF Machine Learning datasets with RF hardware characteristics. Requires the

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages