.: What is Done in This Example? :.

The following figures illustrate the flow of the interference nulling example. This example is very similar to the second example. The only difference is that now tx1 is also transmitting the stream to its receiver rx1.
This example runs the following steps.
    1. Both of tx1 and tx2 create a socket to wait for the trigger from rx1.
    2. rx1 first setups the USRP2 and connects to the socket at tx2 to trigger tx2 to send its access codes for channel estimation.
    3. tx2 synchronizes two USRP2s, and then starts transmitting the access codes. After sending three access codes, tx2 waits for rx1 to send the channel estimation back to it via backend Ethernet.
    4. Once rx1 receives the access codes, it triggers tx1 to start transmitting, and then sends the channel estimation back to tx2.
    5. tx1 starts transmitting.
    6. Once tx2 gets the channel estimation, it then precodes the payload and sets the timestamp of the first sample of the payload to (TIMESTAMP+GAP).
    7. The receiver dumps the results to files. Decoding is performed offline.

.: Run the Example :.

    1. In rx1 $ cd gr-mimo/python
    2. In tx1 and tx2 $ cd source
    3. In rx1, link the python module 'mimo_usrp2_ofdm_receiver_null.py' to 'mimo_usrp2_ofdm_receiver.py'. Make sure the file is linked correctly. $ ln -sf mimo_usrp2_ofdm_receiver_null.py mimo_usrp2_ofdm_receiver.py
      $ ls -la mimo_usrp2_ofdm_receiver.py
      Re-build this folder if there are errors when you run the python code. $ make clean
      $ make
    4. Start the transmitter program at tx1. You can change the central frequency and interpolation. $ sudo mimo_null_tx1 -f 2.45G -i 64 -e eth1 -v
    5. Start the transmitter program at tx2. You can change the central frequency and interpolation. $ sudo mimo_null_tx2 -f 2.45G -i 64 -e eth1 -a eth2 -v
    6. Wait a bit until two transmitters print the message 'wait for trigger....'. Then, start the receiver program. You can change the central frequency, decimation, and the interface, but remember to keep "rx_ant_num" as 1. $ sudo ./mimo_usrp2_rx.py -f 2.45G -d 64 -e eth1 --rx_ant_num 1 --tx1_ip_addr xxx.xxx.xxx.xxx --tx1_sock_port 9999 --tx2_ip_addr xxx.xxx.xxx.xxx --tx2_sock_port 9999 -v
    7. In the receiver side, the program will keep running to capture the trace. Press 'Ctrl-C' to stop the program once you see the message '@ enter_finish_first_pkt'.
    8. In the receiver, offline decode the signals and plot the raw signals. $ cp *.dat ../../matlab/
      $ cd ../../matlab/
      $ matlab &
      Run [snr_null_dB snr_orig_dB esnr_null esnr_orig] = decode_null() in Matlab.

TIP: Note that if you modify the value of GAP at tx2, you will also need to modify the setting in the matlab code (matlab/decode_null.m).

.: Result :.

After decoding offline in Matlab, you will get the average SNR in dB and the ESNR with tx2 (performing nulling) and without tx2. You can compare two SNRs and two ESNRs to get how much SNR is reduced due to the residual interference from tx2. The following figure on the left shows the raw signals received by rx1. The following figure on the right is the raw signals received by rx1 when tx1 is only transmitting 5 symbols (by giving the argment -l 5 when running the program at tx1). This helps you to check whether tx2 is cancelling its signals correctly.


raw signal

raw signal (tx1 only sends 5 symbols)