1.) Experiment Overview
Experiment Definition and Goals: The user logs in remotely to open the N6841A Keysight Sensor Management Tool (SMT) and locate AERPAW tower LW1 and AERPAW UAVs using a Time-Difference of Arrival (TDOA) algorithm. The AERPAW tower LW1 is continuously transmitting a signal with a center frequency of 3.355 GHz and a bandwidth of 100 MHz. The software-defined radios (SDRs) on the AERPAW UAVs can be programmed to transmit a variety of signals for localization. The main goals of this experiment are to help participants develop a basic understanding of the TDOA localization process and learn how to effectively use the N6841 Keysight Sensor Management Tools and its extensions.
Experiment Requirements: It is assumed that the users have AnyDesk, Excel, and MATLAB software downloaded on their local device.
2.) AERPAW Tower LW1 Localization Experiment Overview
2.1) First, remotely connect to the AERPAW Windows device for accessing the RF sensors using AnyDesk. A link to the instructions is copied here.
2.2) Click on the Windows Icon in the bottom left corner of the Remote Desktop, open the Keysight RF Sensor folder, and open the SMT software.
2.3) Open the SMT software and make sure all 5 RF sensors are loaded into the SMT as shown below. If any of the sensors shown are missing, they can be manually added by clicking Tools -> Add Sensors... -> Add a sensor with a known host name or IP address -> and then manually adding the IP addresses listed under the column Sensor alias in the screenshot below for any missing sensors. After ensuring all 5 RF sensors are loaded, select the N6854A Geolocation View button, which is circled in red in the screenshot below. In the figure below, the sensor 192.168.21.16 has a red cube beside it. This means it is unavailable because a different user has remotely logged into it. When running your own experiments, make sure all sensors are available. If a sensor is unavailable, contact AERPAW Ops.
2.4) OPTIONAL: The default map in the SMT is large enough to show all 5 RF sensors, which encompasses the area from Centennial Campus to Lake Wheeler. If you'd prefer a larger or smaller map, the following instructions show you how to edit the map. If you are happy with the default map, you can continue on to step 2.5.
To choose a map for the SMT to display results upon, we will use OpenStreetMap which is linked here for your convenience. To export a map, choose export, which is in the top-left corner of OpenStreetMap. Then choose "Manually select a different area", which is in blue under the coordinates shown.
For our experiments, choosing the following coordinates will give a map that encompasses the five RF sensors.
Once the dimensions are set, hit the Share button on the left side of the screen. A share screen should appear with image format and scale options. There should be a check box labeled "Set Custom Dimensions". Choose that option, and a second box will appear on your screen as shown below.
Zoom into two opposite corners and make sure the second box fits over the first bounding box as closely as is possible. Then, as an input to "Scale" on the Share side of the screen, type in 1000. This value should automatically adjust to a larger number around 10,000. This will increase the resolution of the image generated by OpenStreetMap. Then, hit the download button. You should have a file called map.png in your Downloads folder. Make sure you save or write down your map coordinates, as we will need to manually input them into the Sensor Management Tool in a later step.
To import the map into the SMT, choose the Configuration Icon that looks like a gear in the top left corner of the SMT screen, choose the Configure Map tab, and on the bottom of the screen, choose the Browse button near the input for Image File.
Choose your map from the downloads folder. Make sure you update the coordinates of the upper-left corner and lower-right corner of the map with the coordinates you saved/wrote down from OpenStreetMap earlier in this step. Make sure to select Save Changes when you finish. If you are experimenting high above sea level, you can add a Z Offset in meters to make sure the map is on the same plane as the sensor's GPS readings.
2.5) Switch back to the N6854A Geolocation View. To localize AERPAW Tower LW1, under Computational parameters, make sure the Show TDOA Hyperbolas box is checked. Under Time series acquisition, change the Center frequency to 3.355 GHz, the bandwidth to 1 MHz, the samples to 32000, and the default antenna to Antenna 1. Under Geolocation sensors, check the boxes for the sensors whose IP addresses end in .13, .15, and .16. Under the attenuation box for each sensor, change the value from 0.0 dB to -19 dB to increase the sensitivity of each sensor to its highest sensitivity. Then, if you are satisfied with the settings and inputs, select Start Acquisition under Acquisition Control. The Geolocation Measurement Setup screen should look like the screen shown below.
For better visualization than what the SMT map provides, once a measurement is acquired, as shown in the below image, open the Keysight N6854 to KML software. Type the N6854A Measurement ID or IDs into the N6854A Measurement ID input box and hit Refresh. Google Earth Pro should open and show you the estimated position.
To generate multiple location estimates without repeatedly pressing the "Start Acquisition" button, you can check the Auto repeat box beside the "Start Acquisition button. This will attempt to localize the signal source about once every 3-4 seconds.
2.6) After generating a series of localization estimates, you can export your results using the "Keysight N6854 Export" software, which generates .csv files based on the N6854 Measurement IDs. To use the software, open Keysight N6854 Export while the SMT is open. It is generally helpful to write down the Measurement IDs for the first and last measurements of any particular experiment. These Measurement IDs can be found as shown in the following screenshot and need to be input into the following box in the Keysight N6854 Export tool. Once the Measurement IDs are included in the Measurement ID box, you can hit export, and a new .csv file will be created and written to the Documents folder of the remote desktop.
2.7) Once the data is downloaded in .csv file form, you are almost ready to post-process and analyze the data. A MATLAB script is available for download to help analyze the data here. The script loads in all the data from the .csv file, uses the Mapping Toolbox to plot the estimated transmitter coordinates and the ground-truth locations of AERPAW towers LW1-4, plots localization error vs. time, and prints average localization error. To ensure your .csv file is compatible with the MATLAB script, open the .csv file in Excel. Highlight all entries in the Time column as shown below.
Right-click on the highlighted cells, and select the Format Cells option. Change the format of the time entries to h:mm:ss as shown in the screenshot below and select OK. Then save and exit the .csv file.
2.8) Then, add your newly saved and re-formatted .csv file to your working directory in MATLAB. Open the KeysightRFTDOALocalization.m file downloaded from Github. Be sure to change the filename variable in line 2 to your filename. After that, you can hit run on the MATLAB script to generate the aforementioned plots and find the average localization error. Feel free to make any changes to your individual download of the MATLAB script.
Congratulations! You should have successfully localized AERPAW Tower LW1 using the Keysight RF Sensor Management Tool and downloaded the localization data for post-processing and analysis in MATLAB.
3.) AERPAW UAV Localization Experiment Overview
The process for localizing an AERPAW UAV is very similar to the process for localizing AERPAW Tower LW1. The key difference is that experimenters first have to create an AERPAW experiment and configure their UAV to transmit a signal. For the purpose of this sample experiment, we will modify the GE2 Channel Sounder Experiment.
3.1) First, run the GE2 Channel Sounder Experiment in AERPAW's Development Mode. You do not need to create any fixed-nodes. You only need to initialize the experiment with one UAV portable-node, which will operate as the transmitter for this experiment. To help you accomplish this, you can read the GE2 Channel Sounder Experiment portion of the AERPAW User Manual and any additional preceding chapters of the manual that may be helpful. Alternatively, you can learn how to run the GE2 Channel Sounder Experiment by watching the video tutorials made for AERPAW's 2023 Community Workshop (ACW 2023). The GE2 Channel Sounder Experiment is Tutorial 3 on the ACW 2023 page.
3.2) Next, add a Preplanned Trajectory to your AERPAW experiment. This chapter of the AERPAW User Manual explains how to use the Preplanned Trajectory script. The default plan that the Preplanned Trajectory script points to takes off from the launch pad and flies down a road at the Lake Wheeler testbed at a 25 meter altitude and 5.0 m/s speed. A screenshot of the default plan is included below for your convenience. If you're unhappy with the default plan, this chapter of the AERPAW User Manual explains how to use QGroundControl to create your own preplanned trajectory or edit existing files. Flying at higher altitudes increases the probability of line-of-sight transmission between the RF sensors and the portable-node transmitter, which should increase localization accuracy. 25 meter altitude will not provided line-of-sight to all the RF sensor towers, so it may be worth editing the flight plan.
3.3) The last step in configuring our AERPAW experiment for localization is to adjust the bandwidth on the GE2 Channel Sounder sample experiment. The GE2 Channel Sounder sample experiment is configured to transmit at a bandwidth that is incompatible with the Keysight SMT software. To change the bandwidth to a value that is compatible with the Keysight SMT software, we have to edit the CSTX_noGUI.py file using the file editor of your choice. When you are remotely logged into your portable node UAV container, you can find the CSTX_noGUI.py file using the path "/root/AERPAW-Dev/AHN/E-VM/Profile_software/SDR_control/Channel_Sounderv3/CSTX_noGUI.py". Open the CSTX_noGUI.py file with your preferred text editor. The picture below uses Mobaxterm.
In the following code, bandwidth = sample rate divided by sps, where sps is samples per symbol. You can either increase samp_rate or decrease sps to have larger bandwidth. For this sample experiment, we will change the bandwidth to 5 MHz by changing samp_rate to 20 MHz and sps = 4. Then, save the file and exit.
3.4) Finally, run the experiment once in the development environment to make sure everything is working as expected using ./startexperiment.sh. If you set up port forwarding between the OEO Console and QGroundControl, you can watch your UAV's preplanned trajectory to make sure it works during the experiment's runtime. To make sure the SDR is transmitting as expected, you can use the screen command to see what screens the portable node is running:
screen -ls
There should be two screens running if you've enabled the Preplanned Trajectory script, started the GE2 Channel Sounder sample experiment, and uncommented the lines /Vehicle/startVehicle.sh and /Radio/startRadio.sh in /root/startexperiment.sh. You should have a vehicle screen and a radio screen called txGRC. The image below shows what it looks like when just the radio screen is active. To look inside the txGRC radio screen to make sure everything is working properly, use the screen command again:
screen -r txGRC
If you use the screen command to look inside the txGRC screen, you should see outputs like what are shown in the image directly above. As long as there are no error messages, the SDR is working correctly. If the preplanned trajectory worked as expected, using the screen command to look inside the txGRC screen did not reveal any error messages, and you've changed the bandwidth to a value that is compatible with the Keysight SMT, then you're ready to save and exit the experiment. Reset the portable node using ./reset/sh. When you are absolutely sure that you are satisfied with your experiment, go to the back to the AERPAW Experiment Portal to save and exit your experiment. Once the experiment has been saved and exited, submit it to the testbed.
3.5) The AERPAW Ops will schedule a time for your flight. To prepare for your flight, complete steps 2.1-2.4 of the KRSE3 TDOA-based Source Localization sample experiment. To localize an AERPAW UAV, under Computational parameters, make sure the Show TDOA Hyperbolas box is checked. Under Time series acquisition, change the Center frequency to 3.32 GHz (Channel Sounder Center frequency), the bandwidth to 5 MHz, the samples to 32000, and the default antenna to Antenna 1. Under Geolocation sensors, check the boxes for the sensors whose IP addresses end in .13, .14, .15, and .16. Feel free to add the fifth RF sensor whose IP address ends in .11 if you'd like. Then, if you are satisfied with the settings and inputs, select Start Acquisition under Acquisition Control. The Geolocation Measurement Setup screen should look like the screen shown below.
Make sure the Auto-repeat box next to Start Acquisition is checked. Start Acquisition before the UAV is armed and cancel Continuous Acquisition after the UAV has landed and the flight has ended. Then complete steps 2.6-2.7 of the KRSE3 TDOA-based Source Localization sample experiment.
3.6) The AERPAW Ops will send you a text file called _VehicleOut.txt. Copy the ground truth altitude, latitude, and longitude into the .csv file you exported using the Keysight N6854 Export software. Name the column headings GTLongitude, GTLatitude, and GTAltitude respectively. Download and open the MATLAB script KeysightRTDOALocalizationforFlights.m from Github. Then, add your newly saved and re-formatted .csv file to your working directory in MATLAB. Be sure to change the filename variable in line 2 to your filename.
This MATLAB script reads in the data, plots the UAV's trajectory in 3D, plots the trajectory with localization estimates and AERPAW towers in 2D using the Mapping Toolbox, plots error vs. altitude, plots error vs. time, plots altitude vs. time, plots the UAV's trajectory in 3D with green points where the localization error was less than 100 meters and red where localization error was greater than or equal to 100 meters, and plots the trajectory again in 2D using the mapping toolbox with green and red points based on the localization error thresholding. Again, feel free to make any changes to the script that you see fit.
Congratulations! You should have successfully localized an AERPAW UAV using the Keysight RF Sensor Management Tool and downloaded the localization data for post-processing and analysis in MATLAB.