6.888 Lab 1: OFDM Transceiver

Lab 1 Part A: Due Friday Sept. 20, 11:59 pm
Lab 1 Part B: Due Friday Sept. 27, 11:59 pm

Introduction

In this lab, you will learn how to design a simple OFDM physical layer chain. You will need to design and write the code for each block of the RX and TX chains shown below. The code for this lab will be written in matlab. We will provide you with a skeleton code. Ideally, you will only need to modify the places where you see : "... add your code here ..." . We will provide you with wireless signals on which you can test your code. The lab will be divided into several tasks. Each task will require you to run some test script which will output a file or plot a figure. You will have to keep the figures and the output files and submit them along with your src code.

For a detialed description of each block's functionality, you can refer to chapter 3 of this THESIS, and chapter 2 of TEXTBOOK 1.


You can download a copy of the lab code here : 6.888_lab1.zip

The code has 4 subfolders: The above folders should contain the following files:

SRC_CODE Test_Scripts Mat_Files Results
tx_ofdm_chain.m test_tx_ofdm_chain.m Test_TX.mat
Test_TX_R.mat
Result_TX_Chain.mat
Result_TX_Chain.fig
packet_detection.m test_packet_detection.m Test_Packets.mat
Test_Packets_R.mat
Result_Pkt_Start.mat
estimate_channel.m
correct_channel.m
test_estimate_channel.m
test_correct_channel.m
Test_Channel_R.matResult_Channel_Estimateion.mat
Result_Channel.fig
Result_Cons_Channel_Corr.fig
rx_ofdm_chain_synced.m test_rx_ofdm_chain_synched.m Test_RX_Synced.mat
Test_RX_Synced_R.mat
Result_RX_Chain_Synced.mat
estimate_cfo.m
correct_cfo.m
test_estimate_cfo.m
test_correct_cfo.m
Test_CFO_R.matResult_CFO_estimation.mat
Result_CFO_Correction.mat
Result_Cons_CFO_Corr.fig
estimate_residual_cfo_sfo.m
correct_residual_cfo_sfo.m
test_phase_tracking.m Test_Phase_Tracking_R.matResult_Phase_Tracking.mat
Result_Phase_Tracking.fig
rx_ofdm_chain.m test_rx_ofdm_chain.m Test_RX_Chain.mat
Test_RX_Chain_R.mat
Result_RX_Chain.mat
convert_bin_index_fft_to_normal.m
convert_bin_index_normal_to_fft.m
. Parameters.mat .


Lab 1 : Part A : OFDM Basic RX/TX

Due Friday Sept. 20, 11:59 pm

In the first part of the lab, we will assume that the transmitter and receiver oscillators are synchronized. You do not need to estimate and correct for the carrier frequency offset (CFO) or perform phase tracking. Hence, you do not need to implement the 2nd and 5th blocks of the RX Chain. For the purpose of this lab, we will only use BPSK modulation. For both parts of this lab, you will use the OFDM paramters shown in the table below. The wariables are stored in the matlab file: Parameters.mat. The code loads these variables into the workspace so you can immediately use them.

Parameter VariableValue
Carrier Frequency fc5.25 GHz
Sampling frequency fs128 MHz
Subcarrier width w1 MHz
Number of Subcarriers / Symbol length num_bins 128 bins / samples
Cyclic Prefix cp 51 samples
Number of preamble symbols num_syms_preamble8
Number of data symbols num_syms_data 72
Signal Length num_samples13963
Number of data subcarriers num_bins_data 92
Number of pilot subcarriers num_bins_pilots 8
Pilot Subcarriers pilots [-39, -28, -17, -6, 6, 17, 28, 39]
Gaurd/ Unused Subcarriers gaurd_bins [-64,...,-51, 0, 51,...,63]
Preamble Bits bits_preamble ...
Pilot Bits bits_pilots [1 0 1 0 0 0 1 0]

Task 1: TX Chain

Implement the function tx_ofdm_chain.m. The function should take the data bits as input and should output the complex signal. To test your code, use the file Test_TX.mat. This file has 2 variables: bits_data and tx_signal which is the expected correct output.

Task 2: Packet Detection

Implement the function packet_detection.m. It should take a complex signal as input and return the index of the first sample in the packet. You can use the signals in Test_Packets.mat to check if your packet detection works. This file has two variables: signals which has 100 different received complex wireless signals and packets_start_index which has 100 indicies correponding to the start of each packet.

Task 3: Channel Estimation

Implement the function estimate_channel.m. The function should take as input two received OFDM symbols and should output the complex wireless channel estimate. Then, implement correct_channel.m. The function should take an OFDM symbol in the frequency domain along with an estimate of the channel and should output the symbol after compensating for the channel.

Task 4: RX Chain

Implement the function rx_ofdm_chain_synced.m. The function should take as input a complex signal and output the data bits (you can assume that the pilots are data bits for this task). To test your code, use the file Test_RX_Synced.mat. This file has 2 variables: bits_data and rx_signal.

Hints:

Submit:

Submit your code via the class's submission website, located here: https://haithamh.scripts.mit.edu:444/6.888/handin.py

You may use your MIT Certificate or request an API key via email to log in for the first time.

Compress you folder and name it lab1a-handin.zip.

Upload that file to the submission website via the webpage or use curl and your API key:



Lab 1 : Part B : OFDM Phase Tracking

Due Friday Sept. 27, 11:59 pm

In this lab, you will implement the CFO estimation and correction block and the phase tracking block.

Task 1: CFO Estimation and Correction

Implement the function estimate_cfo.m. The function should take as input two received OFDM symbols and output an estimate of the CFO. Then, implement correct_cfo.m. The function should take a signal in the time domain along with an estimate of the CFO and should output the signal compensating for the CFO.

Task 2: Phase Tracking

Implement the function estimate_residual_cfo_sfo.m. The function should take as input a received OFDM symbol in the frequency domain along with an estimate of the the channel and should output an estimate of the residual CFO and SFO. Then, implement correct_residual_cfo_sfo.m. The function should take as input an estimate of the channel along with the residual CFO and SFO and should output a new estimate of the channel after compensating for CFO and SFO.

Task 3: RX Chain

Implement the function rx_ofdm_chain.m. The function should take as input a complex signal and output the data bits. To test your code, use the file Test_RX.mat. This file has 2 variables: bits_data and rx_signal.

Hints:

Submit:

Submit your code via the class's submission website, located here: https://haithamh.scripts.mit.edu:444/6.888/handin.py

You may use your MIT Certificate or request an API key via email to log in for the first time.

Compress you folder and name it lab1b-handin.zip.

Upload that file to the submission website via the webpage or use curl and your API key: