sc_fdma

11
Ahsanullah University of Science & Technology Department of Computer Science & Engineering Course No: CSE 4100 Course Title: Project & Thesis - I Topic: Single Carrier FDMA Submitted By: 1. Md. Aminul Islam 11.02.04.089 2. Md. Rashedul Islam 11.02.04.090 3. Maruf Nayeem Siddiqui 11.02.04.067 4. Md. Abu Saleh 10.02.04.076

Upload: rashedulislamriyad

Post on 02-Sep-2015

51 views

Category:

Documents


27 download

DESCRIPTION

Discussion on SCFDMA

TRANSCRIPT

  • Ahsanullah University of Science & Technology Department of Computer Science & Engineering

    Course No: CSE 4100

    Course Title: Project & Thesis - I

    Topic: Single Carrier FDMA

    Submitted By:

    1. Md. Aminul Islam 11.02.04.089

    2. Md. Rashedul Islam 11.02.04.090

    3. Maruf Nayeem Siddiqui 11.02.04.067

    4. Md. Abu Saleh 10.02.04.076

  • Necessity of Modulation in Electronic Communication

    Any communications medium: e.g. free space - radio waves, Air - Sound waves

    or radio waves, Optical Fiber - Light, Copper Wires Electrical Energy (with

    frequency limits of the copper wire construction) is made for a certain type of

    signal. But if the signal we want to send is not compatible with the medium, then

    it does not travel well.

    Modulation changes the information we want to send from its original form, into

    one that is more compatible with the medium we are trying to use.

    Modulation Scheme

    Modulation is the "message" or the "intelligence" that is impressed on a radio

    frequency (RF) carrier. When we transmit a signal, we generate a carrier

    frequency, and then we modulate it. We "add" the message or the information we

    wish to transmit by modulating the carrier in some way. There are at least a

    dozen different modulation schemes ranging from simple to real head scratchers.

    They either modify the amplitude, the frequency or the phase of the carrier. Here

    we will discuss about Single Carrier FDMA.

  • OFDMA & SC-FDMA

    Single-carrier FDMA (SC-FDMA) is a frequency-division multiple

    access scheme. Like other multiple access schemes (TDMA, FDMA, CDMA,

    OFDMA), it deals with the assignment of multiple users to a shared

    communication resource. SC-FDMA can be interpreted as a linearly

    precoded OFDMA scheme, in the sense that it has an additional DFT processing

    step preceding the conventional OFDMA processing.

    In order to transition from today's 3rd generation (3G) communications systems

    to meet the needs of 4th generation (4G) systems, the 3rd Generation Partnership

    Project (3GPP) has released the Long Term Evolution (LTE) specification. Among

    the numerous differences between these generations are changes in the physical

    layer (PHY), specifically in the modulation and multiple access schemes. While

    its parent generation relied on variations of Code Division Multiple Access

    (CDMA), LTE implements Orthogonal Frequency Division Multiplexing (OFDM)

    for its downlink and Single-Carrier Frequency Division Multiple Access (SC-

    FDMA) for its uplink. The purpose of this project is to investigate the reasoning

    for this discord between uplink and downlink modulation schemes; specifically,

    why Orthogonal Frequency Division Multiple-Access (OFDMA) was not used as

    the uplink.

    The bases used for comparison between OFDMA & SC- FDMA will be capacity,

    outrage probability and peak-to-average power ratio (PAPR). While the first two

    bases have always been traditionally used in analyses, PAPR is especially

    important for the uplink of mobile devices. Amplifiers used in in circuits today

    have a linear region in which they must operate so as not to introduce signal

    distortion, and it is ideal to run with maximum amplification. However, if there

    is a high PAPR, the device is forced to run with lower amplification so the peak

    power does not lie in the non-linear gain region. The farther these amplifiers are

    operated from the peak, the less power efficient the device become, leading to

    increased power consumption and while this might not be very important for the

    base station, it will reduce drain batteries on mobile device more quickly.

    Therefore it is important to keep a low PAPR on the uplink.

  • The distinguishing feature of SC-FDMA is that it leads to a single-carrier

    transmit signal, in contrast to OFDMA which is a multi-carrier transmission

    scheme.

    Transmitter and Receiver Structure of LP-OFDMA/SC-FDMA

    The transmission processing of SC-FDMA is very similar to that of OFDMA. For

    each user, the sequence of bits transmitted is mapped to a complex constellation

    of symbols (BPSK, QPSK or M-QAM). Then different transmitters (users) are

    assigned different Fourier coefficients. This assignment is carried out in the

    mapping and demapping blocks. The receiver side includes one demapping

    block, one IDFT block, and one detection block for each user signal to be

    received. Just like in OFDM, guard intervals (called cyclic prefixes) with cyclic

    repetition are introduced between blocks of symbols in view to efficiently

    eliminate inter-symbol interference from time spreading (caused by multi-path

    propagation) among the blocks.

    In SC-FDMA, multiple access among users is made possible by assigning

    different users different sets of non-overlapping Fourier-coefficients (sub-

    carriers). This is achieved at the transmitter by inserting (prior to IFFT) silent

    Fourier-coefficients (at positions assigned to other users), and removing them on

    the receiver side after the FFT.

  • Subcarrier mapping can be classified into two types: localized mapping and

    distributed mapping.

    Fig: Localized Mapping and Distributed Mapping

    In localized mapping, the DFT outputs are mapped to a subset of consecutive

    subcarriers, thereby confining them to only a fraction of the system bandwidth.

    In distributed mapping, the DFT outputs of the input data are assigned to

    subcarriers over the entire bandwidth non-continuously, resulting in zero

    amplitude for the remaining subcarriers. A special case of distributed SC-FDMA

    is called interleaved SC-FDMA where the occupied subcarriers are equally

    spaced over the entire bandwidth.

  • Fig: SC-FDMA

    A matlab program for OFDMA and SCFDMA is given below:

    %///////////SC-FDMA///////

    % No. of Subcarriers

    NS = 512;

    % Input Generation

    x = rand(1,NS)>0.5;

    fftlength = 512;

    nd = 6;

    BW = 5e6;

    FS = 2*BW; % Sampling Frequency

    % Conversion of data from serial to parallel

    par2 = series2parallel(x,NS);

    % M ary Modulation of PSK and QAM

    M = 2;

    X = 0;

    for count1 = 2:1:7;

    if (M==2||M==4||M==16||M==64)

    M = M+X

    % M-ary modulation for producing y.

    if(M

  • y=modulate(modem.qammod(M),par2);

    end

    %Apply FFT operation

    out_fft = fft(y,fftlength);

    %Applying Mapping

    q_out = scfdma_mapping(out_fft,fftlength);

    % Apply IFFT operation

    out_ifft = ifft(q_out);

    % Cyclic Prefix Addition

    cp(count1,:) = cyclicpad(out_ifft,64);

    cplength = length(cp);

    % Conversion of data from parallel to serial

    out = reshape(cp(count1,:),1,cplength);

    % Signal transmits through an AWGN channel.

    ynoisy = awgn(out,100,'measured');

    % Rayleigh Fading

    c = rayleighchan(1/1000,100,[0 2e-5],[0 -9]);

    rf = filter(c,ynoisy);

    % Conversion of data from serial to parallel

    p = series2parallel(rf,cplength);

    re_par = real(p);

    % Remove cyclic prefix

    rcp(count1,:) = decyclicpad(p,64);

    len_rcp = length(rcp);

    % Applying FFT operation

    cpfft = fft(rcp(count1,:),fftlength);

    %Applying Demapping

    qq_out = scfdma_demapping(cpfft,fftlength);

    %Applying IFFT operation

    out_fft = ifft(qq_out);

    if (M

  • switch M

    end

    end

    end

    M= 2^count1;

    end

    figure()

    % Plot SNR and BER

    semilogy(Eb_No,ber(2,:),'*-

    r',Eb_No,ber(3,:),'k',Eb_No,ber1(5,:),'b',Eb_No,ber1(7,:),'g');

    axis([0 25 0.0001 1]);

    xlabel('SNR [dB]')

    ylabel('BER')

    legend('BPSK','QPSK','16-QAM','64-QAM')

    title('SC-FDMA')

    figure()

    % Plot Error Probability

    semilogy(Eb_No,Pe(2,:),'-k',Eb_No,Pe(3,:),'-r',Eb_No,Pe(5,:),'-

    b',Eb_No,Pe(7,:),'-c');

    axis([0 50 0.0001 1]);

    xlabel('SNR [dB]')

    ylabel('Probability of Error')

    legend('BPSK','QPSK','16-QAM','64-QAM')

    title('SC-FDMA')

    h = spectrum.periodogram;

    figure()

    HS = psd(h,out_ifft,'SpectrumType','twosided','NFFT',NS,'FS',FS);

    plot(HS)

    xlabel('Sampling Frequency (2BW) in MHz')

    ylabel('Power Spectral Density [dBm/Hz]')

    title('SC-FDMA')

    grid off;

    Serial to Parallel:

    function y = series2parallel(x,NS)

    L=length(x);

    q=floor(L/NS);

    newvec=zeros(NS,q);

    for i=1:q

    newvec(1:NS,i)=x((1+(i-1)*NS):i*NS);

    end

    y=newvec;

    Cyclic Prefix:

    function y=cyclicpad(X,L)

    N=length(X(:,1));

    N-L+1

    Y=[X(N-L+1:N,:);X];

    y=Y;

    Remove Cyclic Prefix:

    function y=decyclicpad(X,L)

    N=length(X(:,1));

    Y=X(L+1:N,:);

  • y=Y;

    Mapping:

    function [iout,qout]=crmapping(idata,qdata,fftlength,nd);

    iout=zeros(fftlength,nd);

    qout=zeros(fftlength,nd);

    iout(2:27,:)=idata(1:26,:);

    qout(2:27,:)=qdata(1:26,:);

    iout(39:64,:)=idata(27:52,:);

    qout(39:64,:)=qdata(27:52,:);

    Demapping:

    function [iout,qout]=crdemapping(idata,qdata,fftlength,nd);

    iout(1:26,:)=idata(2:27,:);

    qout(1:26,:)=qdata(2:27,:);

    iout(27:52,:)=idata(39:64,:);

    qout(27:52,:)=qdata(39:64,:);

    PAPR:

    BPSK:

    function paprSCFDMA()

    dataType = 'B-PSK'; % Modulation format.

    NS = 512; % Number of total subcarriers.

    Symbols = 16; % Data block size.

    Q = NS/Symbols; % Bandwidth spreading factor of SC-FDMA.

    BW = 5e6; % System bandwidth.

    Ts = 1/BW; % sampling rate.

    osf = 4; % Oversampling factor.

    Nsub = NS;

    Fsub = [0:Nsub-1]*BW/Nsub; % Subcarrier spacing of OFDMA.

    Runs = 1e3; % Number of iterations.

    papr1 = zeros(1,Runs); % Initialize the PAPR results for sc-fdma.

    papr3 = zeros(1,Runs); % Initialize the PAPR results for OFDMA

    for n = 1:Runs,

    % Generate random data.

    if dataType == 'B-PSK'

    tmp = round(rand(Symbols,2));

    tmp = tmp*2 - 1;

    data = (tmp(:,1) + j*tmp(:,2))/sqrt(2);

    elseif dataType == '16QAM'

    dataSet = [-3+3i -1+3i 1+3i 3+3i ...

    -3+i -1+i 1+i 3+i ...

    -3-i -1-i 1-i 3-i ...

    -3-3i -1-3i 1-3i 3-3i];

    dataSet = dataSet / sqrt(mean(abs(dataSet).^2));

    tmp = ceil(rand(Symbols,1)*16);

    for k = 1:Symbols,

    if tmp(k) == 0

    tmp(k) = 1;

  • end

    data(k) = dataSet(tmp(k));

    end

    data = data.';

    end

    % Convert data to frequency domain.

    Z1 = fft(data);

    Z2 = fft(data);

    % Initialize the subcarriers.

    Y1 = zeros(NS,1);

    Y2 = zeros(NS,1);

    % Subcarrier mapping for SC-FDMA

    Y1(1:Q:NS) = Z1;

    Y2(1:Symbols) = Z2;

    % Convert data back to time domain.

    y1 = ifft(Y1);

    y2 = ifft(Y2);

    % OFDMA modulation.

    % Time range of the OFDMA symbol.

    t = [0:Ts/osf:Nsub*Ts];

    y3 = 0;

    for k = 1:Symbols,

    y3= y3 + data(k)*exp(j*2*pi*Fsub(k)*t);

    end

    % Calculate PAPR.

    papr3(n) = 10*log10(max(abs(y3).^2) / mean(abs(y3).^2));

    papr1(n) = 10*log10(max(abs(y1).^2) / mean(abs(y1).^2));

    papr2(n) = 10*log10(max(abs(y2).^2) / mean(abs(y2).^2));

    end

    % Plot CCDF.

    figure ()

    [N,Z3] = hist(papr3, 100);

    [N,Z1] = hist(papr1, 100);

    [N,Z2] = hist(papr2, 100);

    semilogy(Z1,1-cumsum(N)/max(cumsum(N)),'b')

    hold on

    semilogy(Z3,1-cumsum(N)/max(cumsum(N)),'black')

    hold off

    title ('PAPR of SC-FDMA and OFDMA for BPSK')

    xlabel ('PAPR[dB]')

    ylabel ('{PAPR(PAPR>PAPR0)}')

    grid off;

    % Save data.

    save paprSCFDMA

    QPSK:

    if dataType == 'QPSK'

    tmp = round(rand(Symbols,4));

    tmp = tmp*2 - 1;

    data = (tmp(:,1) + j*tmp(:,2))/sqrt(2);

    16-QAM:

    elseif dataType == '16QAM'

  • dataSet = [-3+3i -1+3i 1+3i 3+3i ...

    -3+i -1+i 1+i 3+i ...

    -3-i -1-i 1-i 3-i ...

    -3-3i -1-3i 1-3i 3-3i];

    64-QAM:

    elseif dataType == '64QAM'

    dataSet = [-5+5i -1+5i 1+5i 5+5i ...

    -5+i -1+i 1+i 5+i ...

    -5-i -1-i 1-i 5-i ...

    -5-5i -1-5i 1-5i 5-5i];

    Reference Link:

    1. https://www.youtube.com/watch?v=dr4YQAfifKA

    2. http://www.answers.com/Q/What_is_modulation_and_why_is_it_needed

    3. http://web.stanford.edu/~nsoltani/ee359project/project.pdf

    4. http://www.mathworks.com/matlabcentral/fileexchange/41814-ofdma---sc-fdma-performance-

    analysis/content/ofdma.m

    5. http://en.wikipedia.org/wiki/Single-carrier_FDMA