RENEW Project Documentation

Version 1.0

Reconfigurable Ecosystem for Next-generation End-to-end Wireless

Basic Uplink Turorial

In this tutorial, we use a simple Matlab script to transmit and receive a series of pilot signals in the unchained mode. A possible use case would be for channel sounding purposes. This script creates two Iris node objects, one acting as the base station (BS) and one as UE. Then, using the function set offered by the Matlab driver, the script will configure the TDD schedule, initiate the beacon transmission on the BS side, start transmitting the pilot on the UE side and finally read the pilot on BS side and plot the result.

We assume in this and the following tutorials that the user is familiar with Matlab and focus mostly on the interaction with the Iris nodes and the flow of commands needed to be adhered.

For an overview of the TDD framing please refer to Python Basic Tutorial.

Click here for the complete code.

Define pilot sequence

We follow the WiFi convention and define the pilots as frequency domain long-term training sequences (LTS) and convert them to time domain samples through an IFFT.

 % LTS for fine CFO and channel estimation
lts_f = [0 1 -1 -1 1 1 -1 1 -1 1 -1 -1 -1 -1 -1 1 1 -1 -1 1 -1 1 -1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 ...
    1 1 -1 -1 1 1 -1 1 -1 1 1 1 1 1 1 -1 -1 1 1 -1 1 -1 1 1 1 1];
lts_t = ifft(lts_f, 64); %time domain  

Define and configure Iris nodes

Here, we first define the experiment’s parameters such as the TDD schedule, the IDs of the boards we are going to use, the sample rates etc. These parameters are kept in a struct. Then, we create instances of the Iris board objects (at the Matlab level) and initialize them with the parameter struct we created. This initialization will, in turn, create instances of Python objects in the Matlab driver with the same parameters defined here.

 b_sched = 'PGGGGGRG';               % BS schedule
    u_sched = 'GGGGGGPG';               % UE schedule
    % Create a vector of node objects
    sdr_params = struct(...
        'id', 'RF3C000007', ...
        'txfreq', 2.6e9, ...
        'rxfreq', 2.6e9, ...
        'txgain', 37, ...
        'rxgain', 30, ...
        'sample_rate', 5e6, ...
        'n_samp', length(tx_vec_iris), ...     % number of samples per frame time.
        'tdd_sched', b_sched, ...     % number of zero-paddes samples
        'n_zpad_samp', (N_ZPAD_PRE + N_ZPAD_POST) ...
        );
    
    sdr_params(2) = sdr_params(1);
    sdr_params(2).id =  'RF3C000028';
    sdr_params(2).rxfreq = 2.6e9;
    sdr_params(2).txfreq = 2.6e9;
    sdr_params(2).tdd_sched = u_sched;
    node_bs = iris_py(sdr_params(1));
    node_ue = iris_py(sdr_params(2)); 

Set up transmission

The following lines reset the correlator on the UE, hence, preparing it to synchronize based on the peak it will have to detect, set up reading streams on both nodes before the transmission starts, and configure the schedules on the BS and the UE in unchained mode, respectively.

 node_ue.sdrsync(0); 
node_ue.sdrrxsetup();
node_bs.sdrrxsetup();
chained_mode = 0;
node_bs.set_config(chained_mode,1,0);
node_ue.set_config(chained_mode,0,0); 

Burn data on the BS and the UE

The BS will initiate the writing of the predefined beacon on the ram for transmission during the ‘P’ slots of the BS schedule. The beacon sequence is hardcoded in the Python driver and the Matlab user should not be concerned with it. The UE in turn also writes its pilots onto the ram so that they will be transmitted during the ‘P’ slots of its schedule

 node_bs.sdr_txbeacon(N_ZPAD_PRE);
node_ue.sdrtx(tx_vec_iris); 

Set up reception

The reading stream is activated on the BS and the correlator is enabled on the UE.

 node_bs.sdr_activate_rx();
node_ue.sdr_setcorr() 

Start frame

By pulling the trigger on BS the frame starts. The first slot is defined as ‘P’ in the BS’ schedule, thus it will start transmitting the beacon stored onto its ram.

 node_bs.sdrtrigger(trig); 

Receive

The BS reads and stores the received data from the receiver stream set up and activated earlier.

 [rx_vec_iris, data0_len] = node_bs.sdrrx(); 

End streams

The streams on both nodes are closed and the Iris boards are rest.

 node_bs.sdr_close();
node_ue.sdr_close(); 

Plot received samples

If everything has gone well, we can easily plot the received vector using standard Matlab plot utilities. An example is shown below.

Last updated on 20 Mar 2019 / Published on 18 Mar 2019