Cylcic prefix in Orthogonal Frequency Division Multiplexing

In a previous post (here), we discussed in brief, Orthogonal Frequency Division Multiplexing (OFDM) transmission. Let us know probe bit more into the motivation of cyclic prefix (aka guard interval) associated with each OFDM symbol.

What is cyclic prefix?
Let us consider one subcarrier (subcarrier +1 specified in IEEE 802.11a specification) alone. In the figure shown below, the blue line corresponds to the original sinusoidal where one cycle of the sinusoidal is of duration 64 samples ( with 20MHz sampling), corresponding to subcarrier of frequency 312.5kHz.


single sine wave
Figure: Sinuosoidal with cyclic prefix

To add the cyclic prefix, 16 samples () from the end of the sinusoidal are appended to the beginning of the sinusoidal (shown in green colour). As can be seen, appending of cyclic prefix does not cause any discontinuities and we still have the original sinusoidal of frequency 312.5kHz.

Further, after adding cyclic prefix, as the sinusoidal is of duration , we now have a bigger window for choosing one period of the sinuosidal. Ofcourse, depending on which set of is chosen, the phase needs to be corrected, but that will be a trivial operation in a typical implementation.

Effect of passing a sinusoidal through a multipath channel
Let us consider a simple multipath channel of the form
.
Let the transmit symbol be a single sinusoidal .
The received signal is
.

As can be seen from the above equation, after passing through the multipath channel, the received signal is the original sinusoidal albeit with modifications in amplitude and phase.

Use of cyclic prefix in multipath channel
Cyclic prefix acts as a buffer region where delayed information from the previous symbols can get stored. The receiver has to exclude samples from the cyclic prefix which got corrupted by the previous symbol when choosing the samples for an OFDM symbol. Further, from the previous section, we learned that a sinusoidal added with a delayed version of the same sinusoidal does not affect the frequency of the sinusoidal (it only affects the amplitude and phase).
ofdm symbol with multipath
Figure: OFDM symbol with multipath

Given so, for demodulating the received symbol, the receiver can chose samples from a region which is not affected by the previous symbol. As shown in the figure above, the samples can be chosen from the blue-arrow region OR the orange-arrow region OR somewhere inbetween. 🙂

Note:
When the pertinent samples of an OFDM symbol is taken (as explained above), the orthogonality aspect in OFDM is not affected by the multipath channel i.e. eventhough the individual subcarriers undergo phase and amplitude change, as the frequency is not affected, there is no interference between the subcarriers.

Cons of cyclic prefix
Ofcourse, the flipside of adding cyclic prefix is the loss in data rate as we are conveying redundant information.

Choosing the cyclic prefix duration
Given that transmission of cyclic prefix reduces the data rate, the system designers will want to minimize the cyclic prefix duration. Typically, cyclic prefix duration is determined by the expected duration of the multipath channel in the operating environment. For example, for the indoor wireless multipath channel, the typically expected multipath channel is of around duration, hence determining the cyclic prefix chosen per the IEEE 802.11a specification.

Summary
1. Passing a sinsuodial through a multipath channel does not affect the frequency of the sinusoidal.

2. As the multipath channel does not change the frequency of the sinusoidal, multipath channel does not affect orthogonality of the subcarriers (only if the receiver chooses samples which correspond only to the delay-added versions of the samples of the current symbol).

3. Transmission of cyclic prefix reduces the data rate, hence the cyclic prefix duration should not be much more than the duration of the maximum expected multipath channel.

References
[802.11A] Wireless LAN Medium Access Control (MAC) and Physical (PHY) Layer specifications – High speed physical layer in 5GHz band

Hope this helps.
Krishna

