Simple Beamforming Demo

After you have run wideband_twonode_cal, it is a good idea to test and see whether the beams are being formed in the correct directions. If not, it would indicate that the calibration was done incorrectly. Run the script demo_beamforming.m. As you can see, this script demonstrates both RX and TX beamforming.


% RX Beamforming. TX: node1, RX: node2node_tx = node1;node_rx = node2;subplotIndex = 3;demo_beamforming_rx_v2;node2 = node_rx;node1 = node_tx;clear node_tx node_rx;
% RX Beamforming. TX: node2, RX: node1node_tx = node2;node_rx = node1;subplotIndex = 4;demo_beamforming_rx_v2;node1 = node_rx;node2 = node_tx;clear node_tx node_rx;
% TX Beamforming. TX: node1, RX: node2node_tx = node1;node_rx = node2;subplotIndex = 1;demo_beamforming_tx_v2;node2 = node_rx;node1 = node_tx;clear node_tx node_rx;
% TX Beamforming. TX: node2, RX: node1node_tx = node2;node_rx = node1;subplotIndex = 2;demo_beamforming_tx_v2;node2 = node_tx;node1 = node_rx;clear node_tx node_rx;

In RX beamforming (using demo_beamforming_rx_v2.m), the TX node uses just one antenna to transmit a wideband signal. The RX node captures and receives the signal from each of the 4 antennas. On these captured signals, it sequentially applies different beamforming vectors, corresponding to different directions. These beamforming vectors are geometrically determined. In each case, the RX measures the total power received within the band of interest. This is shown in MATLAB Figure 1. When node1 is the TX (single channel) and node2 is the RX (applying the beamforming), the results are shown in (row 2, column 1) . When node2 is the TX (single channel) and node1 is the RX (applying the beamforming), the results are shown in (row 2, column 2) . As you can see, demo_beamforming_rx_v2 runs very quickly because all the beamforming is performed in one iteration; in other words, the TX transmits omni-directionally, and the RX can look in all directions simultaneously.

Row 1 is for TX beamforming, and Row 2 is for RX beamforming. Column 1 is for the case where the signal is being sent from node1 to node2. Column 2 is for the case where the signal is being sent from node2 to node1. The beams indicate that the calibration is done adequately.

In TX beamforming (using demo_beamforming_tx_v2.m), the TX sequentially applies different beamforming vectors in order to transmit in different directions (one direction at a time). The RX uses just one antenna (omni-directional), and plots the power it received in the frequency band of interest. This is shown in MATLAB Figure 1. When node1 is the TX (applying the beamforming) and node2 is the RX (single channel), the results are shown in (row 1, column 1) . When node2 is the TX (applying the beamforming) and node1 is the RX (single channel), the results are shown in (row 1, column 2) . The demonstration using demo_beamforming_tx_v2 runs rather slowly, because there is one capture cycle for each angle of departure at the TX, and the TX has to sequentially scan through all all possible beamforming directions.

Play around with this example

This simple example (also known as spatial correlation) has shown you how to form TX and RX beams. Look at the code (demo_beamforming_rx_v2 and demo_beamforming_tx_v2) to figure out where the beamforming vectors are actually calculated and applied. Perhaps you could try the following:

  1. Instead of placing the nodes in boresight (which leads to all Angles of arrival and departure being estimated as 0), turn node1 by approximately 25 degrees. Rerun demo_beamforming, and observe what happens.
  2. Repeat the previous step, but this time turn node2. Or perhaps even turn both node1 and node2.
  3. Block the line of sight path with an RF blocker. Repeat and observe the AoA and AoDs.
  4. Place a metallic reflector (even aluminum foil will do) so as to try to reflect the signal, and create multiple paths. Can you detect the non primary paths?
  5. Advanced: Instead of applying geometric beamforming vectors, take an FFT of the received signal vector (i.e., FFT of size 4) per clock cycle. What do you observe? Read about concepts related to signals in antenna domain and spatial domain. Let your own journey of discovery take you places.