IFFT and FFT

Take the IFFT and FFT operations on digital symbols to modulate and demodulate the data bits.

We'll cover the following...

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 NN 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 np
import matplotlib.pyplot as pl
figWidth = 20
figHeight = 10
# Generating the signal
fs = 1000 # sample rate
Ts = 1/fs # sample time
N = 64 # Block length and FFT size
# Binary PSK or ASK
constellation = np.array([-1, 1])
bits = np.random.randint(2, size=(N))
symbols = constellation[bits]
# ignore the pilots and null subcarriers
modulated_signal = np.sqrt(N)*np.fft.ifft(symbols, N)
# Plotting the signal
fig, 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 3232 ...