IFFT and FFT
Take the IFFT and FFT operations on digital symbols to modulate and demodulate the data bits.
In the OFDM block diagram at the transmitter side, the next operation is an IDFT.
IFFT
As we have learned earlier, an IDFT (or DFT) is implemented in an efficient manner through an IFFT (or FFT) algorithm. Therefore, a block of data symbols is an input in an IFFT block that generates the corresponding time-domain signal.
The following code helps us understand this concept:
Press + to interact
import numpy as npimport matplotlib.pyplot as plfigWidth = 20figHeight = 10# Generating the signalfs = 1000 # sample rateTs = 1/fs # sample timeN = 64 # Block length and FFT size# Binary PSK or ASKconstellation = np.array([-1, 1])bits = np.random.randint(2, size=(N))symbols = constellation[bits]# ignore the pilots and null subcarriersmodulated_signal = np.sqrt(N)*np.fft.ifft(symbols, N)# Plotting the signalfig, axs = pl.subplots(2, figsize=(figWidth, figHeight))axs[0].plot(range(N), np.real(modulated_signal), color='b', linewidth=2)axs[1].plot(range(N), np.imag(modulated_signal), color='b', linewidth=2)for ax in axs:ax.axhline(y=0, color='k', linewidth=1)ax.axvline(x=0, color='k', linewidth=1)ax.set_xlim(0,N)ax.set_xticks(np.linspace(0,N,9))ax.set_ylim(-2, 2)ax.set_yticks(np.arange(-2, 2+1, 1))ax.tick_params(labelsize=18)ax.set_xlabel('Time', fontsize=18)ax.grid()axs[0].set_ylabel("Re $x(t)$", fontsize=18)axs[1].set_ylabel("Im $x(t)$", fontsize=18)pl.savefig('output/modulated-signal.png', bbox_inches='tight')
Remember that in the lesson on symmetry, we learned that the conjugate symmetric output signal (around sample ...