f



ofdm question

Hello,

I tried to implement very simple OFDM channel. However i met an issue, i cannot solve myself. Could you please help me ?
This is the code:

data=randint(1,k,n);
modulated = pskmod(data);
OFDMmodulated=ifft(modulated);
receivedmodulated = fft(OFDMmodulated);
out = (receivedmodulated ~= modulated);


Why do I got every time receivedmodulated different from modulated, if k is greater than 8 ? I think this is something with fft/ifft usage.

thank you for your help
Robert
0
Robert
11/23/2009 10:10:21 PM
comp.soft-sys.matlab 211266 articles. 15 followers. lunamoonmoon (258) is leader. Post Follow

1 Replies
347 Views

Similar Articles

[PageSpeed] 19

Hi,

I "improved ?" my programm a little bit:
function out = smallofdm

k=8
n=4
data=randint(1,k,n);

modulated = pskmod(data)
OFDMmodulated=ifft(modulated,2*k);
receivedmodulated1 = fft(OFDMmodulated, 2*k)
receivedmodulated = [receivedmodulated1(1:k)]
if receivedmodulated == modulated
    msgbox('succeed!')
else
    msgbox('not succeed')
end


and now it seems it is almost good. But I am still confused.
my questions are now:
1) why I need to do fft 2*k points for the vector of the length k ? is it something with a Nyquist frequency ?

2) why i got 'not succeed' message, when the vectors seems to be equal... ? I saw while displaying vectors are like:
receivedmodulated =

  Columns 1 through 7 

        0 - 1.0000i  -0.0000 - 1.0000i   1.0000 - 0.0000i  -0.0000 + 1.0000i   1.0000             0.0000 + 1.0000i   1.0000 + 0.0000i

  Column 8 

   1.0000 - 0.0000i

How to make value like -0.000i or other values close to zero just not important ? I can imagine it is something with round-off values by PC, but how to workaround it in my code ?

thank you for the help
Robert
0
Robert
11/25/2009 11:10:23 PM
Reply: