BER for BPSK in OFDM with Rayleigh multipath channel
1 Star2 Stars3 Stars4 Stars5 Stars (6 votes, average: 4.17 out of 5)
Loading ... Loading ...

BER for BPSK in OFDM with Rayleigh multipath channel

Mr. Lealem Tamirat, in a comment on BER for BPSK in Rayleigh channel, wondered about the performance of an OFDM modulated system in a frequency selective Rayeligh fading channel. My response was that,

Though the total channel is a frequency selective channel, the channel experienced by each subcarrier in an OFDM system is a flat fading channel with each subcarrier experiencing independent Rayleigh fading.

So, assuming that the number of taps in the channel is lower than the cyclic prefix duration (which ensures that there is no inter symbol interference), the BER for BPSK with OFDM in a Rayleigh fading channel should be same as the result obtained for BER for BPSK in Rayleigh fading channel.

Let us try to define a quick simulation to confirm the claim.



OFDM system

Let us use an OFDM system loosely based on IEEE 802.11a specifications.

Parameter Value
FFT size. nFFT 64
Number of used subcarriers. nDSC 52
FFT Sampling frequency 20MHz
Subcarrier spacing 312.5kHz
Used subcarrier index {-26 to -1, +1 to +26}
Cylcic prefix duration, Tcp 0.8us
Data symbol duration, Td 3.2us
Total Symbol duration, Ts 4us

You may refer to post Understanding an OFDM Transmission and the post BPSK BER with OFDM modulation for getting a better understanding of the above mentioned parameters.

Eb/No and Es/No in OFDM

The relation between symbol energy and the bit energy is as follows:
.

Expressing in decibels,

.

Rayleigh multipath channel model

As defined in the post on Rayleigh multipath channel model, the channel was modelled as n-tap channel with each the real and imaginary part of each tap being an independent Gaussian random variable. The impulse response is,

,

where
is the channel coefficient of the 1st tap,

is the channel coefficient of the 2nd tap and so on.

The real and imaginary part of each tap is an independent Gaussian random variable with mean 0 and variance 1/2.

The term is for normalizing the average channel power over multiple channel realizations to 1.

Figure: Impulse response of a multipath channel

Cyclic prefix

In the post on Cyclic Prefix in OFDM, we discussed the need for cyclic prefix and how it plays the role of a buffer region where delayed information from the previous symbols can get stored. Further, since addition of sinusoidal with a delayed version of the sinusoidal does not change the frequency of the sinusoidal (affects only the amplitude and phase), the orthogonality across subcarriers is not lost even in presence of multipath.

Since the defined cyclic prefix duration is 0.8us duration (16 samples at 20MHz), the Rayleigh channel is chosen to be of duration 0.5us (10 taps).

Expected Bit Error Rate

From the post on BER for BPSK in Rayleigh channel, the BER for BPSK in a Rayleigh fading channel is defined as

.

I recall reading that Fourier transform of a Gaussian random variable is still has a Gaussian distribution. So, I am expecting that the frequency response of a complex Gaussian random variable (a.k.a Rayleigh fading channel) will be still be independent complex Gaussian random variable over all the frequencies.

Note:
I will update the post, once I am able to locate the proof for “frequency response of a complex Gaussian random variable is also complex Gaussian (and is independent with frequency)“.

Given so, the bit error error probability which we have derived for BER for BPSK in Rayleigh channel holds good even in the case of OFDM.

Simulation model

Click here to download: Matlab/Octave script for BER simulation of BPSK in a 10-tap Rayleigh fading channel

The attached Matlab/Octave simulation script performs the following:

(a) Generation of random binary sequence

(b) BPSK modulation i.e bit 0 represented as -1 and bit 1 represented as +1

(c) Assigning to multiple OFDM symbols where data subcarriers from -26 to -1 and +1 to +26 are used, adding cyclic prefix,

(d) Convolving each OFDM symbol with a 10-tap Rayleigh fading channel. The fading on each symbol is independent. The frequency response of fading channel on each symbol is computed and stored.

(e) Concatenation of multiple symbols to form a long transmit sequence

(f) Adding White Gaussian Noise

(g) Grouping the received vector into multiple symbols, removing cyclic prefix

(h) Converting the time domain received symbol into frequency domain

(i) Dividing the received symbol with the known frequency response of the channel

(j) Taking the desired subcarriers

(k) Demodulation and conversion to bits

(l) Counting the number of bit errors

(m) Repeating for multiple values of Eb/No

The simulation results are as shown in the plot below.

Figure: BER plot for BPSK with OFDM modulation in a 10-tap Rayleigh fading channel

Summary

1. The simulated BER results are in good agreement with the theoretical BER results.

2. Need to find the proof for frequency response of a complex Gaussian random variable is also complex Gaussian (and is independent with frequency).

Hope this helps. Happy learning.

Please click here to SUBSCRIBE to newsletter and download the FREE e-Book on probability of error in AWGN. Thanks for visiting! Happy learning.



