(7 votes, average: 4.86 out of 5)

# Frequency offset estimation using 802.11a short preamble

by on March 3, 2008

From the previous post on OFDM (here), we have understood that an OFDM waveform is made of sum of multiple sinusoidals (also called subcarriers) each modulated independently. In this post, let us try to understand the estimation of frequency offset in a typical OFDM receiver (using the short preamble specified per IEEE 802.11a specification as a reference).

## Understanding frequency offset

In a typical wireless communication system, the signal to be transmitted is upconverted to a carrier frequency prior to transmission. The receiver is expected to tune to the same carrier frequency for downconverting the signal to baseband, prior to demodulation.

Figure: Up/down conversion

However, due to device impairments the carrier frequency of the receiver need not be same as the carrier frequency of the transmitter. When this happens, the received baseband signal, instead of being centered at DC (0MHz), will be centered at a frequency $f_{\Delta}$, where
$f_{\Delta} = f_{Tx} - f_{Rx}$.

The baseband representation is (ignoring noise),

$y(t) = x(t)e^{j2\pi f_{\Delta}t}$, where

$y(t)$ is the received signal

$x(t)$ is the transmitted signal and

$f_{\Delta}$ is the frequency offset.

## Frequency offset estimation in 802.11a OFDM preamble

From the IEEE 802.11a specifications (Sec 17.3.3), it can be observed that each OFDM packet has a preamble structure formed using 10 short preambles of duration $0.8\mu s$ each. This short preamble is constructed by defining 12 subcarriers only (out of the available 52 subcarriers) where the modulation of individual subcarriers ensure a low peak to average power ratio.

Figure: OFDM short preamble 802.11a specification

From the equation defined in the previous section,

$y(t) = x(t)e^{j2\pi f_{\Delta}t}$.

Given that short preamble is perodic with $\delta t = 0.8\mu s$,

