# Ambiguity in the IFFT process in OFDM

I am still trying to iron out some ambiguities in my understanding of the IFFT component of OFDM modulation schemes.

So here we have a QAM symbol $$s_0$$ being multiplied with the subcarrier for that frequency bin, $$s_1$$ being multiplied with carrier 1, $$s_2$$ carrier 2, and it shows clearly that the sum of these products produces the OFDM symbol in the time domain. This would logically follow the equation:

$$c\left(t\right) = \sum^{N-1}_{n=0}{x_n e^{-i\frac{2\pi n}{N}}}$$

Where c(t) is the output symbol, x is the list of complex QAM symbols and n is the subcarrier index, N is the number of subcarriers. (Note there is no 1/N at the start and i'm not sure why that needs to be introduced)

Why is it that IDFT is stated on Wikipedia to be

$$x_n = \frac{1}{N} \sum^{N-1}_{k=0}{X_k . e^{i 2 \pi k n / N}}$$

Where x is the output list and xn is merely a single output sampling point in the time domain.

Here is an example of application of the DFT/IDFT formula :

Let : $$N = 4$$ and : $$x = \left(\begin{array}{c}x_0\\ x_1\\ x_2\\ x_3\\ \end{array} \right) = \left(\begin{array}{c}1\\ 2-i\\ -i\\ -1+2i\\ \end{array} \right)$$

then

$$X_0 = e^{-i 2 \pi 0.0/4} + e^{-i 2 \pi 0.1/4}.\left(2-i\right) + e^{-i 2 \pi 0.2/4}.\left(-i\right)+ e^{-i 2 \pi 0.3/4}.\left(-1+2i\right) = 2$$ $$X_1 = e^{-i 2 \pi 1.0/4} + e^{-i 2 \pi 1.1/4}.\left(2-i\right) + e^{-i 2 \pi 1.2/4}.\left(-i\right)+ e^{-i 2 \pi 1.3/4}.\left(-1+2i\right) = -2-2i$$ $$X_2 = e^{-i 2 \pi 2.0/4} + e^{-i 2 \pi 2.1/4}.\left(2-i\right) + e^{-i 2 \pi 2.2/4}.\left(-i\right)+ e^{-i 2 \pi 2.3/4}.\left(-1+2i\right) = -2i$$ $$X_3 = e^{-i 2 \pi 3.0/4} + e^{-i 2 \pi 3.1/4}.\left(2-i\right) + e^{-i 2 \pi 3.2/4}.\left(-i\right)+ e^{-i 2 \pi 3.3/4}.\left(-1+2i\right) = 4+4i$$

$$X = \left(\begin{array}{c}X_0\\ X_1\\ X_2\\ X_3\\ \end{array} \right) = \left(\begin{array}{c}2\\ -2-2i\\ -2i\\ 4+4i\\ \end{array} \right)$$

If we pretend this worked example is IDFT and not DFT, it clearly shows that for each output sampling point, Xk, in the time domain, every point in the constellation was multiplied by a single frequency bin and then summated. This is directly backed up by the fact that IDFT is stated to have a complexity of O(n^2) (as far as I'm aware IFDT and IFFT are the same equation but implemented differently algorithmically).

Why is this? This directly contradicts many OFDM examples and diagrams I've seen and it fundamentally makes sense to me that a single frequency would be phase and amplitude shifted by a single complex input from the constellation, and not by all of them.

• I have worked it out. In essence – Lewis Kelsey Nov 12 '18 at 13:20
• FFT (respectively IFFT) are algorithms which calculate efficiently the DFT (resp. IDFT) by taking advantages of arithmetical symmetries. – MaximGi Nov 12 '18 at 13:21
• @MaximGi I'm about to answer my own question, because I have cleared it up – Lewis Kelsey Nov 12 '18 at 13:22
• Ok, very good. I was just adding info on your subquestion about FFT/DFT difference without having fully understood your question – MaximGi Nov 12 '18 at 13:26

For 802.11a, there are 64 subcarriers with frequency $$\frac{k}{T}$$ where $$k$$ is the subcarrier number $$k \in [-32,31]$$ and $$T$$ is the symbol duration being $$3.2µs$$. $$\frac{1}{T}$$ is the minimum frequency separation in order for all 64 subcarrier sinusoids with uncertain phase to be orthogonal to eachother; $$\frac{1}{T} = \frac{1}{3.2µs}$$ = 0.3125cpµs = 312.5KHz/Ksps. $$\frac{64}{3.2µs}$$ = 20MHz/spµs; $$\frac{N}{T}$$ = 20MHz;.

In the time domain, the samples are $${x_0(t) ... x_{N-1}(t)}$$ where $$N$$ is the amount of samples (range(0,N-1) = N) = the amount of subcarriers.

The general formula is $$x_n(t) = \sum_{k=-\frac{N}{2}}^{\frac{N}{2}-1} (A+Bj)_k e^{\frac{j2\pi kf_st}{N}}$$ Where $$n$$ is the time sample number; $$t$$ is the time of the sample $$\frac{n}{f_s}$$ where the final sample $$\frac{n=63}{\frac{64}{3.2µs}}$$ = 3.15µs and sample period is $$\frac{1}{f_s}$$; $$(A+Bj)_k$$ is complex constellation point $$X_k$$ at the $$k_{th}$$ frequency bin and $$f_s$$ is the sampling frequency $$\frac{N}{T}$$ = 20MHz or $$2f_{max}$$ (which is 10MHz as the spectrum is about 0 and the highest frequency used does not exceed 10MHz; Nyquist ($$f_s = 2B$$)). Subcarriers $$[-32,-27]$$, 0 and $$[27,31]$$ are set to $$(0j+0)$$ as guard bands and subcarriers -21, -7, 7 and 21 are pilot subcarriers meaning only the remaining 48 bins are filled from the constellation.

The subcarrier frequency $$\frac{kf_s}{N}$$ in the equation is the same thing as $$\frac{k}{T}$$ because sampling frequency*symbol/signal duration = number of samples, hence sampling frequency / number of samples = 1 / symbol duration. ($$\frac{f_s}{N} = \frac{1}{T}$$). From this we also realise that $$t = \frac{n}{f_s} = \frac{Tn}{N}$$ and hence the $$n_{th}$$ granularity of the symbol period aka the $$n_{th}$$ sample. We also observe that $$\frac{n}{N} = \frac{t}{T}$$ where $$N$$ here is the total number of time domain samples.

Compute $$x_0(t)$$:

$$x_0(t) = \sum_{k=-\frac{N}{2}}^{\frac{N}{2}-1} (A+Bj)_k e^{\frac{j2\pi kf_st}{N}}$$

Simplify: $$x_0(\frac{0}{f_s}) = \sum_{k=-\frac{N}{2}}^{\frac{N}{2}-1} X_k e^{\frac{j2\pi k*0}{N}}$$ $$\small = \sum_{k=-\frac{N}{2}}^{\frac{N}{2}-1} X_k ( \cos (\frac{2\pi k*0}{N}) + j \sin (\frac{2\pi k*0}{N}))$$ Which will equal a complex value $$(C+Dj)$$, hence $$x_0(t)=(C+Dj)$$ and we have our first sample mapping from the frequency to the time domain.

This process is then repeated for all samples $${x_0(t) ... x_{N-1}(t)}$$. Then, a $$0.8µs$$ duration Guard Interval (GI) / Cyclic prefix is then added to the beginning of the OFDM waveform (+16 samples), to eliminate ISI. Guard intervals are created by using cyclic prefixes in which the last part (in this case the last 16 samples) of an OFDM symbol is copied and inserted as the first part of the OFDM symbol. The speed of light is 299.792 metres per microsecond (299.792*4 = 1,199.168m). A 20MHz signal has a wavelength of 15m and there are 80 samples in a 4 microsecond symbol (80*15 = 1,200m). The real (C) and imaginary (D) coefficients of all N samples now go through a DAC at 20Mhz and the analogue signal is modulated with the carrier sinusoid of the channel (i.e. 2.412MHz for channel 1) and is transmitted from the antenna as pictured below.

The $$x_0(t)$$ sample that is actually emitted would therefore look like the following:

$$p(\frac{0}{f_s}) \Bigg[ \sum_{k=-\frac{N}{2}}^{\frac{N}{2}-1} X_k \bigg[ Re \Big\{e^{\frac{j2\pi f_c*0}{f_s}} \Big\} \cos (\frac{2\pi k*0}{N}) + Im \Big\{e^{\frac{j2\pi f_c*0}{f_s}} \Big\} j \sin (\frac{2\pi k*0}{N}) \bigg] \Bigg]$$ Where $$e^{\frac{j2\pi f_c n}{f_s}}$$ is a sinusoid at the carrier frequency sampled at $$\frac{n}{f_s}$$ time and $$p(t)$$ is the is the pulse-shaping function $$p(t) = rect(\frac{t}{T})$$ (a rect function between $$\frac{-T}{2}$$ and $$\frac{T}{2}$$ for every time sample) which gives the frequency domain a sinc shape.

On the other end, when it does an FFT on the time samples at a certain frequency it will produce a complex number which is then correlated to the closest point on the constellation.