118 Responses to “BER for BPSK in OFDM with Rayleigh multipath channel”

  1. Lealem says:

    Thank you!!! Krishna ur script helps me very much for my work. i am trying to simulate performance of adaptive OFDM as per current conditions of the wireless channel. if i am going to face a problem i will try to inform you.
    Thank you!!!!

  2. mohamadali says:

    Hello Dear Mr Krishna
    thanks for your comprehensive posts
    could you please explain that:
    1 – if the channel is slow fading
    how can we apply the correlation between the channel coefficients for several ofdm symbols depending on the coherence time of the channel
    2 – how can we estimate the channel coefficients in this scheme when we apply the block type pilot channel estimation
    and at last
    3 – could you please show how should we equalize the received signal with MRC scheme
    I have some problems in writting matlab program so could you please guide me by that
    best regards

  3. @ mohamadali:
    1. I would think that, if one knows the way the channel will evolve (second order statistics like autocorrelation etc), then one could define a set of coefficients which can be used to obtained averaged estimates. However, since I have not tried out this, I am unable to comment well on this now.

    Further, similar to time domain correlation, one may also use the frequency domain correlation i.e. if the evolution of channel on the frequency domain is known, use to obtain a better estimate of the channel.

    2. Apart from the block pilots, which provides the initial estimate, one may have pilot subcarriers in the data symbols. However, we need to have quite-a-bit of pilot subcarriers to ensure that we can do the interpolation across subcarriers well.

    Another way, if the SNR is good, is to use hard-decision decoding and use the hard decision as the reference symbol.

    3. MRC – maximal ratio combining ensures that information on both the dimensions is optimally combined to demodulate the symbol. I will write a post on the same soon.

  4. mohamadali says:

    Thanks Dear Krishna

    Will you have a matlab program on estimating the slow fading channel coefficients for ofdm systems in the near future based on block pilot aided channel est. on your blog

    and will you work on space-time Tx diversity for OFDM or MC_CDMA system

    I am simulating a mc-cdma system and i faced with these problems:
    if you let me I send you my matlab code, if it is possible for you please guide me:
    1.I used the channel coefficients were produced by the method that linnartz presented in his site based on generation of coefficient for each subcarrier in frequency domain since the channel will be narrowband for each subcarrier after ofdm modulation with assuming jakes psd.
    I dont know how should will be treat in this approach with generated signal and channel(should we directly multiply the two same length Txed signal and channel or not) and how should we extract channel coefficients after getting fft from Rxed signal (in time domain we got fft from the channel coefficients )equalize the received signal by various equalizing scheme such as MMSE,LS,MRC,ORC

    2. according to my code how can i make the correlation between two ofdm symbols based on slow fading channel properties

    and at last if you know any helpful matlab program on simulation of MC-CDMA systems please tell me because i am new with this kind of systems and despite my studying papers
    i confused in some simulating points.

    Thanks

  5. @mohamadali:
    I plan to add contents on
    (a) slow fading channels in OFDM (as used in 802.11a WLAN system)
    (b) Tx diversity schemes like Alamouti coding, cyclic shift diversity etc

    1. Though am not familiar with the Linnartz paper, yes you can assume that the channel is flat fading for each subcarrier. You can convolve the channel with the transmit sequence. If frequency, it will be multiplication if the channel response duration is less than the cyclic prefix.

    2. As stated prior, I have not worked well on exploiting the correlation thing. Will do in future.

    You can ask specific questions on MC-CDMA. Having a good understanding of OFDM should help you get going.

  6. noamchomsky says:

    Hi krishna..
    Your simulation is great but i have a question.
    For this thing to get work on some hardware the transmitted real and imaginary part should be within the range of +1 and -1. But with the normalization factor that you have introduced i.e. nFFT/sqrt(nDSC) with IFFT in the code, the transmitted real and imaginary amplitudes go way beyond +1 and -1. (Assuming Q1.15 format). What do you think should be appropriate scaling factor.

    Best Regards

  7. @noamchomsky (really???) :)
    It seems that you are looking for fixed point conversion i.e to represent the numbers as integers. One way to do this would be to
    (a) convert the signal into the range of -1 to +1 by
    dividing by the maximum of the absolute value from the real part or imaginary part.
    (b) Convert to an integer by multiplying and 2^n and rounding.

    i.e if xt is the signal
    N = 10; number of bits (signed number)
    xt_scaled = xt/max(max(abs(real(xt))),max(abs(imag(xt))));
    xt_fixed = round(xt_scaled*2^(N-1));

    Did this help?

  8. noamchomsky[any doubts?] says:

    Well thanks for your prompt reply krishna… But my question is still there.
    When we are transmitting the signal we cannot scale it by dividing the maximum value. In this case, the scaling factor would be different each time we transmit the signal depending upon the PAPR (peak to average power ratio) of the signal. What i wanted to know is that what is the appropriate scaling factor used in this case that bounds the signal values within +1 and -1. Or if industry uses the same divide-by-maximum-value algorithm, am i wrong in the claim above.

    Best Regards,

  9. @noamchomsky:
    With the industry case, things are a bit different, but the same concept holds good.

    For the OFDM case, till the input of QAM mapping, the representation will be in bits (1bit). At the QAM mapping o/p, we represent the complex number into fixed point arithmetic represented in N bits. The value of N is a tradeoff between the hardware constraints and accuracy. Higher N means more accurate, but requires more hardware.

    This complex o/p of QAM mapping is followed by a fixed point ifft(), filters and so on.

  10. jamal says:

    Hi Krishna,
    Your website is a life saver. thanks

    Question: in your code for this section , you are undoing the affect of the channel with following line:

    % equalization by the known channel frequency response
    yF = yF./hF;

    I am sure I am missing some theoretical concept here. However if you undo the affect of the channel before slicing and demodulation , then what is the purpose of the channel filter.

    appreciate a response.
    jamal

  11. @jamal: By channel filtering, I think you are referring to the inverse filtering operation such that h(t) * c(t) = delta(t), where
    h(t) – is the channel impulse response
    c(t) – is the channel equalization filter
    * – is the convolution operator and
    delta(t) – is the impulse
    Am I correct?

    Note that in OFDM, the channel response becomes a single tap filter – such that convoltion becomes just a multiplication. So to undo the effect of multiplication, we divide by the known channel. Does that make sense?

  12. jamal says:

    Thanks Krishna.
    The purpose of using a filter(h(t)) is to simulate the affect of a signal going through a real life channel. This real life channel impairments translates to the BER curve.

    So by undoing the response by a known channel frequency response. How is the BER now relates to the 10tap filter that it went through. You just removed the affect of the channel before you went into your receiver function.

    Yes I do understand that equalization in OFDM occurs in frequency domain , hence a divide. So an essence OFDM system can not function with out a fairly accurate channel estimation .

    thanks for helping me out. DSP can be a black magic at times.
    best regards
    Jamal

  13. ila says:

    hi,
    sorry if this sounds like a stupid question :P
    im rather new in this..

    if the BER shows no improvement in Rayleigh fading channel, why do we perform this simulation??

  14. @ila: No, not a stupid question at all.
    At the least, we should know that the BER does not degrade with OFDM. :)

    In general, I felt some readers might feel comfortable having a OFDM + multipath simulation. Hence tried to characterize the performance.

  15. jamal says:

    @ila: Raleigh represent wireless channel under certain limitation. Were awg is basically noise, you could assume point to point link with no Multipath.

    Therefore to see the performance of OFDM ,one has to run the simulation with and without Cyclic prefix. Krishna simulation is set up to make those changes. what you can do is to progressively increase the delay spread and see the simulation degrade.

  16. noamchomsky says:

    Well jamal the reason why this channel inversion will have an effect on this simulation is because it will increase the noise in the case where there is a fade in any subcarrier. For example, consider y as the output at any subcarrier
    y = x + n ;
    where x is the data value and n is noise
    when you invert the channel,
    y/h = x/h + n/h;
    the noise is scaled accordingly.
    In case, when there is a deep fade at any subcarrier, the channel estimation will try to increase x as much as possible and will increase the noise accordingly. That’s why we cannot say that this channel inversion combined with channel filtering has no effect on the performance.
    I hope this answers your query..

  17. tariq says:

    dear krishan , thanks very much a bout your excellent efforts, but i have some questions a boout rayleigh with ofdm.
    1-what is the no. of rayleigh paths and their average gain.
    2-what is the max. doppler shift.
    3-what is the channel coding used.
    4-what is the delay spread.
    5-can you, kindly give us ofdm simulation with differnet modulations types such as(QPSK,16QAM) and their scripts.
    6-through my reading, i find (rayleigh flat fading) what is mean ,and is flat mean we have one path.
    with my best regards
    tariq

  18. @tariq: Please find my responses below:
    1. 10 tap channel with average gain of unity.
    2. No doppler is simulated
    3. No channel coding
    4. I have not computed the delay spread, but should be reasonably easy to compute given that we know the number of taps and their gain.
    5. you have the model with BPSK. It should be reasonably easy to extend it to QPSK/QAM cases.
    6. In OFDM case, though rayleigh channel has multiple taps, for each subcarrier the channel is effectively a single tap channel. Hence frequency selective fading channel becomes a flat fading channel with ofdm.

    Hope this helps.

  19. Ray says:

    Hi Krishma,

    When I try to extend to QPSK, I meet the problems on demodulation part. Seems that the BER increse dramatically.
    The method I do is fist mapping the 0,1 bit to QPSK signal, which is 1+j,1-j,-1+j,-1-j. And take this symbols into the IFFT and FFT calculation.
    What would be the problem??
    THX!

  20. @Ray: hmm… well extending to QPSK should be reasonably simple. Maybe the first approach is to make sure that symbol error rate with QPSK is computed correctly. Once that simulation is stable, one may proceed to map the constellation symbols to bits and find the BER.

    The following post maybe useful:
    http://www.dsplog.com/2007/11/06/symbol-error-rate-for-4-qam/

  21. GRS says:

    HI Mr.CHRISHNA..
    REGARDING UR POSTS UPWARD,HOPE U HELP ME FIGURING OUT THIS PROB FACING ME LONG TIME AGO:
    AM SIMULATING AN OFDM SYSTEM IN THE FRONT-END IN THE Rx SIDE IN ORDER TO ESTIMATE THE MAX PEAK OF PILOT ISERTING IN THE DATA SEQUENCE IN THE Tx SIDE,BY USING AUTO-CORRELATION IN TIME DOMAIN(BEFORE FFT)..FOR THE AWGN CHANNEL I GET QUITE GOOD RESULS..BUT THE PROBLEM TAKES PLACE WHEN TRYING THE RAYLEIGH FADING CHANNEL..
    PLEASE TRY TO HELP HIM AS MUCH AS U CAN..
    ANY MORE DECLARATION PLS WRITE TO ME AT gafer2306 AT gmail.com
    THANX ALOT.

  22. @GRS: What is periodicity of the preamble of the transmit sequence. If the multipath channel is of lower duration than the periodicity, then I do not think auto-correlation o/p should be affected by the multipath channel.

  23. GRS says:

    Thanx for replying Mr.Krishna..
    In fact it isn’t a pure preamble,i mean,not a separate sequence transmitted periodically,but,instead,it’s a kind of PSAM system..Pilot Symbol Assisted Modulation..That is:
    * The pilots are inserted along with the data sequence periodically,means after every certain amount of data-subcarriers there will be a pilot subcarrier..e.g.every ten,the eleventh is a pilot.
    * We’ve 100 pilots per a symbol,say..means,1100 data subcarriers..1200 subcarriers (samples) per symbol.with a duration of 120us..say.
    * The cyclic prefix is 1/4..30us.
    * we locally regenerate the pilot in the Rx with duration and POWER LEVEL (AMPLITUDE) as same in the Tx side but before the transmission (before the channel).
    * We are concerning the POWER LEVEL of the pilots and need to estimate it by using auto-correlation in the Rx’s front-end.
    ***For AWGN we’ve simply discarded the cyclic prefix..and directly do auto-corr between the received signal and the locally generated pilot sequence,,and we get somehow reasonable estimated peak for the pilot..as well as the index (delay).
    *** By the way, am using Simulink.
    *** Hope it is clear for u..but any more or deep details needed am here..really waiting for help.

    Thanx again.

  24. GRS says:

    Hi again Mr.Krishna..
    Another basic question Sir..What is the difference between the number of channel Taps and the number of Rays?? What i get from somewhere that ONE Tap is consist of a GROUP of RAYS..is it correct?? If so,How can I determine that number of Rays for each (ONE) Tap?? Depending one what I mean..Time delay profile??((This is in case of multipath channels..As Rayleigh))As U know!!

  25. @GRS: On your first question on pilots
    As I understand from you, you have pilots subcarriers embedded in your data subcarriers in the OFDM symbol. How are you planning to use the pilots?

    As I can recall, typically for systems like 802.11a, the pilots are used to track the residual carrier frequency offset error, sampling clock offset error etc. There we find the phase of the received pilots given that we know what was transmitted, and uses the phase information from multiple pilot values to form the estimate.

    I do not understand the expectation from your side when you say – “you do autocorrelation of the pilot sequence”.

    Can you please point me to the paper which you are refering to for the algorithm.

    • GRS says:

      Hi again after long time Mr.krishna..
      1) Well,forget about the pilot for now.
      2) Am focusing only on the time-doman signal..before the fft.
      3) Simply , by using the auto-correlation (of the received signal with it self) i manage to estimate the received average power..without any delay this corresponds to the zero-lag peak..with the AWGN this can work,but for the RAYLEIGH the problem takes place.
      The question again is like this:
      How could I estimate the channel (in order to componsate for it) in the case of time-domain..not in the frequency-domain???

      • @GRS: My replies
        1/ ok
        2/ ok
        3/ ok, i understood how you are estimating the power.
        I can think of one way of estimating the channel in time domain. Let us say you have a known preamble in time domain, p(t).
        Also, let the preamble has
        a) good cross-correlation properties i.e p(t) * p(-t) = impulse, d(t)
        b) and does not correlate with noise i.e n(t) * p(t) = 0
        where * is the convolve operator
        The received signal is
        y(t) = c(t) * h(t) + n(t)
        Convolve the received signal with the time-reversed complex conjugate of the known channel i.e
        m(t) = y(t) * p(-t) = c(t) * h(t) * p(-t) + n(t) * p(-t)
        Since c(t) * p(-t) = d(t) and n(t) * p(-t) ~= 0, we have
        m(t) = h(t)

        Does this help?

        • GRS says:

          Yaa Thanx..but:
          1) Whats the difference between p(-t) here,when u said:”Also, let the preamble has
          a) good cross-correlation properties i.e p(t) * p(-t) = impulse, d(t)” and when u said:”Convolve the received signal with the time-reversed complex conjugate of the known channel i.e
          m(t) = y(t) * p(-t)”????

          2)”Since c(t) * p(-t) = d(t) and n(t) * p(-t) ~= 0, we have
          m(t) = h(t)” … I think u mean: m(t) = h(t)d(t).. right?

          3)After estimating this h(t), how could I compensate for it? Is it just multiplying of the received signal by the inverse of the estimated channel..[1/h(t)]??as the frequency domain equalization???

          Thanx again.

          • GRS says:

            cos in 1) above..I understood that in both cases we just do a cross-correlation..here:
            ((((a) good cross-correlation properties i.e p(t) * p(-t) )))) for the known channel with it self(auto-correlation)..
            whereas here (((Convolve the received signal with the time-reversed complex conjugate of the known channel i.e
            m(t) = y(t) * p(-t)))) cross-correlating the known channel with the received signal..
            So my question in other words : Why did u say:
            “Convolve the received signal with the time-reversed complex conjugate of the known channel i.e
            m(t) = y(t) * p(-t)”
            instead of just:
            “cross-correlate the received signal with known channel”..whats the difference????

          • @GRS: My replies:
            1/ Did not get your question. Difference between p(-t) and ?
            2/ Yes, i mean m(t) = h(t) delta(t). Since delta(t) is impulse, I did not mention this explicitly.
            3/ If the channel is not flat fading, then we need to find a new filter c(t), which undoes the effect of the channel, i.e h(t) * c(t) = delta(t)

  26. @GRS: As I understand from Rayleigh multipath channel model
    ( http://www.dsplog.com/2008/07/14/rayleigh-multipath-channel/ ), each tap corresponds to a path having delay of tau(n) and amplitude of alpha(n).

    I do not quite follow the term ray. Can you please point me to a paper please.

  27. sahil says:

    respected sir,
    I m btech final year student can u help me by giving me advice how to calculate “BER of OFDM on frequency selective nakagami-m fading channel”.Or if possible can u provide me matlab code for simulation.Any help in this regards will be benifical for me.

    Thanking you
    sahil chaudhary

  28. karl says:

    dear Krishna,
    I took several of your simulations and add channel coding (poly2trellis(3,[5 7])). I got the coding gains expected. Similar I get coding gain in your BPSK in OFDM with Rayleigh multipath channel simulation with ntap=10. But when I use channel coding in OFDM flat fading channel (ntap=1) I don’t get any coding gain. Curve is the same as OFDM uncoded. do you have any insights why this? I know i will get more coding gain in a frequency-selective channel but I will also expect some coding gain in a flat-fading channel, correct?.
    keep with the good work.

  29. @sahil: I have not done modeling of Nakagami fading channel, hence do not have code/results on the same. Hope the following
    link is helpful.
    http://wireless.per.nl/reference/chaptr03/ricenaka/nakagami.htm

  30. @karl: Yeah, I would also expect to get coding gain with OFDM in AWGN channel. Did you try with simple AWGN channel alone (no OFDM)?

    OR is it due to some scaling error in bit to noise ratio (Eb/No) vs code bit to noise ratio (Ec/No) vs SNR?

    Please do report your findings. All the best.

  31. sahil again says:

    Sorry sir this link doesnt help me lot.Can u provide me any information from where else i can get material to simulate nakagami-m fading channel.
    thanking you
    sahil chaudhary

  32. sahil again says:

    Sir if you can provide me code for rician fading that would also help me a lot

    Thanks
    sahil

  33. sahil again says:

    Sir if you can provide me code for calculating BER in rician fading that would also help me a lot

    Thanks
    sahil

  34. @sahil : Sorry, I have not written any post on modeling Rician channel.

  35. GRS says:

    Hi Krishna..

    [[[[[Comment by Krishna Pillai on November 26, 2008 @ 6:03 am

    @GRS: On your first question on pilots
    As I understand from you, you have pilots subcarriers embedded in your data subcarriers in the OFDM symbol. How are you planning to use the pilots?

    As I can recall, typically for systems like 802.11a, the pilots are used to track the residual carrier frequency offset error, sampling clock offset error etc. There we find the phase of the received pilots given that we know what was transmitted, and uses the phase information from multiple pilot values to form the estimate.

    I do not understand the expectation from your side when you say - “you do autocorrelation of the pilot sequence”.

    Can you please point me to the paper which you are refering to for the algorithm.
    ]]]]]

    sorry for late in replaying.

    http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1556874&isnumber=33117

    ((In this paper : only the magnitude of received signal is
    used to obtain the time position of the pilot symbols))
    We also need to estimate the magnitude of the received signal as well as pilots but for another issue than timing as mentioned earlier in my 2nd post.
    Thanx.

    for the second part i will point u 2 a paper.

  36. mohamadali says:

    hi mr pillai
    in your code
    xt = (nFFT/sqrt(nDSC))*ifft(fftshift(xF.’)).’;
    the power of each row becomes 64 and the norm of it becomes 8
    should not we multiply ifft(fftshift(xF.’)).’ by
    sqrt(nFFT/nDSC) instead (nFFT/sqrt(nDSC)) and in this condition the norm of each row will become 1 and so the power of each row will become 1 too.

  37. @mohamadali: I just checked. The scaling by sqrt(nFFT/NDSC) ensures that mean power for each row becomes one i.e E{|xt|^2} = 1. Infact, I should have said mean power.

    Does that help?

  38. karim says:

    I need the matlab OFDM script in different channel.

  39. OFDM says:

    Hi ! I am a student of B.Sc. (Honors) Computer Science & Engineering in STAMFORD UNIVERSITY BANGLADESH . For my thesis i choose topics OFDDM( my work make OFDM CODE which use BPSK,QPSK and 16 QAM as OFDM modulation technique than code find which technique can efficient , fast, and low bit error etc)
    Here any body help me about this,, plz mail me at: solimanhossain@yahoo.com.

  40. Communication says:

    Hello Krishna, I was going through simulation of BER for coherent Psk schemes with non-coherent PSk i.e. Differential PSK so DPSK of any modulation level was behaving much better than a coherent PSK. So my question is that why haven’t we seen more implementation of DPSK as compared to say GMSK, pi/4-QPSK or O-QPSK

    Is there some problem of implementation, if so what is it?

    I hope you’ll reply soon!

    TC

    • @communications_engineer: Well, I do not quite understand why you are saying the Differential PSK was behaving much better than coherent PSK. Typically if we do non-coherent demodulation of DBPSK, then BER is expected to be around 3dB worse. Even if we do coherent demodulation of DBPSK, then the BER is double. I have written a post on coherent demodulation with DBPSK at
      http://www.dsplog.com/2007/09/30/coherent-demodulation-of-dbpsk/

      Hope that provides you some clues. Kindly do share your findings.

  41. Communication says:

    Krishna, I created an m-file to find the level crossing rate and the average fade time duration. First I found the BER for QPSK and for the same same of channel conditions I found for DQPSK.

    Now the error rate under Rayleigh conditions (ts = 1e-3, fd=25) I received about 55% bits in error. However when I used DQPSK I had a BER of 25% which is significant difference. Also I later put an interleaver of depth 10 (depth suggested by AFTD) so in QPSK my BER reduced to 30% while for DQPSK my error was 3% Huge difference, right?

    Your post finds the BER under AWGN where phase fluctuations are not severe unlike Rayleigh fading, try it using scatterplot in Matlab. So, I again repeat my question, DQPSK gives better results than QPSK under fading conditions so why is it not used in standards? Why is QPSK still prefered? Also with DQPSK we wont need a complex phase detector, right?

    • @communication: So your observation is that DQPSK gives better performance than QPSK in Rayleigh channel. Intetresting! May I ask one question: Do you have an equalizer in the receiver in your simulations?

  42. Communication says:

    No. No equalizer used

    I wasn’t surprised. Look for BPSK we need have coherent demodulation. In AWGN that may be easy to have. However, in Rayleigh fading, the channel phase response changes dramatically. Now have a coherent demodulation will always produce bad results as phase is no longer preserved (I’m talking about fast and not slow fading). So with DBPSK (I’ve tested it on DBPSK and DQPSK) we can local, ‘differential’ synchronization. So even if channel phase response varies in what ever form it can, the performance does not get too worse. But you would already know that, right?

    I also have an observation about convolutional encoder, but I’ll ask it on its page. You can contact me on my email address

    • @Communication: Good, so are in agreement. Since your receiver did not have equalization the DBPSK provided better performance. In typical systems, we do expect to have the equalizer in the receiver.

      • Communication says:

        Hello Krishna

        If I use an equalizer than the performance of DBPSK will also improve. Its not like BPSK improving 10 times and DBPSK 1 time.

        But now I have found an answer to my question, why DBPSK is not commonly used in mobile communication

        It would be good if you can simulate some of these topics in Simulink

        • @Communications: Can you please share your observation on “why DBPSK is not commonly used in mobile communication” in some more detail.

          • Communication says:

            Well even though DPSK for M=2 or 4 are spectrally efficient, we STILL have those transition of phases through the center which makes the need for highly linear amplifiers, making the device based on this technique expensive. Thats the whole reason for using pi/4-QPSK, O-QPSK and GMSK, right? The so-called CPM

            Acha Krishna have you considered Matlab/Simulink simulations for CDMA and IDMA. I would be interested in those. Especially in Simulink environment. I’m sure other people would too. May be allow other people to contribute as well, turn this into something like dsprelated.com

  43. Jose C says:

    Krishna, you stated before that using a 10-tap channel, which is lower than the CP duration, BER for BPSK and BER for BPSK-OFDM will be the same, my question is what results are to expect for a channel with more number of taps e.g. 20 taps??

    What would be the interpretation of that kind of channel and those results?

  44. Marwan says:

    Good evening Mr. Krishna Pillal,
    I fully respect your work!
    I have carried wideband measurement campaign to measure the frequency response of a channel, it s length is 10,000 points. I need to investigate OFDM transmission using your OFDM code. my question to you is:
    instead of using the rayleigh fading model in the code, is it correct to transform my measured frequency response to impulse response (IFFT(FR)=IR) then convolute this IR with the symbols then add noise and so on? note that the IR is almost 40 multipath components.
    or is it possible to slice the FR and use it without converting it to IR.
    I would be very greatful if you kindly provide me with some hints and the steps to follow.
    my regards o you!

    • @Marwan: In the physical medium, the signal is getting convoluted with impulse response of the channel. In OFDM, if the cyclic prefix is more than the channel duration, you can alternatively model the effect of channel my multplication in frequency domain.

      Hope this helps.

  45. Marwan says:

    Hi Krishna,I think you can ignore my previous question,
    I alresdfy convoluted my measured channel impulse response with the appended signal xt in time domaine:
    but how the cyclic prefix is chosen on line 38 from[49:64], I know that 64 is the fft size, but why 49?

    also in line 64, yt = yt(:,[17:80]);
    after convolution the length of the signal become 89, the 89-(nTap-1)=80, but what is the 17 stands for?

  46. Marwan says:

    Sorry! please, ignore my questions, i found answers.

  47. Marwan says:

    Hi krishna,
    I’d appreciate very much your patience! my question is:
    in OFDM model, BER curve should coincide with theoretical ones at all times?. and by the way are you going to equalize in OFDM model using MMSE? I could not succeed in equalization using mmse method.

    • @Marwan: As the OFDM makes a multipath channel effectively a flat fading channel on each subcarrier, the BER performance with OFDM should be comparable to flat fading Rayleigh channel performance.

      In the code, am equalizing by zero forcing. You need not use MMSE here. As I see, since there is no interference, the ZF equalization is optimal from BER perspective.

      Hope this helps.

  48. Joe says:

    In your channel model the spacing between taps is constant (equally spaced taps), I guess the spacing between taps explains the delay arrival of each path on the multipath channel.

    Is it always equally spaced taps which describes the multipath effect?

    What would be a justification for using equally spaced taps on the simulation?

  49. zain says:

    hello guys…..im doing my final year project of bachelors Regarding OFDM on simulink…uptill now i have done with IEEE802.11a OFDM with AWGN channels…now i have to extend it for MULTIPATH RAYLEIGH CHANNEL and EQUALIZERS…but im unable to proceed because when i insert rayleigh channel in place of AWGN in the model of 54Mbps…it gives an error of memory…and when i insert equaliser than it gives an error that input must be a complex vector at its input port….i dont know how to convert my input binary signal which is already in the form of double to Complex in order to make it compatible with Equaliser:(
    PLZ SOMEBODY HELP ME…IS THERE ANY SIMULINK EXPERT HERE WHO HIMSELF OR HERSELF HAS WORKED ON MULTIPATH AND EQUALIZERS IN SIMULINK….IM RUNNING SHORT OF TIME…PLZZ MAIL ME IF U GUYS HAVE SIMULINK MODEL OF IEEE802.11a REGARDING MULTIPATH and EQUALIZER TO CORPORATE ISI….IT WILL BE OF GREAT HELP 4 ME…
    MY EMAIL ADDRESS IS
    zain.87@hotmail.com
    will wait for response….plzzzzzzzzz HELP ME OUT

    REGARDS

    ZAIN

  50. Arun says:

    @Krishna

    In the Frequency domain, each sub carrier will still see a complex gaussian random variable, but they wont be independent..
    for OFDM since we take the Fourier transform of the channel, , in the freq domain, the random variables will have a covariance matrix of FAF^H
    where F is the Fourier transform matrix and A is the diagonal matrix that contains the powers of the taps in the time doamin
    and F^H denotes the Hermitian of the matrix

    • @Arun: Were you suggesting that the channel response in frequency domain will be correlated?
      For the time domain channel, I have assumed 10 tap Rayleigh channel with each tap having an idependent random variable. In that case, what will be the covariance matrix A for that channel? Kindly clarify.

  51. Masum says:

    Hello Krishna, thanks for ur nice work on OFDM.

    I have run ur simulation of ofdm in rayleigh multipath channel with and without cyclic prefix. But I dont get any difference in the result.why? where actually this thing work?

    How can I use the doppler shift in the rayleigh simulation?

    is there any problem if we use the Matlab build-in function chan = rayleighchan(ts,fd) as channel estimation?

    • @Masum: My replies:
      1. Its surprising that you were able to obtain similiar performance with and without cyclic prefix in a multipath channel. How many taps were your channel. And what was your cyclic prefix duration?

      2. Sorry, I have not tried modeling doppler.

      3. I have not used rayleighchan() function. Hence unable to comment.

  52. pulkit says:

    hello sir..
    i am working on designing a complete adaptive modulation system..can you guide me?

  53. Allyson says:

    Hi Krishna,

    Is multipath channel = ISI channel?

    • @Allyson: In general, yes.
      Note that for modulation types like OFDM, the multipath channel causes interference from the previous symbol to the cylic prefix of the current symbol (and since cyclic prefix is ignored, the channel can be treated as flat fading for individual subcarriers).

  54. Ravi says:

    hi krishna

    do you codes for the effect of change in cyclic prefix length on BER,POWER,etc…PLz help me

  55. Ahmed says:

    Please, could you help me to derive the BER equation of OFDM with Walsh-Hadamrd spreading in Rayleigh fading channel.

    • @Ahmed: Well, if there is a corresponding de-spreading algorithm at receiver, then the BER performance should be similiar to what we have obtained here in this plot. Agree?

  56. nyna says:

    hullow..
    krishna can u help me to understand more about the performance of BER in BPSK….
    Why the performance of BER are degrades while the SNR are increased? there is another reason????

  57. Rajuelo says:

    Hello Krishna:

    I have a doubt, I hope you can help me, what happend if I need to use V-blast and the taps are uncorrelated and obey an exponential power delay profile, E{|hk|2} = Cexp(-a k) and it is assumed that the channel does not vary over two OFDM symbols. How can I simulate this in Matlab

  58. Abubaker says:

    hi Krishna,
    thanks for your code.
    but how can i add the transmission loss(path loss) to the channel and plot the BER after that.
    thanks in advance

  59. najat says:

    in this programme , i don’t understand some codes
    please , prove these codes

    % Taking FFT, the term (nFFT/sqrt(nDSC)) is for normalizing the power of transmit symbol to 1
    xt = (nFFT/sqrt(nDSC))*ifft(fftshift(xF.’)).’;

    how, the power of transmitt sympol
    normalize to 1

    sum(abs(xt(1,:).^2)) do not equal to 1 ??????
    sum(abs(xt(:,1).^2)) do not equal to 1 ???????

  60. najat shalash says:

    hi krishna:
    please aswer me
    After viewig your program with title “Script for computing the BER for BPSK in OFDM modulation in the
    of Rayeligh fading channel” I have some quieries about the code in program .In this code “
    Taking FFT, the term (nFFT/sqrt(nDSC)) is for normalizing the power of transmit symbol to 1
    xt = (nFFT/sqrt(nDSC))*ifft(fftshift(xF.’)).’;
    converting to frequency domain
    yF = (sqrt(nDSC)/nFFT)*fftshift(fft(yt.’)).’;
    you said that you multiply with factor to make normalization 1 .please can you prove me that.
    With best regard.

  61. najat shalash says:

    Dear Dr krishna:
    Please reply me as soon as please.You do ot reply to my questio . Please it is an urgent case for my proposal to master degree please .
    With best regards

  62. kishore says:

    hello krishna,

    could you please explain the significance of using .’ in the code
    xt = (nFFT/sqrt(nDSC))*ifft(fftshift(xF.’)).’;

    why does it not work when i use

    1) xt = (nFFT/sqrt(nDSC))*ifft(fftshift(xF(:,1:52)));

    or do seperately as

    2) xt = fftshift(xF(1:52));
    xt = (nFFT/sqrt(nDSC))*ifft(xt(1:52));

    Thanks

    • @kishore: I recall xF is a vector of 64 elements. And the 52 modulated subcarriers are not the first 52. Leaving guard subcarriers and not using DC subcarrier, we use subcarriers [-26:-1 1:26]. Agree?

  63. kebede says:

    hi kirshina
    on the above post you calculated BER with out the erfc functions can you explaine why it is written that way.i have seen the same formula in some books for it said if only for one tap.
    thanks

  64. med says:

    please, can you help me?

    how i can explain the gain of diversity between ZF and MMSE by therory?

    for exemple in my simulation of ZF and MMSE BER=f(RSB), for 0.001 error rate, i have RSB=2 db of gain .
    but i dont understand this result virtually.

  65. joel says:

    Dear,
    can you explain why are you coverting from dB once with factor 10 and another one with factor 20 ?

    I mean those lines:
    EbN0Lin = 10.^(EbN0dB/10);
    yt = sqrt(80/64)*xt + 10^(-EsN0dB(ii)/20)*nt;

    Thank you !

  66. chris says:

    Mr Krishna,
    I want just to know if you have an idea on Performance of an OFDM Communication System under a Frequency and Time Dependent Channel, I will appreciate your comment on that.

    • @chris: Most of the OFDM systems are expected to work in channel which is varying in frequency. However, for each subcarrier the channel experienced will be of flat fading and will be equalized by a single tap equalizer.

      If the channel is time varying, quite likely the system should have mechanisms to track the channel. This can be achieved by having periodic preambles and/or hard decision decoding based channel tracking.

  67. joel says:

    Dear Krishna,

    can u explain how do we have in general to scale the energy (power ?) of a time signal in order to get the mean power of 1 after ifft (or fft). What are the scaling factors that the ifft (or fft) introduce ?

    Thank You !
    Regards

    • @joel: My replies
      1/ Well, we typically scale the transmit power to 1 such that we can have precise definition of SNR when we compute BER or when we compare different modulation schemes
      2/ Scaling factor introduced by FFT/IFFT depends on the implementation. In Matlab, fft() has scaling of 1, whereas ifft() has a scaling of 1/N
      Plz refer to the link for more details.

  68. engineer193 says:

    Mr Krishna
    Thanks for ur support I want to know that how can i use

    hF=fft(ht,64,2); command in place of

    hF = fftshift(fft(ht,64,2)); if there is no alternative then pls explain me about these commands

    hF = fftshift(fft(ht,64,2));
    xt=(nFFT/sqrt(nDSC))*ifft(fftshift(xF.’)).’;

  69. engineer193 says:

    Mr Krishna
    Thanks for ur support I want to know that how can i use this command

    hF=fft(ht,64,2); in place of

    hF = fftshift(fft(ht,64,2)); if there is no alternative then pls explain me about these commands

    hF = fftshift(fft(ht,64,2));
    xt=(nFFT/sqrt(nDSC))*ifft(fftshift(xF.’)).’;

  70. nany says:

    hi Krishna,
    I workinig on simulink model – BER for DQPSK with AWGN, Rayleigh and LMS equalizer, and I dont know how can I get BER wich congruent with teoretical BER.

    Do you have any example for this?

  71. Risou says:

    hello krishna,I fully respect your work! now i have a question about OFDM,’Though the total channel is a frequency selective channel, the channel experienced by each subcarrier in an OFDM system is a flat fading channel with each subcarrier experiencing independent Rayleigh fading’you said,Now i have got the results of BER performance in SISO OFDM with 16Path of Rayleigh multipath channel. But the BER perforance of MMSE,ZF and MLD is same to flat Rayleigh case, can you give me the theory poof of it or give me some reference information?

    • @Risou: Even if we have 16path rayleigh multipath channel, if the cyclic prefix is of duration more than the channel, each subcarrier will be experiencing flat fading. If there is no Inter Symbol Interference, i think that the ZF is optimal. That might explain why you are getting identical curves for MMSE and MLD cases.

      Hope this explanation helps?

  72. hanne says:

    Dear Krishna,

    I would like to ask you about the current IEEE 802.11 a/g/n for wireless LAN.
    From what I read, OFDM is used with several choice of modulation and coding.
    How the modulation and coding are varied in the OFDM transmission.
    Do they implement adaptive modulation and coding yet?

    Thank you very much

    • @hanne: In typical PHY specifications, there will be multiple data rates which are created using a combination of modulation scheme and coding rate. For eg, in 802.11a we have 6Mbps (using BPSK) and 54Mbps (using 64-QAM). Plz check Table 78 in the 802.11a specification You may use the link to http://standards.ieee.org/getieee802/download/802.11a-1999.pdf to download.

      Which data rate to use is decided by the higher layer (MAC) based on packet error rate statistics.

      • hanne says:

        Dear Krishna,

        Thank you for your reply.
        I will refer to that document.
        By the way, i just want to ask you whether the modulation and coding in OFDM is varied by subcarrier or by the whole carrier.
        For example can different subcarrier use different modulation and coding in one transmission?

        TQVM

        • @hanne: Well, theoretically each subcarrier in an OFDM system can have a different modulation scheme. Having a different coding scheme on each subcarrier might be difficult as it might require per subcarrier coding. In typical specifications like 802.11a/n all the subcarriers in a stream uses the same modulation scheme.

  73. Filbert says:

    Khrisna,
    Thank you for your reply for my email. I admit that i used bit energy instead of symbol energy. I am fixing my program now. May i know the reference you used for this article, especially about relation between bit energy and symbol energy in OFDM?

  74. @communication: Yes, you are right that the continuous phase modulation schemes have a cleaner spectrum – relaxing the constraints on filter, PA’s etc.

    I do not have Simulink available for me for the simulations for the blog. Yes, I am fine with having guest posts running on the blog. We recently had a blog on the derivation of BPSK BER in Rayleigh channel by Jose Antonio Urigüen
    http://www.dsplog.com/2009/01/22/derivation-ber-rayleigh-channel/

  75. raj says:

    Mr Krishna
    Regarding your matlab code for OFDM using BPSK over Rayleigh Fading Channels. I tried but i failed to understand how u calculated these parameters.

    nFFT = 64; % fft size
    nDSC = 52; % number of data subcarriers
    nBitPerSym = 52; % number of bits per OFDM symbol (same as the number of subcarriers for BPSK)
    nSym = 10^4; % number of symbols

    As according to my coding BPSK in OFDM. i have used 256 bits to transmit over 256 symbols i.e. 1 bit/symbol. Using 256 point fft and IFFT. So pls advice me how can i setup my parameters.
    Acc to my knowledge in BPSK one bit is transmitted in one symbol and then it is furthur transmitted on the subcarrier.Pls correct me if i am wrong.

  76. @raj: “Acc to my knowledge in BPSK one bit is transmitted in one symbol and then it is furthur transmitted on the subcarrier.Pls correct me if i am wrong.”
    This is wrong. In OFDM, depending on the FFT size, there will be more than 1 subcarrier which is used. For eg, in 802.11a systems, we use 64pt FFT and use 52 subcarriers. If each subcarrier is BPSK modulated, then each symbol can carry 52 bits. Hope this helps.
    Please refer to posts @ http://www.dsplog.com/tag/ofdm

  77. @GRS: “cross-correlate the received signal with known channel” – we do not know the channel, do we?

Leave a Reply