$y(t-\delta t)=x(t)e^{j\2 \pi f_{\Delta} (t- \delta t)$.

At the receiver as both $y(t)$ and $y(t-\delta t)$ are known,

$\begin{eqnarray}y(t-\delta t) y^*(t) & = & x(t)e^{j2 \pi f_{\Delta}(t-\delta t)}x^*(t)e^{-j2 \pi f_{\Delta}t} \\ & = &|x(t)|^2e^{j2\pi f_{\Delta}-\delta t}\end{eqnarray}$.

Taking angle() of both sides of the equation

$\begin{eqnarray}\angle{y(t-\delta t) y^*(t)} &=&\angle{|x(t)|^2e^{j2\pi f_{\Delta}-\delta t}}\\& =&- 2\pi f_{\Delta}\delta t\end{eqnarray}$.

So, the frequency offset $f_{\Delta}$ is,

$f_{\Delta}=-\frac{\angle{y(t-\delta t) y^*(t)}}{2\pi \delta t}$.

## Simulation model

Simple Matlab/Octave script simulating generation of 802.11a short preamble, introducing frequency offset of 200kHz and estimating frequency offset is provided. Click here to download.

Figure: Plot of frequency offset estimate using 802.11a short preamble

As can be observed starting from sample number 17 (i.e. after $\delta t = 0.8\mu s,\ fs=20MHz$ ) and till samples number 160 ($8\mu s,\ fs=20MHz$) the frequency offset estimate is available. For improving accuracy in the presence of noise, typically the output $y(t-\delta t)y^*(t)$ is accumulated prior to computation of angle.

## Maximum possible frequency offset which can be estimated

It is known that limits of the phase estimated by the angle() function is from $[-\pi, +\pi)$. Plugging this to the above equation, the minimum value of frequency offset value which can be estimated is,

$f_{\Delta , min}=\frac{-\pi}{2*pi*\delta t} = -625kHz$

and the maximum value is,

$f_{\Delta , max}=\frac{+\pi}{2*pi*\delta t} =+ 625kHz$.

From Sec17.3.9.4 (of IEEE 802.11a specification), the center frequency tolerance is $\pm 20ppm$. With a carrier frequency of 5.8GHz, this specification corresponds to a frequency offset within the range $\pm232kHz$. Thankfully, this is within the ‘estimatable’ range of frequency offsets which which can be estimated by the short preamble .

Note:
We have not discussed the effect of inter carrier interference (ICI) between the sub-carriers which happens in the presence of frequency offset. Maybe we can discuss in a later post.

## References

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.

achuse December 1, 2012 at 9:01 pm

sir,

why 10 short preambles are used?

Krishna Sankar December 4, 2012 at 6:20 am

@achuse: The 10 short preambles correspond to around 8us. This gives time for the receiver packet detection, automatic gain control loop (AGC), frequency offset estimation etc

achuse December 8, 2012 at 10:09 am

Thank you sir,
for the frequency estimation the time difference between two short preambles are enough? so for frequency estimation no need of 10 preambles?

Krishna Sankar December 12, 2012 at 5:30 am

@achuse: ideally, two short preambles are enough. however, to get better noise averaging one would go for accumulation over a longer window

achuse December 13, 2012 at 6:02 pm

thank you sir

mahdi November 18, 2012 at 8:45 am

hi dear Krishna and friends
please help me, I urgently need a MATLAB program for simulation ofdm channel estimation based on (Block or Comb)-Type Pilot in AWGN channel and fading(flat and frequency-selective) channel using LS(Least Square) & ZF(Zero Forcing) & MMSE(Minimum Mean-Square Error) or MLSE(Maximum Likelihood Sequence Estimation) algorithms.

thanks for fast response

Vamsikrishna July 5, 2012 at 4:23 pm

Hi, can you please explain how you have assumed the sampling frequency to be 20 MHz ? How will changing the sampling frequency affect the frequency offset value estimated ?

Krishna Sankar July 6, 2012 at 5:47 am

@Vamsikrishna: with a sampling frequency of fs, the range of frequencies which we can ‘see’ is from [-fs/2, fs/2). Ideally, the change of sampling frequency should not affect the value of frequency offset which is estimated. However, if the sampling frequency reduces, it can happen that higher value of frequency offset can cause the phase to wrap around [-pi,pi).

srikant February 9, 2012 at 9:09 am

respected experts,
can anyone send me the matlab codings for estimation of frequency offset in awgn channel using ofdm technique

Hi Krishna;

Thank you for you post. One thing that I wanted to check was if what you were trying to do there is a cross-correlation between the transmitted signal and the offset-ed one since the offset here is affecting the whole OFDM symbol and not an Inter carrier offset. So it was in this order: 1. Cross-correlation between the transmitted (after applying the ifft) and the offseted signal, 2. Applying the fft of the result to estimate the delay ?

Thx

Krishna Sankar May 23, 2011 at 2:07 am

@Baal Hadad: Well, the idea in this post is not doing cross-correlation. Its correlating the received signal with a delayed version of itself.

Erick November 16, 2010 at 6:51 pm

Hello Krishna, I have a short question with the matlab code. Why is the “inputFFTShortPreamble” designed like that? How this design make sure that all the 10 short preambles (each with 16 samples) are identical?

Krishna Sankar November 17, 2010 at 4:57 am

@Erick: If we look at the frequency response of the short preamble, we can find that one out of four subcarriers are populated. Its like oversampling by 4 in the frequency domain, and this results in 4 repeated bunch of 16 samples in time domain.

Erick November 17, 2010 at 10:08 pm

@Krishna: ok, I see. Thanks very much.
One further question
One out of four subcarriers are populated in the frequency domain for the “inputFFTShortPreamble”. These 12 subcarriers are set to either “1+j” or “-1-j”. I think this is for the purpose of having low PAPR. But when I changed the first “1+j” to “1-j” and the last “1+j” to “-1+j”, the result curve is totally incorrect. The estimated FO becomes zero for every 8 samples numbers.
What’s the reason?

Krishna Sankar November 18, 2010 at 4:31 am

@Erick: I think once you give the estimate the time to settle (16 samples), find that the estimation is accurate. Is that the case with you too?

Erick November 18, 2010 at 2:46 pm

@Krishna: My case is that for some of the sample points, the estimate FO is zero, which is not the case cause we set the FO to be 200Hz.

I checked the code and preambles, I found one problem that by changing the first “1+j” to “1-j” and the last “1+j” to “-1+j”, some sample points become zero. That is why the estimate FO is zero, because when you multiply the zero’s conjugate by zero, the results are zeros and then the angle are zeros.

Anyway, I think this is not related with the estimate time. But it is related with the design of the preambles. The preamble, which is 160 samples, has 10 repeated short preambles and none of the 160 samples should be zero.

Am I right?

preet September 5, 2010 at 11:20 pm

please tell me how the training symbol reduces the synchronization,please explain .

Krishna Sankar September 6, 2010 at 5:10 am

@preet: Using the training symbol, the receiver can estimate frequency offset, channel etc which helps to achieve synchronization with the transmitter.

Haleh July 30, 2010 at 3:12 pm

Hi Krishna,
I need to customize wavelet packet decomposition by iir filter design,but I don’t know how to do it?

Krishna Sankar August 2, 2010 at 5:46 am

@Haleh: Sorry, am not familiar with wavelet decomposition

Tien Dzung March 11, 2010 at 9:54 am

Hi Kirshna,
I am simulating FO estimation and compensation in OFDM system. I add AWGN noise in the transmission, then introduce FO, lastly, estimate the FO but it fluctuates very much (have negative and positive FO). I sum all of them and divide to take averaging result but not accurate.
How to improve the accuracy?

Krishna Sankar March 28, 2010 at 3:55 pm

@Tien Dzung: Try averaging the complex number which is used to estimate the phase (which corresponds to frequency offset).

SARA' February 12, 2010 at 2:32 pm

Hi Kirshna,

I wondering if you could help in this problem.
I want to add the Sampling Frequency Offset (SFO) in my OFDM system simulation. I believe that I should do that in time domain, but dont know exactly how???
I apperciate you help

Regards

Krishna Sankar April 4, 2010 at 4:01 am

@SARA: Well, I also have not discussed addition of sampling frequency offset in the model.

Nils Ole February 3, 2010 at 6:18 pm

Hi Krishna, nice article, helped me a bit to implement a similar frequency estimation algorithm.
In your matlab script the computation of op seems unnecessary complex though. How about (didn’t test this in matlab for typos)

% estimating frequency offset
op = conj(yt(1:end-0.8*fsMHz)).*yt(1+0.8*fsMHz:end);
fdeltaEstimatekHz = -1*angle(op)/(2*pi*0.8*1e-6)/1000;

Do you see my point?
Cheers, Ole

murali February 9, 2010 at 12:05 pm

i am doing my project on same topic..
iam implementing “CARRIER FREQUENCY OFFSET ESTIMATION FOR OFDM SYSTEMS USING NULL SUBCARRIERS”

IEE TRANSACTIONS ON COMMUNICATIONS VOL 54 NO 5.. MAY 2006..

I need badly matlab code for this paper can u send to my gmail..

Krishna Sankar April 4, 2010 at 4:11 am

@murali: Sorry, no

Krishna Sankar April 4, 2010 at 4:24 am

@Nils Ole: As long as they are mathematically equivalent, any coding style will do

lchen January 28, 2010 at 1:30 pm

I understand now.

Krishna Sankar April 4, 2010 at 4:50 am

lchen January 26, 2010 at 8:14 am

The ariticle is good.
But something is wrong, right?
$y(t-\delta t) = x(t – \delta t) * e^{}$
not
$y(t-\delta t) = x(t) * e^{}$

Krishna Sankar January 28, 2010 at 5:42 am

@Ichen: Thanks.
The catch is
x(t – \delta t) = x(t) ; as the preamble is periodic with \delta t = 0.8us.
Agree?

zuan January 14, 2010 at 3:56 pm

Hello Krishna.
How to decide the CFO value in Hard Decision Parallel Interference Cancellation for uplink OFDMA ?
an example:
BER performance for N=64, K=a, CFO=[-0.09 0.1 -0.08 0.05]

for the journal:
Lakshmish R, “Hard Decision Parallel Interference Cancellation for uplink OFDMA “

pc December 16, 2009 at 10:25 am

Hi.Will frequency offset value varies in accordance with the cyclic prefix?

Krishna Sankar December 22, 2009 at 6:02 am

@pc: Well, no. The frequency offset is modelled as
y(t) = x(t)*exp(j*2*pi*f_delta*t)

Sundari December 11, 2009 at 5:17 pm

Hi Krishna,
Help me out.Kindly explain the graph in detail.

Krishna Sankar December 22, 2009 at 5:19 am

@Sundari: The graph plots the estimate of the frequency offset versus time (sample)

sundari January 6, 2010 at 7:05 pm

Thank u krishna….

Emmanuel December 8, 2009 at 2:52 pm

Hello Krishna.
Can you make a comparison on BER for OFDM sysytems With and Without CFO estimation

Krishna Sankar December 10, 2009 at 6:00 am

@Emmanuel: Without CFO estimation and compensation, the BER will be poor. I have a post on Inter Carrier Interference in OFDM due to carrier frequency offset
http://www.dsplog.com/2009/08/08/effect-of-ici-in-ofdm/

jenna November 29, 2009 at 8:41 pm

Hi,

Can you please tell me how to remove the residual frequency offset using pilots in ofdm. The initial frequency offset removal is insufficient in the presence of noise and you know how much sensitive this ofdm is to frequency offsets.

If you have any guiding material or link related to it, please tell me that too.
Thank you.

Krishna Sankar December 7, 2009 at 4:52 am

@jenna: I have not discussed the pilot based residual frequency offset estimation. The algorithm is reasonably simple – due to frequency offset, the samples undergo a linear phase change in time domain = constant phase shift in frequency domain. As we know the reference phase (as the pilots are known), we can take the average of the phases from multiple pilot subcarriers to compute the constant phase shift in frequency domain.

Selvi November 18, 2009 at 9:29 pm

Hi! Krishnan Sir, May I know the various methods of calculating Frquency Offset in OFDM systems

Krishna Sankar December 6, 2009 at 4:12 pm

@Selvi: I have discussed one method here. Can you please share your thoughts on other methods.

joel November 12, 2009 at 4:04 pm

I mean of course a real system in the question above. And one more question, how do we calculate the frequency offset in ppm if there is a IF stage ? Does it accumulate somehow before processing in baseband ?

Regards

Krishna Sankar December 3, 2009 at 5:15 am

@joel: Well, evenif there is an IF stage, at the baseband level, it does not matter. At the receive baseband, we are trying to find out the frequency offset introduced by all RF stages.

joel November 11, 2009 at 11:45 pm

Dear Krishna,
does the oscillator on the receiver side have a constant frequency offset or is that rather a drift ? If its a drift, is there a possibility to track it without sending repeatedly the preamble ? I mean sth. like sending the preamble and then track it with help of pilots ? Do you see any problems with estimating the frequency offset in case of MIMO systems or Alamouti scheme ?
Thank you !

Krishna Sankar November 13, 2009 at 5:36 am

@joel: Typically, we assume constant frequency offset. Even after frequency offset correction, there will be error and those error are tracked using pilots.
No problems for frequency offset estimation in MIMO schemes.

joel November 13, 2009 at 7:31 pm

Thank you for the reply Krishna. Considering the frequency noise which varies in time (like AWGN), is it also tracked and corrected in real systems or is it just a design parameter and can not be corrected ?

Regards

Krishna Sankar December 3, 2009 at 5:24 am

@joel: Typically frequency offset remains constant through out a packet (which can be in the order of 3-4 milli seconds). Frequency offset is corrected and tracked – else the BER impact on OFDM systems is high.

Sadaf October 29, 2009 at 3:13 pm

hey karishna just want your help regarding Frequency offset estimation using 802.11a short preamble
i got your program but in that u have introduce frequency offset just in the short preamble my question is we have to
introduce frequency offset in the whole data stream or just in the short preamble and why????
another thing which i wnt to discuss is that in ur articl u have written that ” It is known that limits of the phase estimated by the angle() function is from [-pie,+pie] ” … what if it is greater thn pie?????? in the paper mentioned below , given the solution for such case but i really cant understand =( can u plzzzzzzzzz help me out ……
“Robust Frequency and Timing Synchronization for OFDM
Timothy M. Schmidl and Donald C. Cox, Fellow, IEEE”
and also how to correct the freq offset?????

Krishna Sankar November 8, 2009 at 8:00 am

1/ I used only short preamble as that was sufficient for the topic under discussion. For introducing, frequency offset for the rest of the time domain samples, just multiply by exp(j*2*pi*fd*t)
2/ If its greater than [-pi, pi), it will wrap around to a value within [-pi,pi) range

Ali Ali October 3, 2009 at 7:04 pm

My Dear Krishna Sankar
please you have information about Wavelet packet in OFDM, can you help me?

Krishna Sankar October 8, 2009 at 5:19 am

@Ali: Sorry, I do not know about wavelet packet in OFDM. Good luck.

jamal September 27, 2009 at 10:13 pm

Question,
When your taking angle of both sides, “Taking angle() of both sides of the equation”.

The solution drops out |x(t)|^2. What happens to this term. Looks like I am missing something obvious here. Unless the preamble is designed to have unity power .

Krishna Sankar October 1, 2009 at 5:18 am

@jamal: The term |x(t)|^2 is a real number and hence angle is zero. Hence that term does not play a role in the angle computation. Agree?

S.Nisharani September 16, 2009 at 9:27 am

hi krishna
i m new to ofdm. i m a M.E communication systems final yr student.
i m doing myproject regarding blind CFO estimation.i have one doubt that how to find the SNR for my estimate

Krishna Sankar September 18, 2009 at 5:47 am

@Nisharani: From the received signal, I guess you will be having a rough idea of your signal power. Further, you will be aware of your noise floor too. Both the values should help you compute the SNR.

syed July 29, 2009 at 3:53 pm

hye krishna,

i am a new user and working on dvb-t assignment in my uni,i have just 1.5 months time,my assignment here is to transmit on ofdm signal by using dvb-t parametre and then introduce any error by means of either awgn channel or anything and the part which i have to do is to implement the synchronisation technique which can remove the frequency offset,
i am really depressed by this cuz no time left.will be able to help me out.

ofdm transmission and reception is found here from the

i have to introduce the frequency offset in this code and then remove the frequency offset by means of anything like , resampling, pilot symbol method or guard insertion method etc.
hope u will be able to help me out.

Krishna Sankar July 30, 2009 at 5:33 am

@syed: The link is not working. Does the DVB-T has a periodic preamble type sequence in time domain? If yes, you can adapt the approach discussed in this post to estimate frequency offset.

Kamran July 18, 2009 at 12:30 pm

Dear Krishna, When you are going to post (1) Timing offset estimation and (2) The effect of ICI between the sub-carriers which happens in the presence of frequency offset.

Krishna Sankar July 19, 2009 at 8:59 am

@Kamran: I will add these to my to-do list. Quite likely I will post about effect of ICI in another two weeks.

cc June 29, 2009 at 1:43 am

The preamble duration should be 8us

Krishna Sankar June 30, 2009 at 5:11 am

@cc: Its indeed 8us. Please pardon the typo in Figure. Though I showed only 10 short preambles of 0.8us, I incorrectly wrote in the legend as 10us.

gaaza May 4, 2009 at 1:48 pm

hi krishna,
if there is carrier offset, will it not affect detection using 10 short symbols …i reckon there are 10 peaks at a distance of .8us at the output of matched filter and what effect carrier freq offset has on those peakes?

Krishna Sankar May 12, 2009 at 5:04 am

@gaaza: Yes, in presence of carrier offset, the peak to side lobe ratio at matched filter output will become smaller as the reference signal does not include the effect of carrier offset. However, note that autocorrelation power is not affected by carrier offset.

sandeep January 15, 2009 at 4:14 pm

While looking at matlab code i got one small doubt. Why you havenot used conv function instead of for loop for y(t)*y(t-x)
operation?

Krishna Sankar January 16, 2009 at 6:28 am

@sandeep: For the y(t)*y(t-x), we cannot use the convolution operation. OR do you think otherwise?

sandeep January 16, 2009 at 8:59 am

Remember reading somewhere that autocorrelation and convolution operation are related. Need to check it again. I will check the text and come back.

Krishna Sankar January 17, 2009 at 7:54 pm

@sandeep: I think I follow your perspective. You are right, there is a relation between autocorrelation can be described as convolution a signal with time reversed copy of the signal. Note that, autocorrelation output is computed all values of delay. However, in this example we are finding for only ONE value of delay (viz 0.8us).
Does that help?

MUTHUKRISHNAN December 3, 2008 at 11:38 pm

Thank you krishna.
I understand it now.

Krishna Sankar December 2, 2008 at 6:12 am

@MUTHUKRISHNAN:
The variable outputiFFT is of length 64 samples and each short preamble is of duration 16 samples.So the total is 4 + 4 + 2 = 10 short preambles.

On the second part of your question:
Typically it depends on the specification. Short preamble is constructed as defined above. Long preamble is constructed by appending 1.6us worth of samples.

Hope this helps.

MUTHUKRISHNAN November 30, 2008 at 4:07 am

Hi krishna,
I am new to OFDM and I am using all your programs and articles to get a better understanding of the concept. In the matlab script , the following lines
“% concatenating multiple symbols to form 10short preamble
outputShortPreamble = [outputiFFT outputiFFT outputiFFT(1:32)]; ”
you have said that you are forming 10 short preamble but the code is concatenating only two symbols and half of the thrird symbol. How does it account for 10 symbols.
Can you give me a hint on what that peice of code does?

I have got another question, if I am going to transmit an OFDM data with 10 short preambles and then 2 long preambles, do I have to add prefix to all the 12 training symbols individually?

Than you.

Krishna Sankar July 23, 2008 at 5:38 am

@Bheema: As I understand, using virtual carriers for frequency offset estimation is an iterative computational intensive process, hence not typically used in 802.11a.

Having said that, big plus of using virtual carriers is that it has a bigger estimation range. So, in cases where the frequency offset is large a coarse estimate using virtual carriers + fine estimate maybe warranted.

Infact, while at Stevens Institute of Technology, I worked under the guidance of Prof. Tureli to demonstrate experimentally the frequency offset estimation using the virtual carriers. The summary can be found here –
U. Tureli and K. M. Pillai, “Analytical and Experimental studies on carrier frequency offset estimation algorithms for OFDM systems,” in 37th IEEE Asilomar Conference on Signals, Systems and Computers (Asilomar’03), Nov. 2003, vol. 1, pp.174-178.

Bheema July 22, 2008 at 12:55 pm

BTW, are virtual carriers used in practice for frequency offset estimation in 802.11a

Krishna Sankar July 21, 2008 at 12:47 pm

@Bheema: Note that the transmitter can have a +20ppm and receiver a -20ppm offset. Hence the estimation capability should be 5.8e9*40e-6/1e3 = +/-232kHz.

Bheema July 21, 2008 at 12:20 pm

In your example for the frequency offset, 20ppm for 5.8Ghz center frequency, the frequency offset should be +/- 116kHz

Murali November 2, 2012 at 10:08 am

Yes, me too had the same doubt. I expected +/-116kHz

Krishna Sankar November 12, 2012 at 7:08 am

@Murali: The +20ppm at 5.8GHz causes 116kHz. However, note that for the worst case transmitter can have +20ppm and receiver can have -20ppm, resulting in a total of 40ppm difference between the tx and rx

Krishna Sankar March 11, 2008 at 5:07 am

@ Abishek: Thanks. I have added your blog to my blogroll too.

Abhishek Ballaney March 10, 2008 at 12:11 pm

Krishna, your blog is also added in my blog roll, so that visitors can come here too…

Abhishek Ballaney March 10, 2008 at 9:33 am

Hey Krishna! Thanks for visiting my blog & commenting. Btw, i won’t be here in B’lore during that time…hoping to meet you next time at some other event…till then, keep blogging!