Professional Documents
Culture Documents
OFDMOrthogonalFrequecyDivisionMultiplexing|5amperes
5amperes
c COMMENTS OFF
http://www.5amperes.com/ofdmorthogonalfrequecydivisionmultiplexing/
1/4
8/4/2015
OFDMOrthogonalFrequecyDivisionMultiplexing|5amperes
S[n] is a serial stream of binary digits. By inverse multiplexing, these are rst demultiplexed into
N parallel streams, and each one mapped to a (possibly complex) symbol stream using some
modulation constellation (QAM, PSK, etc.). Note that the constellations may be dierent, so
some streams may carry a higher bit-rate than others.
An inverse FFT is computed on each set of symbols, giving a set of complex time-domain
samples. These samples are then quadrature-mixed to passband in the standard way. The real
and imaginary components are rst converted to the analogue domain using digital-to-analogue
converters (DACs); the analogue signals are then used to modulate cosine and sine waves at the
carrier frequency, fc, respectively. These signals are then summed to give the transmission
signal, s(t).
Receiver
The receiver picks up the signal r(t), which is then quadrature-mixed down to baseband using
cosine and sine waves at the carrier frequency. This also creates signals centered on 2fc, so lowpass lters are used to reject these. The baseband signals are then sampled and digitised using
analog-to-digital converters (ADCs), and a forward FFT is used to convert back to the frequency
domain.
This returns parallel streams, each of which is converted to a binary stream using an
appropriate symbol detector. These streams are then re-combined into a serial stream, s[n]
estimate, which is an estimate of the original binary stream at the transmitter.
MATLAB CODE :
BER Performance of OFDM Vs OFDM with Error correcting codes(convolutional code).
MAIN FUNCTION(you need to run this):
1 clc;
2 clearall
http://www.5amperes.com/ofdmorthogonalfrequecydivisionmultiplexing/
2/4
8/4/2015
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
OFDMOrthogonalFrequecyDivisionMultiplexing|5amperes
nFFT=64;
nDSC=52;
nBitPerSym=52;
nSym=10^4;
EbN0dB=[0:10];
EsN0dB=EbN0dB+10*log10(nDSC/nFFT)+10*log10(64/80);
forii=1:length(EbN0dB)
ipBit=randint(1,nBitPerSym*nSym);
trellis=poly2trellis([54],[23350;0513]);
codedata=convenc(ipBit,trellis);
ipMod=2*ipBit1;
ipMod1=2*codedata1;
[ipBitHat]=ofdm_block(ipMod,nBitPerSym,nSym,nDSC,EsN0dB(ii),nFFT);
nBitPerSym1=52;
nSym1=1.5*10^4;
[ipBitHat1]=ofdm_block(ipMod1,nBitPerSym1,nSym1,nDSC,EsN0dB(ii),nFFT);
decodedata=vitdec(ipBitHat1,trellis,5,'trunc','hard');
nErr(ii)=size(find(ipBitHatipBit),2);
nErr1(ii)=size(find(decodedataipBit),2);
end
Ber=nErr/(nSym*nBitPerSym);
Ber1=nErr1/(nSym*nBitPerSym);
semilogy(EbN0dB,Ber1,'gx','LineWidth',2);
holdon
semilogy(EbN0dB,Ber,'mx','LineWidth',2);
%axis([01010^52*10^2])
gridon
legend('BERUsingConvolutionalCode','BERwithoutConvolutionalcode');
xlabel('Eb/No,dB')
ylabel('BitErrorRate')
title('BiterrorratecurveforOFDM')
FUNCTION OFDM_BLOCK:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function[ipBitHat]=ofdm_block(ipMod,nBitPerSym,nSym,nDSC,EsN0dB,nFFT)
ipMod=reshape(ipMod,nBitPerSym,nSym).';
xF=[zeros(nSym,6)ipMod(:,[1:nBitPerSym/2])zeros(nSym,1)ipMod(:,[nBitPerSym/2+1:nBitPerSym
xt=(nFFT/sqrt(nDSC))*ifft(fftshift(xF.')).';
xt=[xt(:,[49:64])xt];
xt=reshape(xt.',1,nSym*80);
nt=1/sqrt(2)*[randn(1,nSym*80)+1j*randn(1,nSym*80)];
yt=sqrt(80/64)*xt+10^(EsN0dB/20)*nt;
yt=reshape(yt.',80,nSym).';
yt=yt(:,[17:80]);
yF=(sqrt(nDSC)/nFFT)*fftshift(fft(yt.')).';
yMod=yF(:,[6+[1:nBitPerSym/2]7+[nBitPerSym/2+1:nBitPerSym]]);
ipModHat=2*floor(real(yMod/2))+1;
ipModHat(ipModHat>1)=+1;
ipModHat(ipModHat<1)=1;
ipBitHat=(ipModHat+1)/2;
ipBitHat=reshape(ipBitHat.',nBitPerSym*nSym,1).';
http://www.5amperes.com/ofdmorthogonalfrequecydivisionmultiplexing/
3/4
8/4/2015
OFDMOrthogonalFrequecyDivisionMultiplexing|5amperes
http://www.5amperes.com/ofdmorthogonalfrequecydivisionmultiplexing/
4/4