# OFDM System Simulation [TOC] In this assignment, we run the simulation to get the spectrum and BER performance of OFDM transmission with different value in each parameter. This simulation is using Octave. The OFDM sample code can be accessed at the following link for example FFT size 64: http://www.dsplog.com/db-install/wp-content/uploads/2008/02/scriptofdmtx.m http://www.dsplog.com/2008/02/03/understanding-an-ofdm-transmission/ ## Assignment 2A: OFDM Spectrum **FFT Size 64** For this FFT size, the script where BPSK modulated signal is transmitted on the 52 used subcarriers. Assigning to multiple OFDM symbols where data subcarriers from -26 to -1 and +1 to +26 are used. | Parameter | Value | | -------- | -------- | | FFT Size | 64 | | Data Subcarrier | 52 | | FFT Sampling Frequency | 20 MHz | | Subcarrier Spacing | 312.5 kHz | | Used Subcarrier Index | {-26 to -1, +1 to +26} | | Cylic Prefix Duration | Tcp 0.8 us | | Data Symbol Duration | Td 3.2 us | | Total Symbol Duration | Ts 4us | After the script run successfully, the graph shown as following figure: ![](https://i.imgur.com/5dIf998.jpg) It shows that the power spectral density is around -31 if we use FFT size 64. **FFT Size 128** For this FFT size, the script where BPSK modulated signal is transmitted on the 128 used subcarriers. Assigning to multiple OFDM symbols where data subcarriers from -52 to -1 and +1 to +52 are used. | Parameter | Value | | -------- | -------- | | FFT Size | 128 | | Data Subcarrier | 104 | | FFT Sampling Frequency | 20 MHz | | Subcarrier Spacing | 156.25 kHz | | Used Subcarrier Index | {-52 to -1, +1 to +52} | | Cylic Prefix Duration | Tcp 0.8 us | | Data Symbol Duration | Td 3.2 us | | Total Symbol Duration | Ts 4us | After the script run successfully, the graph shown as following figure: ![](https://i.imgur.com/VH91u6t.jpg) It shows that the power spectral density is around -33 if we use FFT size 128. **FFT Size 256** For this FFT size, the script where BPSK modulated signal is transmitted on the 256 used subcarriers. Assigning to multiple OFDM symbols where data subcarriers from -104 to -1 and +1 to +104 are used. | Parameter | Value | | -------- | -------- | | FFT Size | 256 | | Data Subcarrier | 208 | | FFT Sampling Frequency | 20 MHz | | Subcarrier Spacing | 78.125 kHz | | Used Subcarrier Index | {-104 to -1, +1 to +104} | | Cylic Prefix Duration | Tcp 0.8 us | | Data Symbol Duration | Td 3.2 us | | Total Symbol Duration | Ts 4us | After the script run successfully, the graph shown as following figure: ![](https://i.imgur.com/uqecHqs.jpg) It shows that the power spectral density is around -36 if we use FFT size 256. **Analysis:** From the 3 figures above, the power spectral density will decrease as the number of FFT increase. As we can see, the result for using FFT size 64 is –31, FFT size 128 is –33, and FFT is –36. This can occur because the power spectral density is distributed to different number of subcarriers. ## Assignment 2B: OFDM Performance **FFT Size 64** For this simulation, there are additional cyclic prefix with size 16, so the total sample is 64 + 16 = 80. We can get the cyclic prefix on the index is 49 to 64. | Parameter | Value | | -------- | -------- | | FFT Size | 64 | | Data Subcarrier | 52 | | FFT Sampling Frequency | 20 MHz | | Subcarrier Spacing | 312.5 kHz | | Used Subcarrier Index | {-26 to -1, +1 to +26} | | Cylic Prefix Duration | Tcp 0.8 us | | Data Symbol Duration | Td 3.2 us | | Total Symbol Duration | Ts 4us | After the script run successfully, the graph shown as following figure: ![](https://i.imgur.com/LxVWxzG.jpg) **FFT Size 128** For this simulation, there are additional cyclic prefix with size 16, so the total sample is 128 + 16 = 144. We can get the cyclic prefix on the index is 113 to 128. | Parameter | Value | | -------- | -------- | | FFT Size | 128 | | Data Subcarrier | 104 | | FFT Sampling Frequency | 20 MHz | | Subcarrier Spacing | 156.25 kHz | | Used Subcarrier Index | {-52 to -1, +1 to +52} | | Cylic Prefix Duration | Tcp 0.8 us | | Data Symbol Duration | Td 3.2 us | | Total Symbol Duration | Ts 4us | After the script run successfully, the graph shown as following figure: ![](https://i.imgur.com/EBTcaNE.jpg) **FFT Size 256** For this simulation, there are additional cyclic prefix with size 16, so the total sample is 256 + 16 = 272. We can get the cyclic prefix on the index is 241 to 256. | Parameter | Value | | -------- | -------- | | FFT Size | 256 | | Data Subcarrier | 208 | | FFT Sampling Frequency | 20 MHz | | Subcarrier Spacing | 78.125 kHz | | Used Subcarrier Index | {-104 to -1, +1 to +104} | | Cylic Prefix Duration | Tcp 0.8 us | | Data Symbol Duration | Td 3.2 us | | Total Symbol Duration | Ts 4us | After the script run successfully, the graph shown as following figure: ![](https://i.imgur.com/K0xXbcF.jpg) **Analysis:** From the result of simulation above, we can see the graph has two lines that perform theory and simulation. For the theory line, the result has same BER value when Eb/No value is 0 from three simulation with various FFT size, because they use same modulation which is BPSK modulation. For the simulation line there are differences BER perform between FFT size (64, 128, and 256). BER decrease as FFT size gets larger can be seen when the Eb/No is large enough, and it show between BER performance in FFT size 64 and FFT size 128.