DSPRelated.com
Forums

IFFT and FFT of a real signal in OFDM

Started by chamzcob December 19, 2013
Hi,
 
I'm developing an OFDM system.  In the transmitter I have taken 4
transmission symbols. Then zero padding is done according to IFFT size and
to get a real signal after IFFT, I have taken the symmetry of that. The
problem is I'm not receiving the same transmitted symbol stream after doing
FFT at the receiver (transmission channel is not included yet). Please
correct my MATLAB code. 

clc 
close all 
clear all 

n = 4; 
n_bits = 2^n; %Number of bits to process 
M = 4; %Size of the signal constellation 
m = log2(M); %Number of bits per symbol 
IFFT_size = 2^6; %Size of overall usable symbol size (without cyclic
prefix) 

num_zeros = (IFFT_size/2)-4; %Number of zeros 

z_zero =[1;2;3;4;zeros(num_zeros,1)]; %Zero-Padding 
z_symmetry = flipud(z_zero); %Taking symmetry to get a real signal 
z_full = [z_zero;0;z_symmetry(1:length(z_symmetry)-1)]; 
subplot(2,1,1); 
stem(z_full); 

z = ifft(z_full); 
w = fft((z)); 
subplot(2,1,2); 
stem(w);
 
Thank You.


	 

_____________________________		
Posted through www.DSPRelated.com
>Hi, > >I'm developing an OFDM system. In the transmitter I have taken 4 >transmission symbols. Then zero padding is done according to IFFT size
and
>to get a real signal after IFFT, I have taken the symmetry of that. The >problem is I'm not receiving the same transmitted symbol stream after
doing
>FFT at the receiver (transmission channel is not included yet). Please >correct my MATLAB code. > >clc >close all >clear all > >n = 4; >n_bits = 2^n; %Number of bits to process >M = 4; %Size of the signal constellation >m = log2(M); %Number of bits per symbol >IFFT_size = 2^6; %Size of overall usable symbol size (without cyclic >prefix) > >num_zeros = (IFFT_size/2)-4; %Number of zeros > >z_zero =[1;2;3;4;zeros(num_zeros,1)]; %Zero-Padding >z_symmetry = flipud(z_zero); %Taking symmetry to get a real signal >z_full = [z_zero;0;z_symmetry(1:length(z_symmetry)-1)]; >subplot(2,1,1); >stem(z_full); > >z = ifft(z_full); >w = fft((z)); >subplot(2,1,2); >stem(w); > >Thank You. > > > > >_____________________________ >Posted through www.DSPRelated.com >
change the line w = fft((z)) to w = fft(real(z)) -Doug _____________________________ Posted through www.DSPRelated.com
>>Hi, >> >>I'm developing an OFDM system. In the transmitter I have taken 4 >>transmission symbols. Then zero padding is done according to IFFT size >and >>to get a real signal after IFFT, I have taken the symmetry of that. The >>problem is I'm not receiving the same transmitted symbol stream after >doing >>FFT at the receiver (transmission channel is not included yet). Please >>correct my MATLAB code. >> >>clc >>close all >>clear all >> >>n = 4; >>n_bits = 2^n; %Number of bits to process >>M = 4; %Size of the signal constellation >>m = log2(M); %Number of bits per symbol >>IFFT_size = 2^6; %Size of overall usable symbol size (without cyclic >>prefix) >> >>num_zeros = (IFFT_size/2)-4; %Number of zeros >> >>z_zero =[1;2;3;4;zeros(num_zeros,1)]; %Zero-Padding >>z_symmetry = flipud(z_zero); %Taking symmetry to get a real signal >>z_full = [z_zero;0;z_symmetry(1:length(z_symmetry)-1)]; >>subplot(2,1,1); >>stem(z_full); >> >>z = ifft(z_full); >>w = fft((z)); >>subplot(2,1,2); >>stem(w); >> >>Thank You. >> >> >> >> >>_____________________________ >>Posted through www.DSPRelated.com >> > >change the line > >w = fft((z)) > >to > >w = fft(real(z)) > >-Doug > >_____________________________ >Posted through www.DSPRelated.com >
I meant stem(real(w)) _____________________________ Posted through www.DSPRelated.com