55 thoughts on “Cylcic prefix in Orthogonal Frequency Division Multiplexing

  1. Hi Krishna,
    I have one doubt regarding the addition cyclic prefix.
    I am unable to understand, what will happen to the performance of OFDM based system if I add cyclic prefix at the end (I can’t say prefix now!!!) i.e. copy few sinusoidal carriers from beginning and add at the end of the symbol.
    I find this option (called POSTFIX hence onwards) is better than prefix as the sinusoidal will be of lower frequency in POSTFIX and change is phase can be easily estimated than that of PREFIX. What is your opinion.

    Also I was thinking that this prefix/postfix gives 2 copies of same data, can we use this redundant information to improve performance.
    Thank you.

    1. @Abhijith: Cyclic prefix vs postfix will not have any impact of the sinusoidal frequency. From a quick thought, I do not see any difference in performance between prefix vs postfix.
      The point about using the cyclic prefix to improve the performance is worth exploring. In theory, by averaging, we can reduce the impact of noise on duplicated samples (which is a subset of the total symbol) by 3dB. I do not know how much this translates to improving the per-tone SNR.

  2. Hi Krishna, thanks for your work!! I understand that cyclic prefix is nothing but adding the last bit of the symbol to the front.

    But, why do we copy the last bit of subcarriers to the front? How does this going to copy the last bit of symbol to the front?? Should we perform cyclic prefix before or after parallel to serial conversion??

    Please advice. Thank you again!

  3. Hi Krishna, excellent work there. I would like to find out a very detailed information, after performing IFFT, we should add CP before parallel to serial conversion or after?

    Another important information, your matlab code in:
    http://images.dsplog.com/db-install/wp-content/uploads/2008/08/script_ber_bpsk_ofdm_rayleigh_channel.m

    You never performed parallel serial until after channel convolution, but that is not the real case in real world implementation right? You suppose to convert to serial stream and only then convolute with the channel, please advice.

    Thanks very much.

  4. What is the overhead of the cyclic prefix? How do I calculate it and how does it effect the system data rate?

    1. @Sarath: Hmm.. let me explain by pluggin in some number from 802.11a wlan as an example.
      For 6mbps case, we have 24 bits being send in a 4us symbol (of which 0.8us is the cyclic prefix, and 3.2us is the symbol duration). If we make the cyclic prefix smaller to 0.4us, then 24bits goes in a 3.6us symbol (=3.2+0.4). The data rate becomes 6.6667us

  5. I have one doubt. At the receiver we take only the symbol which does not suffer from interference from the previous symbol. But that symbol has indeed suffered from the interference from the same symbol. Will that not affect the decoding?

    1. @Venkatraman: A sine wave added with a delayed version of itself is still the same sine wave (no change in frequency), but affects only the amplitude and phase i.e. there is no loss in orthogonality. The change in amplitude and phase can be corrected by a channel estimation block

  6. Nice explanation. I found your blog only today. I wish I had seen this before.

    Keep up the work.

    Thank you.

  7. hii…
    can u tell me how to add the cyclic prefix in matlab coding…as i know what is cylic prefix…bt i m nt getting the idea that how to copy the last 16 symbols before the 64 carriers…
    pleaseeee help me with the codes..

  8. can anyone explain the concept of estimation of frequency offset in awgn channel using ofdm technique by use of cyclic extension, guard interval, pilot insertion and etc

  9. Very useful site and ur explanations are realy good and helpfull. I’m quite new when using Matlab, but able to understand script when reading :). Therefore, I need your help and guidance because I want
    a) to graphically display the output signal from the transmitter, before the entrance to the channel, that I’m able to show degradation of the signal before and after tha chanell,
    b) also I would like to show the figure of the signal before and after adding a cyclic prefix,
    c) If there is a possibility to show the result of BER in matrix form in a way that is seen quantity if errors.

    I hope that you would be able to help by providing me the missing peace of code/script so that I can continue my work . In advance grateful.

  10. Hi..

    I have a question. Assume rect pulse shaping.

    When looking at the OFDM signal in the frequency domain, will the nulls of the sinc for each subcarrier still pass through the peaks of other subcarriers even after the addition of cyclic prefix? I doubt this because 1/(OFDM symbol duration) ~= subcarrier spacing. Subcarrier spacing = 1/(OFDM Symb time-guard time).

    If this is the case wont the subcarriers interfere? I am able to visualize the orthogonality in the time domain even after addition of CP by your explanations. But when the cyclic prefix is added it seems as if orthogonality is lost in the “freq domain” since the nulls don’t pass through the peaks of other subcarriers anymore. The PASSBAND BW for each subcarrier seems to have reduced to 2/Tofdm instead of 2/(Tofdm -Guard Time)

    Would be gr8 if you can provide an expln.
    Thanks,
    Nachi

    1. @Nachi: Adding cyclic prefix does not affect the orthogonality. Having cyclic prefix gives us the flexibility to take OFDM symbol duration worth of samples from anywhere in the OFDM symbol.

    2. I think i got your question;
      Actually adding cp will not make any problem for the orthogonality, cause, cp is adding with the original sinusoidal wave in each of the subcarrier which leads to the orthogonality again with zero ISI and no frequency changing, that is the flexibility replied Mr. Krishna . so that now we can get the original signal at the receiver by taking any symbol duration……
      Thank you. hope it will help to visualize.

  11. The Cyclic Prefix(Cp) should be greater than the maximum delay spread(mds). So is there any specific mathematical equation or relationship between CP and mds??Please reply

      1. Thanks Krishna for the reply. However could you provide any help regarding the relationship between Channel SNR and Cyclic Prefix. I mean to say is there any standard theory behind the selection of CP with respect to SNR.?? Pls rply

  12. Hi,
    In this article you said’…eventhough the individual subcarriers undergo phase and amplitude change, as the frequency is not affected, there is no interference between the subcarriers.’
    a) Do you mean the orthogonality between differenet subcarriers will be kept?
    b) And is it because all the other subcarriers in the same signal undergo the same amout change in phase?
    If my opinion is not correct,then how does it works in detail?

    Thanks for your help!
    Eric

    1. @Eric Cheung: MY replies
      a) Yes. No interference between the subcarriers
      b) No. Each subcarrier can undergo a different phase and amplitude change.

      The logic is that : if sin(wt) and sin(2wt) are orthogonal, then Asin(wt) and Bsin(wt+phi) is also orthogonal.

  13. dear sir,
    i’m working on UWB -MB-OFDM .can u plz help me giving any channel estimation code used in both multi band and single band.

    1. @BIKRAMADITYA DAS: Well, I do not have any codes for channel estimation. But I would guess, it would be some thing like
      – send a known transmit sequence x
      – assume the channel is h
      – the received signal y = hx+n
      – as x is known at the receiver, the estimate of h is = y/x = h + n/x

  14. Hi

    I have a little doubt about correct position of fft window. In different articles and papers it is mentioned that fft window should be aligned with the strongest multipath signal.
    You have aligned it with your first multipath component in the above figure. What if strongest multipath components are delayed relative to the first arriving paths.

    In other words suppose this is my channel impulse response
    h=[0.1 1 0.2 0 0.3]
    How can I extract the info using the signal delayed by one sample. Because first copy of signal is difficult to be found at the reciever due to noise and synchronization issues.

    1. @jenna: Well, as long as the multipath does not cause ISI, its best to collect all the copies of the received signal.

      If for some reason, you dont want to pickup the pre-cursor taps, its also fine. Just make sure that the channel estimation is also done on the preamble which is extracted in the same way. That will take care of the phase rotation due to the channel.

    1. @srikanth: I have not studied the topic, but a quick googlig gave me the paper
      Cyclic Prefixing or Zero Padding for Wireless Multicarrier Transmissions? – Bertrand Muquet, Zhengdao Wang, Georgios B. Giannakis,
      Marc de Courville and Pierre Duhamel, IEEE TRANSACTIONS ON COMMUNICATIONS, VOL. 50, NO. 12, DECEMBER 2002

      Some key points:
      1) the presence of zeros between the symbols ensure that there is no inter symbol interference. Hence channel becoming 0 is less likely and we are better off.
      2) I think the receiver equalization is bit more complex, but did not understand that aspect well.

      I would urge you to refer to the above paper for further details.

      1. very useful site and ur explanations are realy good.Iam working on an project in mimo ofdm i want to design an ofdm and use mimo in it . i would be thankful if u could help me.thanking u in advance.

  15. hello…
    we didn get the exact meaning of cyclic prefix..hw can i implement it in ofdm channel.if possible can u plz provide us the code.

  16. 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?

    1. @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.

  17. @ venkatesh:
    May I point you to a nice article on CommsDesign from Anuj Batra et al (Texas Instruments).
    URI: http://tinyurl.com/yvfvu3

    As explained in the artcle, in multband OFDM, the transmission of an OFDM symbol of bandwidth 500MHz is performed on three channels (with the transmissions seperated in time).

    To enable the transmitter (and receiver) to switch channels there is small gap of 9.5ns (called as guard interval) where there is no information transmitted.

    Further, as in typical ofdm implementations, there is a cylcically rotated version of each ofdm symbol appended to tbe beginning of the symbol (called as cylcic prefix). Ref: Fig2.

    The chosen value of cylcic prefix should ideally be longer than maximum expected channel delay (to avoid inter symbol interference). However, long cyclic prefix implies a loss in data rate. Based on simulations, cylcic prefix duration of 60.6ns is chosen. (Ref: Fig4)

    Hope this helps. Kindly revert for clarifications.

Leave a Reply

Your email address will not be published. Required fields are marked *