Changes between Version 42 and Version 43 of Tutorials/Wireless/Full Duplex


Ignore:
Timestamp:
Mar 22, 2023, 7:01:19 AM (14 months ago)
Author:
mpk2138
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials/Wireless/Full Duplex

    v42 v43  
    55* Tingjun Chen, Duke University: tingjun.chen[at]duke.edu
    66
    7 Last updated: March 20, 2023
     7Last updated: March 22, 2023
    88
    99== Full-Duplex Wireless in COSMOS ==
     
    2525
    2626==== Updates ====
    27 * ![03/20/2023] - ''Major update'' - Experimentation has been moved to the COSMOS sandbox servers. Experiments and testbed usage has been updated
     27* ![03/22/2023] - ''Major update'' - Experimentation has been moved to the COSMOS sandbox servers. Experiments and testbed usage has been updated
    2828* ![11/15/2021] - Update PC IP address
    2929* ![10/15/2021] - New paper in Computer Networks
     
    151151
    152152'''Configuring the Other Radios'''
    153 The procedure for the two flowgraphs can be repeated to configure and benchmark the three other FD radios in the testbed. Please see the table below, which provides the USRP IP address, the subdevice specifier, the SUB-20 serial number, and a useful initial configuration.
    154 
    155 ==== Wrapping Up & Saving Work ====
    156 When you are finished with your experiments, you can save your work to a new node image, that you can then load in next time. Since it can take some time to finish saving your work to a new server image, we recommend saving at least '''30 minutes''' of your reservation time to make sure you have enough time to complete the process.
    157 
    158 * To ensure a reliable image save, we need to reboot the server first. You will need to return to the Sandbox 2 console, either in a new SSH session, or by typing {{{exit}}} on the server SSH window.
    159 * Run the following command from the Sandbox 2 console:
    160 {{{
    161 omf tell -a reboot -t srv2-lg1
    162 }}}
    163 * Check for {{{Reply: OK}}} and give some minutes to allow the server to come back online.
    164 * Log back into the server: {{{ssh -X root@srv2-lg1}}}
    165 * Run the following script to prepare the node for imaging. It is ok to ignore warnings and errors from this command. Note the command it provides to you once finishing.
    166 {{{
    167 ./prepare.sh
    168 }}}
    169 * Go back to the Sandbox 2 console by running {{{exit}}}.
    170 * Run the command that should have been provided by the {{{prepare.sh}}} script. This command, like the {{{omf load}}} command, can take 5-10 minutes to run. Good time to refill your tea or coffee...
    171 {{{
    172 omf save -n srv2-lg1.sb2.cosmos-lab.org
    173 }}}
    174 * '''Let this command run to completion, even if it does not seem to finish.''' Confirm that the command finished and output something along the lines of the text below. If not, please see the troubleshooting section.
    175 {{{
    176  INFO exp: 
    177  INFO exp: - Saving process started at: 2023-03-21 04:33:09 +0000
    178  INFO exp:   (this may take a while depending on the size of your image)
    179  INFO exp: - Saving disk image of 'srv2-lg1.sb2.cosmos-lab.org' finished with success.
    180  INFO exp: - Saving process completed at: 2023-03-21 04:35:49 +0000
    181  INFO exp: 
    182 }}}
    183 * The filename of your image will be located in the output of the command, specifically in the third line of this part of the output:
    184 {{{
    185  INFO srv2-lg1.sb2.cosmos-lab.org: 
    186  INFO srv2-lg1.sb2.cosmos-lab.org: - Saving image of '/dev/sda' on node 'srv2-lg1.sb2.cosmos-lab.org'
    187  INFO srv2-lg1.sb2.cosmos-lab.org:   to the file 'mpk2138-node-srv2-lg1.sb2.cosmos-lab.org-2023-03-21-04-32-59.ndz' on host '10.116.0.40'
    188  INFO srv2-lg1.sb2.cosmos-lab.org: 
    189 }}}
    190 * Keep a note of this filename. You can use this instead of {{{flexicon-cosmos-v1.ndz}}} the next time you login to use the FD testbed.
    191  * If you would like to change the filename, you can run the following command. Note, it is good to keep your COSMOS username on the front of your node image filename. Make sure to use your specific filename that was provided in the output of the {{{omf save}}} command. Spaces cannot be used in the filename.
    192  {{{
    193  mv /export/omf-images-5.4/mpk2138-node-srv2-lg1.sb2.cosmos-lab.org-2023-03-21-04-32-59.ndz /export/omf-images-5.4/mpk2138-IMAGE-NAME-HERE.ndz
    194  }}}
    195 * The node image is now saved, and you will be able to pick up where you left off the next time you login to use the FD radios.
    196 
    197 === Details on the available experiments ===
    198 In general, the three example experiments provide a means for the experimenter to benchmark the performance of the FD radios, and provide a basis for further experimentation. In this section we provide further detail for each experiment and what they allow the experimenter to observe.
    199 
    200 '''Possible errors when running experiments'''
    201 
    202 Occasionally, when running an experiment in GNU radio, it may crash with the following error (or similar):
    203 
    204 {{{
    205 [ERROR] [RFNOC::GRAPH::DETAIL] Node TxStreamer#0cannot handle its current topology!
    206 }}}
    207 
    208 The cause of this error is currently unknown and under investigation. The solution is to restart the experiment again until it works.
    209 
    210 ==== node_level_sic_fd_gui ====
    211 This experiment's primary use is to visualize the node-level performance of a single FD radio. In this experiment, several performance metrics are visualized:
    212  * The received self-interference (SI) after RF SI cancellation (SIC) and after digital SIC.
    213  * The received power spectra after RF SIC and after digital SIC.
    214  * The complex-valued digital SIC filter taps.
    215  * The estimated SI channel.
    216 
    217 '''Selecting a radio'''
    218 
    219 As there are two radios, this experiment can be run on either one by changing the value of the {{{subdev_spec}}} variable in the upper right part of the flowgraph. The available values are {{{A:0}}} and {{{B:0}}}, which correspond to the first and second transceivers on the USRP 2974 respectively.
    220 
    221 Please note the following correspondence with the {{{sub20_sn}}} variable:
    222 
    223 * {{{A:0}}} - set {{{sub20_sn}}} to {{{552C}}}
    224 * {{{B:0}}} - set {{{sub20_sn}}} to {{{5625}}}
    225 
    226 '''Tunable variables'''
    227 
    228 Several other variables can be changed:
    229 
    230 * {{{freq}}} - the carrier frequency used. The Gen-2 hardware can support roughly 900-1000MHz.
    231 * {{{samp_rate}}} - the bandwidth used. Ideal choices are 10MHz and 12.5MHz. 20MHz is supported but due to limitations in the USRP receiver chain, 20MHz bandwidth received signals have a bandpass filtered character.
    232 * {{{tx_gain}}} - this sets the Tx gain in dB. At a setting of 15, the transmit power will be -10dBm. A setting of greater than 22 can degrade performance.
    233 
    234 '''Details on configuring the canceller PCB'''
    235 
    236 Using the experiment {{{node_level_sic_fd_gui}}}, the experimenter can configure the RF canceller PCB using the experiment GUI. There are 14 sliders:
     153
     154The procedure for the two flowgraphs can be repeated to configure and benchmark the three other FD radios in the testbed. Please see the tables below, which provides the USRP IP address, the subdevice specifier, the SUB-20 serial number, and a useful initial configuration.
     155
     156Connection details:
     157|| Radio # || USRP Address || Subdevice || SUB-20 Serial # ||
     158|| 1 || 10.116.7.1 || A:0 || 552D ||
     159|| 2 || 10.116.7.1 || B:0 || 5647 ||
     160|| 3 || 10.116.7.2 || A:0 || 552C ||
     161|| 4 || 10.116.7.2 || B:0 || 18A1 ||
     162
     163Initial configuration values:
     164|| Radio # || {{{cap_0}}} || {{{cap_1}}} || {{{cap_2}}} || {{{qf_0}}} || {{{qf_1}}} || {{{cf_0}}} || {{{cf_1}}} || {{{att_0}}} || {{{att_1}}} || {{{dac_0}}} || {{{dac_1}}} ||
     165|| 1 || 9 || 10 || 0 || 2 || 2 || 14 || 0 || 31 || 44 || 224 || 133 ||
     166|| 2 || 4 || 10 || 0 || 0 || 0 || 2  || 7 || 2  || 13 || 201 || 161 ||
     167|| 3 || 3 || 8  || 0 || 2 || 2 || 0  || 0 || 22 || 91 || 105 || 22 ||
     168|| 4 || 5 || 3  || 0 || 2 || 2 || 8  || 6 || 11 || 19 || 159 || 155 ||
     169
     170Any parameter not in this table should have value 0. For reference, the meaning of each parameter is described below:
    237171 * {{{cap0, cap1, cap2}}} - these control the antenna tuner.
    238172 * {{{att0, att1}}} - The attenuator values for FDE tap 0 and tap 1. Higher values lead to greater attenuation.
     
    244178 * {{{dac2}}} - The phase shifter values for the Gen-1 path.
    245179
    246 The experiment GUI will show a visualization of the received power spectrum and self-interference (SI) channel. Using this, the experimenter can generate any desired RF SIC profile.
    247 
    248 The GUI also provides a slider for the !Tx/Rx delay. This setting is important for digital SIC performance, and the optimal value depends on the bandwidth used. For 10 MHz bandwidth, a delay of 40 should lead to the best digital SIC performance.
    249 
    250 Below is the GUI for this experiment, showing the various sliders for the above parameters.
    251 
    252  || Figure 5: The node-level SIC experiment GUI ||
    253  || [[Image(node_level_sic_gui.png,480px)]] ||
    254 
    255 ==== ofdm_link_fd_gui ====
    256 This experiment makes use of both FD radios to create a FD OFDM link. The radios are synchronized over a MIMO cable, guaranteeing operation in FD mode, where each radio transmits a packet at the same time and successfully decodes the other radio's packet. The following metrics are visualized:
    257  * The packet data values.
    258  * The packet sequence numbers.
    259  * The received signal spectra at each radio after digital SIC.
    260  * The digital SIC filter taps at each radio.
    261 
    262 In order for the FD link to operate successfully, each FD radio must be configured to provide sufficient SIC. This can be done with the {{{node_level_sic_fd_gui}}} experiment.
    263 
    264 '''Tunable variables'''
    265 
    266  * {{{freq}}} - the carrier frequency used. The Gen-2 hardware can support roughly 900-1000MHz.
    267  * {{{samp_rate}}} - the bandwidth used. Ideal choices are 10MHz and 12.5MHz. 20MHz is supported but due to limitations in the USRP receiver chain, 20MHz bandwidth received signals have a bandpass filtered character.
    268 
    269 The Tx gain is set to allow for successful operation as long as the two radios are achieving adequate SIC. It may be changed if desired through the UHD USRP Sink block on the GNU radio flowgraph.
    270 
    271 Below is the GUI for this experiment, showing the packet data values and sequence numbers.
    272 
    273  || Figure 6: The OFDM link experiment GUI ||
    274  || [[Image(ofdm_link_fd_gui.png,480px)]] ||
    275 
    276 ==== prr_fd_gui ====
    277 This experiment takes the OFDM link and uses it to compute two metrics: the packet reception ratio (PRR) and signal-to-noise ratio (SNR). These metrics provide a basic link-level benchmark for the FD nodes. In this experiment, the following metrics are visualized:
    278  * The received signal after RF SIC and after digital SIC.
    279  * The measured SNR for each packet.
    280  * The packet reception ratio averaged over the entire experiment run.
    281  * The constellation diagram of the received signal after RF SIC and after digital SIC.
    282 
    283 For ease of use, we only display the visualization for a single radio.
    284 
    285 As before, in order for the FD link to operate successfully, each FD radio must be configured to provide sufficient SIC. This can be done with the {{{node_level_sic_fd_gui}}} experiment.
    286 
    287 '''Tunable variables'''
    288  * {{{tx_gain}}} - The Tx gain is the key tunable variable as it determines the received packet SNR and therefore the PRR. This can be modified in real time using the GUI, and set prior to the experiment via the QT GUI Range block on the flowgraph.
    289  * {{{freq}}} - the carrier frequency used. The Gen-2 hardware can support roughly 900-1000MHz.
    290  * {{{samp_rate}}} - the bandwidth used. Ideal choices are 10MHz and 12.5MHz. 20MHz is supported but due to limitations in the USRP receiver chain, 20MHz bandwidth received signals have a bandpass filtered character.
    291 
    292 Below is the GUI for this experiment.
    293 
    294  || Figure 7: The link PRR experiment GUI ||
    295  || [[Image(prr_fd_gui.png,480px)]] ||
     180Note - the COSMOS FD testbed is contained within a laboratory environment, which is mostly static, but not perfectly so. It is possible that these initial configuration values may not give ideal performance off the bat - if the {{{wifi_node_level_sic_viz}}} flowgraph shows a residual signal in the bottom constellation plot, it is likely that the configuration values need to be adjusted slightly.
     181
     182There is a strategy to do this - first, it is worthwhile to change the {{{dac_0}}} and {{{dac_1}}} values to see if this brings the residual signal power down. If this does not work, then the {{{att_0}}} and {{{att_1}}} values can be changed, followed by again changing {{{dac_0}}} and {{{dac_1}}} until a good configuration is achieved. Generally, the other values are stable.
     183
     184If you would like to configure the Gen-2 RF canceller from scratch, make sure {{{att_0}}} and {{{att_1}}} are set to 127 (effectively turning off the canceller) and then adjust {{{cap_0}}} and {{{cap_1}}} until the SI spectral power density is between -45 to -50 "dB". Then, start reducing the {{{att_0}}} value until you see either a decrease or increase - at this point you can tune {{{dac_0}}} to get the lowest spectral power. Then, repeat this with {{{att_1}}} and {{{dac_1}}}; you may have to go back to {{{att_0}}} and {{{dac_0}}} to get the best configuration. This is a procedure which gets easier with practice - it may be worth sticking with the initial values in the table to begin with.
     185
     186==== Wrapping Up & Saving Work ====
     187When you are finished with your experiments, you can save your work to a new node image, that you can then load in next time. Since it can take some time to finish saving your work to a new server image, we recommend saving at least '''30 minutes''' of your reservation time to make sure you have enough time to complete the process.
     188
     189* To ensure a reliable image save, we need to reboot the server first. You will need to return to the Sandbox 2 console, either in a new SSH session, or by typing {{{exit}}} on the server SSH window.
     190* Run the following command from the Sandbox 2 console:
     191{{{
     192omf tell -a reboot -t srv2-lg1
     193}}}
     194* Check for {{{Reply: OK}}} and give some minutes to allow the server to come back online.
     195* Log back into the server: {{{ssh -X root@srv2-lg1}}}
     196* Run the following script to prepare the node for imaging. It is ok to ignore warnings and errors from this command. Note the command it provides to you once finishing.
     197{{{
     198./prepare.sh
     199}}}
     200* Go back to the Sandbox 2 console by running {{{exit}}}.
     201* Run the command that should have been provided by the {{{prepare.sh}}} script. This command, like the {{{omf load}}} command, can take 5-10 minutes to run. Good time to refill your tea or coffee...
     202{{{
     203omf save -n srv2-lg1.sb2.cosmos-lab.org
     204}}}
     205* '''Let this command run to completion, even if it does not seem to finish.''' Confirm that the command finished and output something along the lines of the text below. If not, please see the troubleshooting section.
     206{{{
     207 INFO exp: 
     208 INFO exp: - Saving process started at: 2023-03-21 04:33:09 +0000
     209 INFO exp:   (this may take a while depending on the size of your image)
     210 INFO exp: - Saving disk image of 'srv2-lg1.sb2.cosmos-lab.org' finished with success.
     211 INFO exp: - Saving process completed at: 2023-03-21 04:35:49 +0000
     212 INFO exp: 
     213}}}
     214* The filename of your image will be located in the output of the command, specifically in the third line of this part of the output:
     215{{{
     216 INFO srv2-lg1.sb2.cosmos-lab.org: 
     217 INFO srv2-lg1.sb2.cosmos-lab.org: - Saving image of '/dev/sda' on node 'srv2-lg1.sb2.cosmos-lab.org'
     218 INFO srv2-lg1.sb2.cosmos-lab.org:   to the file 'mpk2138-node-srv2-lg1.sb2.cosmos-lab.org-2023-03-21-04-32-59.ndz' on host '10.116.0.40'
     219 INFO srv2-lg1.sb2.cosmos-lab.org: 
     220}}}
     221* Keep a note of this filename. You can use this instead of {{{flexicon-cosmos-v1.ndz}}} the next time you login to use the FD testbed.
     222 * If you would like to change the filename, you can run the following command. Note, it is good to keep your COSMOS username on the front of your node image filename. Make sure to use your specific filename that was provided in the output of the {{{omf save}}} command. Spaces cannot be used in the filename.
     223 {{{
     224 mv /export/omf-images-5.4/mpk2138-node-srv2-lg1.sb2.cosmos-lab.org-2023-03-21-04-32-59.ndz /export/omf-images-5.4/mpk2138-IMAGE-NAME-HERE.ndz
     225 }}}
     226* The node image is now saved, and you will be able to pick up where you left off the next time you login to use the FD radios.
     227
     228=== Troubleshooting ===
     229There are some errors which may crop up while running this tutorial. This section will help resolve and debug them.
     230
     231If there are any unresolvable issues not covered below, please contact Manav Kohli at mpk2138[at]columbia.edu.
     232
     233'''Received Reply: ERROR (NOT REGISTERED)'''
     234
     235This can occur when using the {{{omf tell -a on}}} or {{{omf tell -an off}}} commands. If it happens, simply run the command again. It should work.
     236
     237'''Imaging the server timed out'''
     238
     239Run the command again, changing {{{-o 1800}}} to {{{-o 3600}}}. It should not time out again.
     240
     241'''Saving the server image failed'''
     242
     243Run the command again, but if it fails more than three times in a row, do not continue, and contact the above email.
     244
     245'''The GNU radio flowgraph did not run, exited with error code -11'''
     246
     247Run the flowgraph again. If the error persists, please attempt the tutorial from the ground-up. If that still fails, contact the above email.
     248
     249'''"Device not found" when running GNU radio flowgraph'''
     250
     251The USRP X310 has become unresponsive or disconnected from the COSMOS network. This is not solvable via the testbed console. Please contact the above email.
     252
     253'''The sliders in {{{wifi_node_level_sic_tune}}} do nothing'''
     254
     255Double check that the combination of IP address, subdevice specifier, and SUB-20 serial number is correct. If you are 100% sure it is correct, please contact the above email.
    296256
    297257=== Acknowledgements ===