OFDM Demodulation problem

2 visualizaciones (últimos 30 días)
yuvi
yuvi el 21 de Mayo de 2011
hi everybody
i have a matlab code that generates 20 bits and modulate them with OFDM, my problem is that i want to demodulate the signal and receive the same bits
i have tried to demodulate without any success
ANY HELP WILL BE APPRECIATED !
the code :
close all; clear; clc;
N=10;
fs=1e6;
T=1e-3;
% random signal
bit=randint(20,1);
% serial-to-parallel converter
par=reshape(bit,2,10);
% mapper
sym=par'*[2;1];
phase=[-3*pi/4,3*pi/4,-pi/4,pi/4];
phase_sym=phase(sym+1);
% IFFT
for k=0:N-1
i=1;
for t=1/fs:1/fs:T
x(k+1,i)=cos((2*pi*k*t)/T+phase_sym(k+1))+j*sin((2*pi*k*t)/T+phase_sym(k+1));
i=i+1;
end
end
% Base signal
base=sum(x);
subplot(2,2,1), plot(real(base))
% RF signal
f=fs*(-0.5:1/length(base):0.5-1/length(base));
rf=real(base.*exp(j*2*pi*100e3*t));
subplot(2,2,2), plot(f,rf)
% Signal in frequency domain
base_f=abs(fftshift(fft(rf)))/length(base);
subplot(2,2,3), plot(f,base_f)
% First three orthogonal sub-signals
y=[zeros(10,20000),x,zeros(10,20000)];
y2=abs(fftshift(fft(real(y(2,:)))))/length(y);
y3=abs(fftshift(fft(real(y(3,:)))))/length(y);
y4=abs(fftshift(fft(real(y(4,:)))))/length(y);
f=fs*(-0.5:1/length(y):0.5-1/length(y));
subplot(2,2,4), plot(f,y2,'r',f,y3,'b',f,y4,'g')

Respuestas (1)

Yella
Yella el 14 de Jun. de 2011
Am sorry I am not getting ur code... did u do demodulation?....I think u generated to subcarriers of an OFDM system..u didnt convolve the data with channel coefficients before transmitting.. for demodulation u have to convert it back from parallel to serial and do ifft to convert the signal into time domain... thanks

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by