Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Why using "ifft(fftshift(xF))" for IFFT in OFDM instead of ifft(xF)

Status
Not open for further replies.

mazdaspring

Advanced Member level 4
Joined
Feb 18, 2008
Messages
108
Helped
4
Reputation
8
Reaction score
3
Trophy points
1,298
Activity points
2,030
I have a look OFDM over Rayleigh channel matlab code from DSPlog website. For IFFT function, the guy use

xt = (nFFT/sqrt(nDSC))*ifft(fftshift(xF.')).';
% xF=transmitted signal in Frequency domain
% nFFT= FFT size
% nDSC = number of data subcarriers

He uses this IFFT function to apply IFFT to the transmitted signal.

I am wondering why can't we just use plain IFFT function like
xF=nFFT/sqrt(nDSC)*ifft((xF.')).';


.................More important is that...............
when I use this xF=nFFT/sqrt(nDSC)*ifft((xF.')).'; I will get a BER against Eb/No graph of straight line.
which seems to result BER = 0 in all level of Eb/No

but when I use ifft function of first one, I will get a perfect result!


Can anyone explain please?
 

fftshift is used when the center point of the spectrum is at zero frequency (DC).
 

fftshift is used when the center point of the spectrum is at zero frequency (DC).

What happen if you don't use fftshift?

and what is DC? can you explain more about DC (which is related to center point of the spectrum is at zero frequency). Thank you.
 
Last edited:

The DC will be considered as the first element.
 

Hi

If we consider a 128 point ifft in that the range of tones is from (1-128) which corresponds to negative to positive frequencies

So we need to use the fftshift to shift the positive edge to negative frequencies

Regards
M Kalyan srinivas
 

I am sorry. I am quite new to this kind of stuff. Would you mind explain to me more please. I don't get it.

Assume we have the following vector " [-1 1 4 1 -1] if you directly apply ifft, the first element will be treated as a DC element and the second is the first positive frequency and so on, but if you want the vector to be treated as a DSS (double sided spectrum) then use fftshift; thus the DC is 4 while first negative frequency is 1 and first +ve frequency is 1 and so on.
 

Assume we have the following vector " [-1 1 4 1 -1] if you directly apply ifft, the first element will be treated as a DC element and the second is the first positive frequency and so on, but if you want the vector to be treated as a DSS (double sided spectrum) then use fftshift; thus the DC is 4 while first negative frequency is 1 and first +ve frequency is 1 and so on.


Thank you very much. This is very clear. However could you please explain to me how DC is related in here and why does it has to be considered in here? What is DC for? Is DC direct current? I am sorry again. I forgot the basic background. Or could you please recommend me the source where can I read about DC, and why it has to be counted in IFFT/FFT.

Another question is FFT/IFFT size if always even number e.g. 64, 128... which one of the middle element will be chosen to be DC element? let's say input vector is [-1 1 -1 1 -1 -1] ...which one will be DC element?
 

DC is the frequency component with zero frequency. You can transfer a time domain signal to the frequency domain to be a summation of sinusoidal waves of different frequencies, one of which is the zero frequency (constant). The FFT algorithm applies this transform in a fast way but the FFT hardware requires the FFT size to be a power of 2 (2,4,8,16,32,...etc). For the vector you wrote it is even numbered and is handled by MATLAB differently but I can't remember how.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top