(12 votes, average: 4.67 out of 5)

# Cylcic prefix in Orthogonal Frequency Division Multiplexing

by on February 17, 2008

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 ($3.2\mu s$ with 20MHz sampling), corresponding to subcarrier of frequency 312.5kHz.

Figure: Sinuosoidal with cyclic prefix

To add the cyclic prefix, 16 samples ($0.8\mu s$) 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 $4\mu s$, we now have a bigger window for choosing one period of the sinuosidal. Ofcourse, depending on which set of $3.2\mu s$ 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
$h(t) = \alpha_1\delta(t-t_1)+\alpha_2\delta(t-t_2)$.
Let the transmit symbol be a single sinusoidal $x(t) = e^{j2\pi f_1 t}$.
$\begin{eqnarray}y(t) &= &x(t)\ast h(t) \\ & = & \alpha_1e^{j2\pi f_1(t-t_1)} + \alpha_2e^{j2\pi f_2(t-t_2)} \\ & = & e^{j2\pi f_1t}\left[\underbrace{\alpha_1e^{-j2\pi f_1 t_1} + \alpha_2e^{-j2\pi f_1 t_2}}\right]\end{eqnarray}$.

As can be seen from the above equation, after passing through the multipath channel, the received signal is the original sinusoidal $x(t)$ 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).

Figure: OFDM symbol with multipath

Given so, for demodulating the received symbol, the receiver can chose $3.2\mu s$ 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 $0.8\mu s$ 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.

Hope this helps.
Krishna

D id you like this article? Make sure that you do not miss a new article by subscribing to RSS feed OR subscribing to e-mail newsletter. Note: Subscribing via e-mail entitles you to download the free e-Book on BER of BPSK/QPSK/16QAM/16PSK in AWGN.

Abhijith November 16, 2012 at 8:36 pm

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.

Krishna Sankar November 18, 2012 at 6:53 am

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

Me October 31, 2012 at 4:09 pm

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

Krishna Sankar November 2, 2012 at 7:03 am

@Me: It is appending of last few samples of the time domain samples (after ifft) to the front.

Me November 2, 2012 at 4:13 pm

Thanks very much Krisha, it makes sense now! Cheers!

Mar September 23, 2012 at 4:29 am

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:

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.

Krishna Sankar September 26, 2012 at 5:33 am

@Mar:
In the code, each ofdm symbol is getting convolved with a different channel realization.

Sarath April 25, 2012 at 11:16 am

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

Krishna Sankar April 26, 2012 at 5:52 am

@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

Venkatraman March 28, 2012 at 1:49 pm

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?

Krishna Sankar March 29, 2012 at 5:28 am

@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

Venkatraman March 28, 2012 at 1:23 pm

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

Keep up the work.

Thank you.

Husain February 20, 2012 at 8:55 am

Hi krishna,

You are doing a wonderful job. Stay blessed!

shraddha January 25, 2012 at 2:48 pm

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

Krishna Sankar January 26, 2012 at 6:26 am

@shraddha: Should be reasonably straightforward. For eg, if
x = [1 2 3 4 5 6 7 8]; and if you wish to copy the last to samples to the first
x_wth_cp = [x(7:8) x];
helps?

arun January 4, 2012 at 9:39 am

what is the meaning of physical layer implementation based on 802.11g using ofdm?

Krishna Sankar January 5, 2012 at 5:10 am

@arun: You might have heard about the OSI model having seven layers. The layers are used to characterize different logical blocks in a communication link.
http://en.wikipedia.org/wiki/OSI_model

Physical layer is the one which pushes the bits over wired, wireless etc.
http://en.wikipedia.org/wiki/Physical_layer

srikant kumar dyan samantara December 24, 2011 at 10:27 pm

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

Krishna Sankar January 3, 2012 at 4:40 am

@srikant: The frequency offset estimation on 802.11a short preamble using autocorrelation is discussed at
http://www.dsplog.com/2008/03/03/frequency-offset-estimation-using-80211a-short-preamble/

vajihe December 18, 2010 at 12:11 am

it is very good for me.this site is very good for me and i will use it.

uday November 11, 2010 at 7:59 pm

hi
can u say me how to add a delay to the signal.
later adding a factor say a factor of 0.2 to it

Krishna Sankar November 14, 2010 at 10:33 am

@uday: In Matlab, if you have a vector x = [1 2 3 4 ], then delay can be notionally added by x_delay = [0 0 0 x]; Helps?

anesa November 1, 2010 at 2:20 am

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.

Krishna Sankar November 15, 2010 at 2:24 am

@anesa: You can add plot() commands at each stage.

Nachi October 31, 2010 at 8:49 pm

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

Krishna Sankar November 18, 2010 at 5:22 am

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

Tanbir December 3, 2012 at 1:31 pm

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.

Budhaditya Bhattacharyya October 27, 2010 at 1:16 pm

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

Krishna Sankar November 17, 2010 at 5:26 am

@Budhaditya: Well, if we want to prevent Inter Symbol Interference, the CP should be longer than the delay spread.

Budhaditya Bhattacharyya November 18, 2010 at 10:43 am

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

Krishna Sankar November 19, 2010 at 5:40 am

@Budhaditya : I do not think that the SNR and CP are related. Why do you think so?

ELIJAH.LEE April 24, 2010 at 6:29 pm

Thx ur nice work!I like your website very much!

Eric Cheung March 7, 2010 at 5:07 pm

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?

Eric

Krishna Sankar March 30, 2010 at 4:24 am

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

Michael February 7, 2012 at 9:56 am

is there should be Bsin(2wt+phi)?

Krishna Sankar February 10, 2012 at 5:59 am

@Michael: where?

lakshmi January 30, 2010 at 2:44 pm

I’m working on ofdm.very useful website.thanks

Krishna Sankar April 4, 2010 at 4:37 am

@lakshmi: Thanks

BIKRAMADITYA DAS November 30, 2009 at 4:28 pm

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.

Krishna Sankar December 7, 2009 at 4:56 am

@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

bakkar November 15, 2009 at 3:07 am

pls do you have the matlab code show the effect of the cyclic prefix in the ofdm system .pls advaise me

Krishna Sankar December 3, 2009 at 5:35 am

@bakkar: Please look at the post on BER for BPSK in OFDM with Rayleigh multipath channel.
http://www.dsplog.com/2008/08/26/ofdm-rayleigh-channel-ber-bpsk/
In that you can see that though there is multipath, there is no intersymbol interference, thanks to the cyclic prefix.

jenna November 8, 2009 at 5:11 pm

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.

Krishna Sankar November 12, 2009 at 5:31 am

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

srikanth June 10, 2009 at 2:26 pm

Krishna Sankar June 11, 2009 at 4:47 am

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

sowmia March 2, 2010 at 5:40 pm

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.

Krishna Sankar March 30, 2010 at 4:37 am

sona March 20, 2009 at 2:54 pm

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.

Krishna Sankar March 21, 2009 at 4:56 pm

@sona: Cylcic prefix is inserted by just copy pasting last N samples of a symbol to the beginning of the symbol. The post simulating BER with OFDM in Rayleigh multipath channel discuss insertion of cyclic prefix. Please refer
http://www.dsplog.com/2008/08/26/ofdm-rayleigh-channel-ber-bpsk/

Hope this helps.

Masum March 19, 2009 at 4:20 pm

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?

Krishna Sankar March 21, 2009 at 4:04 pm

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

Krishna Sankar March 22, 2008 at 2:09 pm

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