4

Click here to load reader

OFDM – Orthogonal Frequecy Division Multiplexing _ 5amperes

  • Upload
    mariem

  • View
    220

  • Download
    6

Embed Size (px)

DESCRIPTION

ofdm

Citation preview

Page 1: OFDM – Orthogonal Frequecy Division Multiplexing _ 5amperes

8/4/2015 OFDM – Orthogonal Frequecy Division Multiplexing | 5amperes

http://www.5amperes.com/ofdm­orthogonal­frequecy­division­multiplexing/ 1/4

OFDM – Orthogonal Frequecy DivisionMultiplexingF COMMUNICATIONS c COMMENTS OFF

Orthogonal frequency-division multiplexing (OFDM)

It is a method of encoding digital data on multiple carrier frequencies. The primary advantage ofOFDM over single-carrier schemes is its ability to cope with severe channel conditions (forexample, attenuation of high frequencies in a long copper wire, narrowband interference andfrequency-selective fading due to multipath) without complex equalization ᆃ�lters.

This section describes a simple idealized OFDM system model suitable for a time-invariantAWGN channel.

Transmitter

An OFDM carrier signal is the sum of a number of orthogonal sub-carriers, with baseband dataon each sub-carrier being independently modulated commonly using some type of quadratureamplitude modulation (QAM) or phase-shift keying (PSK). This composite baseband signal istypically used to modulate a main RF carrier.

5amperesIlluminate your intellection

Page 2: OFDM – Orthogonal Frequecy Division Multiplexing _ 5amperes

8/4/2015 OFDM – Orthogonal Frequecy Division Multiplexing | 5amperes

http://www.5amperes.com/ofdm­orthogonal­frequecy­division­multiplexing/ 2/4

S[n] is a serial stream of binary digits. By inverse multiplexing, these are ᆃ�rst demultiplexed intoN parallel streams, and each one mapped to a (possibly complex) symbol stream using somemodulation constellation (QAM, PSK, etc.). Note that the constellations may be di瑳楬erent, sosome 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-domainsamples. These samples are then quadrature-mixed to passband in the standard way. The realand imaginary components are ᆃ�rst converted to the analogue domain using digital-to-analogueconverters (DACs); the analogue signals are then used to modulate cosine and sine waves at thecarrier frequency, fc, respectively. These signals are then summed to give the transmissionsignal, s(t).

Receiver

The receiver picks up the signal r(t), which is then quadrature-mixed down to baseband usingcosine and sine waves at the carrier frequency. This also creates signals centered on 2fc, so low-pass ᆃ�lters are used to reject these. The baseband signals are then sampled and digitised usinganalog-to-digital converters (ADCs), and a forward FFT is used to convert back to the frequencydomain.

This returns parallel streams, each of which is converted to a binary stream using anappropriate 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):

12

clc;clear all

Page 3: OFDM – Orthogonal Frequecy Division Multiplexing _ 5amperes

8/4/2015 OFDM – Orthogonal Frequecy Division Multiplexing | 5amperes

http://www.5amperes.com/ofdm­orthogonal­frequecy­division­multiplexing/ 3/4

3456789

10111213141516171819202122232425262728293031323334353637

nFFT = 64; nDSC = 52; nBitPerSym = 52; nSym = 10^4; EbN0dB = [0:10]; EsN0dB = EbN0dB + 10*log10(nDSC/nFFT) + 10*log10(64/80);for ii = 1:length(EbN0dB)   ipBit = randint(1,nBitPerSym*nSym);    trellis = poly2trellis([5 4],[23 35 0; 0 5 13]);  codedata = convenc(ipBit, trellis);    ipMod = 2*ipBit‐1;     ipMod1 = 2*codedata‐1;     [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(ipBitHat ‐ ipBit),2);   nErr1(ii) = size(find(decodedata ‐ ipBit),2); end Ber = nErr/(nSym*nBitPerSym);Ber1 = nErr1/(nSym*nBitPerSym); semilogy(EbN0dB,Ber1,'gx‐','LineWidth',2);hold onsemilogy(EbN0dB,Ber,'mx‐','LineWidth',2);% axis([0 10 10^‐5 2*10^‐2])grid onlegend('BER Using Convolutional Code', 'BER without Convolutional code');xlabel('Eb/No, dB')ylabel('Bit Error Rate')title('Bit error rate curve for OFDM')

FUNCTION OFDM_BLOCK:

123456789

1011121314151617

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).';

Page 4: OFDM – Orthogonal Frequecy Division Multiplexing _ 5amperes

8/4/2015 OFDM – Orthogonal Frequecy Division Multiplexing | 5amperes

http://www.5amperes.com/ofdm­orthogonal­frequecy­division­multiplexing/ 4/4

← PN Sequence, Gold Codes. Amplitude, Phase , Frequency- Shift Keying →

5amperes © 2015. All Rights Reserved.

Powered by WordPress.