(19 votes, average: 4.63 out of 5)

# Inter Carrier Interference (ICI) in OFDM due to frequency offset

by on August 8, 2009

In this post, let us evaluate the impact of frequency offset resulting in Inter Carrier Interference (ICI) while receiving an OFDM modulated symbol. We will first discuss the OFDM transmission and reception, the effect of frequency offset and later we will define the loss of orthogonality and resulting signal to noise ratio (SNR) loss due to the presence of frequency offset. The analysis is accompanied by Matlab/Octave simulation scripts.

## OFDM transmission

As discussed in the post on Understanding an OFDM transmission,  for sending an OFDM modulated symbol, we use multiple sinusoidals with frequency separation $\frac{1}{T}$ is used, where $T$ is the symbol period. The information $a_k$ to be send on each subcarrier $k$ is multiplied by the corresponding carrier $g_k(t)=e^{\frac{j2\pi kt}{T}}$ and the sum of such modulated sinusoidals form the transmit signal. Mathematically, the transmit signal is,

$\begin{eqnarray}s(t) &= &a_0g_0(t) + a_1g_1(t)+\ldots+a_{K-1}g_{K-1}(t)\\ & = &\sum_{0}^{K-1}a_kg_k(t) \\&=&\frac{1}{\sqrt{T}}\underbrace{\sum_{0}^{K-1}a_ke^{\frac{j2\pi kt}{T}}}\ w(t) \end{eqnarray}$

The interpretation of the above equation is as follows:
(a) Each information signal $a_k$ multiplies the sinusoidal having frequency of $\frac{k}{T}$.
(b) Sum of all such modulated sinusoidals are added and the resultant signal is sent out as $s(t)$.

## OFDM reception

In an OFDM receiver, we will multiply the received signal with a bank of correlators and integrate over the period $T$. The correlator to extract information send on subcarrier  $k$ is$c_m(t)=\frac{1}{\sqrt{T}}e^{-\frac{j2\pi mt}{T}}$.

The integral,
$\begin{eqnarray}\frac{1}{\sqrt{T}}\int_Ts(t)e^{-\frac{j2\pi mt}{T}} & = & a_k,& m=k\\ & = & 0, & m\ne k\end{eqnarray}$,

where
$m$ takes values from $0$ till $K-1$.

## 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 down-converting 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) = s(t)e^{j2\pi f_{\delta}t}$, where

$y(t)$ is the received signal

$s(t)$ is the transmitted signal and

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

## Effect of frequency offset in OFDM receiver

Let us assume that the frequency offset $f_{\delta}$ is a fraction of subcarrier spacing $1/T$ i.e.
$f_{\delta}=\frac{\delta}{T}$.

Also, for simplifying the equations, lets us assume that the transmitted symbols on all subcarriers,  $a_k=1$

$y(t) = s(t)e^{\frac{j2\pi\delta }{T}t}$.

The output of the correlator for sub-carrier $m$ is,

$\begin{eqnarray}\frac{1}{\sqrt{T}}\int_Ty(t)e^{-\frac{j2\pi mt}{T}} & = & \frac{1}{T}\int_{T}e^{\frac{j2\pi (k+\delta-m)}{T}t},& m=\in \{0,...,K-1\}\\ & = & \frac{1}{j2\pi (k+\delta-m)}(e^{j2\pi (k+\delta-m)}-1) & \end{eqnarray}$.

For  $\delta=0$,

$\begin{array}{rrr}\frac{1}{j2\pi(k+\delta-m)}(e^{j2\pi (k+\delta-m)}-1)&=1, &m=k\\ \frac{1}{j2\pi(k+\delta-m)}(e^{j2\pi (k+\delta-m)}-1)&=0, &m \ne k\\\end{array}$

The integral reduces to the OFDM receiver with no impairments case.

However for non zero values of $\delta$, we can see that the amplitude of the correlation with subcarrier $m$ includes

• distortion due to frequency offset between actual frequency $\frac{m+\delta}{T}$ and the desired frequency $\frac{m}{T}$.
• distortion due to interference with other subcarriers with with desired frequency $\frac{m}{T}$. This term is also known as Inter Carrier Interference (ICI).

## Simulation Model

1. Generates an OFDM symbol with all subcarriers modulated with $a_k=1$.

2. Introduce frequency offset and add noise to result in $\frac{E_b}{N_0}$=30dB.

3. Perform demodulation at the receiver.

4. Find the difference between the desired and actual constellation.

5. Compute the rms value of error across all subcarriers.

6. Repeat this for different values of frequency offset.

Figure: Error Magnitude vs frequency offset for OFDM

## Observations

The theoretical results are computed by $\sum_m\frac{1}{j2\pi (k+\delta-m)}e^{j2\pi (k+\delta-m)}$.

Quite likely the simulated results are slightly better than theoretical results because the simulated results are computed using average error for all subcarriers (and the subcarriers at the edge undergo lower distortion).

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.

nervous December 14, 2014 at 8:42 pm

White tiles are an excellent choice for roofing repairs and replacements.
to choose from. Here are the deailed instructions for installing cloth wallpaper, a home improvement
project for wome who love sophisticated decor.

v2 Electronic cigarette review December 14, 2014 at 1:03 am

I visit every day some websites and blogs to read articles or reviews, but this blog provides
quality based posts.

Football Manager 2015 serial key December 9, 2014 at 6:19 pm

It’s always best to demonstrate your football training drill or fun kids football game to them rather than just tell them.

Although, you have watched the match numerous times in the
television, yet there might never have been a single moment where you do not wish to be inside game.
Have you ever realized that some of thee information you have gathered are irrelevant.

batman cookie jars December 3, 2014 at 10:31 am

Pretty! This has been an extremely wonderful post.
Thanks for providing these details.

Agnes November 21, 2014 at 4:02 pm

I am really enjoying the theme/design of your blog. Do you ever
run into any web browser compatibility issues? A few of my
in Explorer but looks great in Safari. Do you have any advice to help fix this issue?

Walter November 19, 2014 at 5:42 pm

Hi, every time i used to check web site posts here early in the dawn, as i like to learn more
and more.

Triplex Ultralydklinikken November 11, 2014 at 9:19 pm

Thɑnkѕ on your marvelous posting! I quite enjoyed reading it, you could be a great author.
I wiull remember to bookmarҡ your blog and will cօme
back freom now on. I want to encourage continue your great work, have
a nice holiԀay weekend!

past November 7, 2014 at 3:33 am

What’s up colleagues, its wonderful piece of writing about cultureand
entirely defined, keep it up all the time.

atmos rx mexico November 2, 2014 at 2:18 am

Hi there i am kavin, its my first time to commenting anyplace, when i read this paragraph i thought i could also
make comment due to this sensible post.

fashion jewelry online November 1, 2014 at 1:50 am

Hi, for all time i used to check webpage posts here early in the daylight, because i love to gain knowledge of
more and more.

00:00:00 mdt 2008 October 24, 2014 at 10:04 am

I blog often and I really appreciate your information. This great
article has truly peaked my interest. I will take a note of
your site and keep checking for new details about once a week.

دانلود فیلم October 21, 2014 at 7:51 am

دانلود فیلم,دانلود فیلم,دانلود فیلم,دانلود فیلم,دانلود فیلم,دانلود
فیلم,دانلود فیلم,

breakupsfromhell.com October 17, 2014 at 1:11 pm

are important in order to choose the best internet marketing
strategy. Then consider yourself one of the few, true internet marketers.
core Sam – Sung S5PV210,and CPU frequency up to
1GHz, Memory 512MB, internal 2G memory space for TV and Internet integration.

spesifikasi LG G3 Stylus October 17, 2014 at 10:33 am

Similar is the case with all the customers who have or want to have this
Smar phone. In fact, many users have come to love waterproof cases
for devices with good cameras like the i – Phone because they provide an affordable way to take fun and unique underwater photos.

The integrated full QWERTY key board is fantastic for those that send out
plenty of texts and email messages, whilst another highlight is an
optical track pad to browse through the Black – Berry
Operating-system 6.

san ramon web designer October 17, 2014 at 8:39 am

pace is amazing. It seems that you are doing any distinctive trick.

Also, The contents are masterpiece. you’ve done a wonderful task on this topic!

low carb protein October 14, 2014 at 3:48 pm

Wow that was unusual. I just wrote an very long comment but
after I clicked submit my comment didn’t show up. Grrrr…
well I’m not writing all that over again. Regardless, just wanted to say superb blog!

Gta 5 argent illimite October 13, 2014 at 3:05 am

For latest news you have to go to see world-wide-web and on world-wide-web I found this
web page as a finest web page for most up-to-date updates.

clash of lords 2 hack android October 12, 2014 at 6:48 am

Hi, for all time i used to check webpage posts here in the early hours in the daylight, since i love to find out
more and more.

paradigm gold group October 11, 2014 at 8:54 am

You can certainly see your expertise within the work you write.
The world hopes for even more passionate writers like you who are not afraid to mention how they believe.

best fail army October 10, 2014 at 11:18 pm

Wonderful goods from you, man. I have consider your stuff prior to and you’re
just extremely wonderful. I really like what you have got here,
really like what you are saying and the way in which you say it.
You’re making it enjoyable and you continue to care for to stay it smart.
I cant wait to read far more from you. That is really a terrific site., funny videos epic fails pranks cats compilation 2014 http://goo.gl/K15dMX

breast October 10, 2014 at 9:39 am

Good day I am so excited I found your website, I really found you by accident, while I was browsing on Digg for
something else, Anyways I am here now and would just like to
say cheers for a marvelous post and a all round interesting blog (I also love the theme/design), I don’t
have time to go through it all at the minute but I have bookmarked it and
do keep up the great job.

Maybell October 10, 2014 at 4:31 am

The HSV 1 is distributed through oral secretions or pores and skin sores and one could be contaminated through kissing and
discussing objects like consuming utensils and toothbrushes.

web design October 10, 2014 at 1:15 am

You ought to begin your movie promoting campaign right here.
While you are paying for their services, it is important to realize
that they are specialists in their field and not just paying for their services, but also
knowledge. There are many benefits to hiring an Internet marketing agency to

Kandice October 9, 2014 at 6:24 am

There is a group of anti viral pills that require to be taken each
day, there has been exploration that presents if
the initial connection with the virus is treated inside a couple of days then your virus can be killed.

best vines of all time October 9, 2014 at 3:14 am

Today, I went to the beachfront with my children. I found a sea shell and
gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.”
She put the shell to her ear and screamed. There was a
hermit crab inside and it pinched her ear. She never wants to go back!

LoL I know this is totally off topic but I had to tell someone!, best funny vines compilation 2014 http://goo.gl/mwkepy

Darin October 6, 2014 at 5:35 pm

If you would like to improve your experience just keep visiting
this web page and be updated with the hottest gossip posted here.

kesuburan istri October 6, 2014 at 9:46 am

You studied something highly relevant to the job
you’re seeking. Basic education can transform the lives of girls and women,
definitely a better appreciation of their very own potential and rights along with expanded employment opportunities.

It acts physically, emotionally, spiritually, strengthen the mind, frees the creative
capacity, facilitates learning as well as the body becomes healthier.

Swamp Attack Hack Cheats Tool v 3.04 October 6, 2014 at 8:18 am

I was extremely pleased to find this website. I want to to thank you for onws time for this fantastic read!!
I definitely enjoyed every little bit of it and I have you book marked to look at
new stuff in your web site.

clash of lords 2 cheats ipad October 6, 2014 at 8:01 am

Wonderful goods from you, man. I have understand your stuff
previous to and you’re just too great. I actually like what you’ve acquired here, really like what you are stating and the way in which you
say it. You make it entertaining and you still take care of to keep it
smart. I can’t wait to read much more from
you. This is really a terrific site.

whitening teeth naturally home remedies October 5, 2014 at 5:46 pm

The whitening agent is utilized as a gel positioned in a mouthpiece or
as a strip that sticks to your tooth. They dotruly change the overall coloration of your enamel.
For those who avoid these sources of staining, you
could not need one other whitening remedy for 6 to 12 months.

Heater October 5, 2014 at 8:14 am

My brother recommended I might like this website.

He was entirely right. This post truly made my day.
You cann’t imagine just how much time I had spent for this
info! Thanks!

Linnie October 4, 2014 at 10:15 pm

Soccer or football as we know it, has been played since ancient times by the
Greeks, Romans, Italians, Chinese, Japanese, Persians etc.
He wasted 15 minutes of his time before he decided
to get a pen and paper and commit our orders to this.
I would say a rental at best, but nothing past
that.

Hatteras charter fishing October 3, 2014 at 9:02 pm

Spot on with this write-up, I absolutely feel this web site needs
a lot more attention. I’ll probably be back again to see more,

Ethel September 30, 2014 at 7:53 pm

Wow, amazing boog layout! How lolng have you been blogging for?
yoou mde blogging look easy. The overall look of your wweb site is excellent, let alone the content!

Willie September 29, 2014 at 8:42 am

Excellent beat ! I would like tto apprentice while yoou amend your site,
how can i subscribe for a weblog website? The account
helped me a acceptable deal. I had been a little bit familiar of this your broadcast provided vivid
transparent concept

http://issuu.com/fretfultyrant286 September 27, 2014 at 4:43 pm

This design is spectacular! You certainly know hoow to keep a reaader entertained.

Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!)
Excellent job. I really enjoyed what you had to say, and more than that, how you presented it.
Tooo cool!

herpes simplex 1 pictures September 25, 2014 at 10:11 pm

The virus make a difference the cornea and lead
to keratitis.

video lucu banget bikin ngakak September 25, 2014 at 10:07 pm

Excellent article! We are linking to this great article on our website.
Keep up the great writing., http://goo.gl/c2FWrB

free online dragon city game September 24, 2014 at 9:26 pm

As for the device itself, it is said its screen size will be
3.7 to four.1 inches, which is the standard size in today’s terms.
Why so Well-known?

murai batu juara nasional September 21, 2014 at 5:58 pm

Undeniably believe that which you said. Your favorite justification appeared to be on the web the easiest thing to be aware of.

I say to you, I certainly get annoyed while people consider worries that they plainly don’t know about.
You managed to hit the nail upon the top as well as defined out
the whole thing without having side effect , people can take a signal.
Will probably be back to get more. Thanks, http://tinyurl.com/l2rbcbu

kenari yorkshire September 21, 2014 at 3:59 pm

Asking questions are really fastidious thing if you
are not understanding something completely, however this post provides fastidious understanding yet., http://tinyurl.com/lewp8om

kenari yorkshire September 21, 2014 at 9:52 am

airport limo deals September 21, 2014 at 9:34 am

For instance, the main characters are both trying very hard to get
into an Ivy League school, and almost fail to do so,
but they both succeed in the end. The worksheet also includes other financial
entries such as:. There are many obvious reasons to have an internet business.

Garcinia Forte Korea September 21, 2014 at 7:36 am

I know this website presents quality based articles and extra information, is there any
other web site which gives these kinds of data
in quality?

apollo beach florida September 21, 2014 at 3:29 am

Hi, all the time i used to check web site posts here early in the morning, since i enjoy

cara memakai jilbab segi empat paris simple September 18, 2014 at 1:43 am

You ought to be a part of a contest for one of the greatest sites on the
internet. I’m going to recommend this website!, http://goo.gl/i2kCey

Our Firm uses the best schemes to draw public consideration to your
Facebook page or a web site. I’ve at all times wanted to have a whole
lot of Fb followers and likes.

Smartphone September 15, 2014 at 4:36 pm

Samsung Galaxy S II, Motorola Atrix 2, Motorola Droid Bionic
and etc are among be smartphones with best battery life 2012.
A couple of factors the DROID amazing has observed this sort of a big obtain in
industry share during this interval is on account of two motives.
The boost in battery life assures that you will no longer

home depot garden sheds September 15, 2014 at 3:28 am

Hmm it appears like your site ate my first comment
(it was super long) so I guess I’ll just sum it up what I wrote and say,
I’m thoroughly enjoying your blog. I as well am an aspiring blog blogger but I’m still new to everything.

Do you have any points for novice blog writers? I’d genuinely appreciate it.

Jurassic Park Builder Wiki Tyrannosaurus September 13, 2014 at 3:17 pm

Every weekend i used to pay a quick visit this site, because
i want enjoyment, for the reason that this this web page
conations actually pleasant funny material too.

Kenza Farah Karismatik Album Complet September 13, 2014 at 12:44 am

OK so for this tutorial you will need a PC or Mac with speakers and
the beat making software Dub – Turbo. The hip hop genre has not exactly been known for having a squeaky clean, morally upright, unassailably wholesome image.
But i do agree the fact that during the southern domination of
rap, a lot of rappers came out camouflaged with the crunk thing, and made a lot of money,
but had little or nothing to say; zero lyricism.

Adenis September 12, 2014 at 2:15 pm

Hi Krishna,

A very good work, I always follow you.

Here you discussed a frequency offset, but how would you implement a Doppler effect in OFDM? In the case of frequency offset, you just shift the whole bandwidth of the signal, but in the case of Doppler effect you rather scale the bandwidth of the signal (components of higher frequency are more shifted than components of lower frequency), resulting in a Doppler spread.

How would you model this problem? Maybe by just shifting the signal by fd=(v/c)*f0, where f0=(fc-B/2:fc+B/2), f0 – frequency carrier and B – signal bandwidth.

Thank you in advance. Kind regards.

Federico September 11, 2014 at 6:44 am

Great site you’ve got here.. It’s difficult to find hibh quality writing like yours nowadays.

I really appreciate people like you! Take care!!

clash of clan cheat code September 10, 2014 at 7:35 pm

Thanks for some other informative site. The place else may just I get that kind of information written in such a perfect method?
I have a project that I’m simply now operating on, and I have been on the glance
out for such info.

green garcinia pro and ven cleanse September 8, 2014 at 10:47 am

It’s hard to come by educated people for this subject, but you seem like you know what you’re talking about!
Thanks

garnicia cambogia review September 8, 2014 at 1:02 am

Oh my goodness! Impressive article dude! Many thanks, However I
am having issues with your RSS. I don’t know why I am unable to join it.
Is there anyone else having similar RSS problems?

Anyone that knows the solution can you kindly
respond? Thanx!!

Fotografie Schijndel September 7, 2014 at 1:56 pm

Fashion photography is considered as tricky by people but this is the one
which requires fotografia matrimonio to be very
attentive and also very good in each and every photograph he is clicking.
This company is always looking forward to making customer’s friend jealous.
When we go to other people’s wedding or look at the pictures of their wedding we think and talk about how good the photos are and some
where do wish to get the same quality of pictures for our own weddings also.

lose weight fast September 5, 2014 at 1:39 am

I think that is one of the so much important information for
me. And i am happy studying your article. However should remark on some basic issues,
The site style is great, the articles is actually great : D.

www.thenaturalmedicinepractice.com http September 1, 2014 at 4:21 pm

I’m not that much of a internet reader to be honest but our sites really nice,
keeep it up! I’ll go ahead annd bookmark your site to come back later.
Cheers

water damage restoration service August 30, 2014 at 12:01 am

whoah this blog is fantastic i really like
studying your articles. Stay up the good work! You recognize, many people are searching around for
this info, you could help them greatly.

Matt August 25, 2014 at 5:04 pm

Any positive?

used pure cambogia August 14, 2014 at 11:49 pm

Excellent write-up. I definitely love this website.
Stick with it!

Yanira August 7, 2014 at 6:14 am

Last investment Friday was a young investor, or alternatively, they are,
and probably should be chosen as charity of the tennis courts, gymnasium, sauna steam bath, use 2 for
every passenger flying on international ice.

Buy Garcinia Blast August 4, 2014 at 1:47 am

This paragraph presents clear idea designed for the new people of blogging, that really how to do blogging and site-building.

Mranali Joshi June 9, 2014 at 11:35 pm

hello sir, m working on ofdm and i am getting problem in ofdm code for ici cancellation technique….i want the code for qpsk and qam for ici cancellation technique in ofdm…It will be greatful if u can help…plssssss rpl positively as early as possible….

shubham May 10, 2014 at 12:16 pm

please give me idea how change this code of frequency offset will convert for 16 -QAM

sejal chopra May 8, 2014 at 4:55 pm

hi krishna,
i amwriting the same code for dwt ofdm….but not getting the results can you help me with that….i can mail you my code.

mahender January 24, 2013 at 10:04 pm

hidden morkov model and selected applications in speech recognition in mat lab implementation . in which i didn,t get an idea that can restructure the model by using matlab code.please can you help me to proceed to write a code in mat lab.and can u help me to modification in the existing hidden model in speech recognition so that we will get benefit .

Krishna Sankar February 1, 2013 at 5:15 am

@mahender: sorry, i have not studied much on the topic of speech recognition

turki khadija December 14, 2012 at 2:07 am

tejashri October 20, 2012 at 7:33 pm

hello…
i am doing my PG project in ofdm communication…..can u plz give me the matlab code for ICI SELF CANCELLATION SCHEME IN OFDM SYSTEM according to IEEE 802.11a standard….or suggest some reference material…which will help me…..

thanks…..

Krishna Sankar October 24, 2012 at 7:54 am

@tejashri: I ‘ve not not studied that topic. For OFDM related posts, please checkout
http://www.dsplog.com/category/ofdm/

kareem hamed August 8, 2012 at 6:14 pm

please Krishna i work the 4Pam OFDM AWGN code and the code not run i want ask you what wrong in the program my email:engkareem.aast@hotmail.com:
clc
clear all
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 PAM)
nSym = 10^4; % number of symbols
N = 10^5; % number of symbols
alpha4pam = [-3 -1 1 3]; % 4-PAM alphabets
EbN0dB = [0:10]; % bit to noise ratio
EsN0dB = EbN0dB + 10*log10(nDSC/nFFT) + 10*log10(64/80); % converting to symbol to noise ratio

for ii = 1:length(EbN0dB)

% Transmitter
ipMod = randsrc(1,nBitPerSym*nSym,alpha4pam);

ipMod = reshape(ipMod,nBitPerSym,nSym).’

% Assigning modulated symbols to subcarriers from [-26 to -1, +1 to +26]
xF = [zeros(nSym,6) ipMod(:,[1:nBitPerSym/2]) zeros(nSym,1) ipMod(:,[nBitPerSym/2+1:nBitPerSym]) zeros(nSym,5)] ;

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

% Appending cylic prefix
xt = [xt(:,[49:64]) xt];

% Concatenating multiple symbols to form a long vector
xt = reshape(xt.’,1,nSym*80);

% Gaussian noise of unit variance, 0 mean
nt = 1/sqrt(2)*[randn(1,nSym*80) + j*randn(1,nSym*80)];

% Adding noise, the term sqrt(80/64) is to account for the wasted energy due to cyclic prefix
yt = sqrt(80/64)*xt + 10^(-EsN0dB(ii)/20)*nt;

yt = reshape(yt.’,80,nSym).’; % formatting the received vector into symbols
yt = yt(:,[17:80]); % removing cyclic prefix

% converting to frequency domain
yF = (sqrt(nDSC)/nFFT)*fftshift(fft(yt.’)).’;
yMod = yF(:,[6+[1:nBitPerSym/2] 7+[nBitPerSym/2+1:nBitPerSym] ]);

% demodulation
r = real(yt); % taking only the real part

ipHat(find(r= 2/sqrt(5))) = 3;
ipHat(find(r>=-2/sqrt(5) & r=0 & r<2/sqrt(5))) = 1;

% converting modulated values into bits
ipBitHat = (ipHat+3)/2;
ipBitHat = reshape(ipBitHat.',nBitPerSym,nSym).';

% counting the errors
nErr(ii) = size(find(ipBitHat – ipMod),2);

end

simBer = nErr/N;
theoryBer = 0.75*erfc(sqrt(0.2*(10.^(Es_N0_dB/10))));
close all
figure
semilogy(Es_N0_dB,theoryBer,'b.-');
hold on
semilogy(Es_N0_dB,simBer,'mx-');
axis([-3 20 10^-5 1])
grid on
legend('theory', 'simulation');
xlabel('Es/No, dB')
ylabel('bit Error Rate of 4 pam OFDM')
title('bit error probability curve for 4-PAM modulation')

Krishna Sankar August 9, 2012 at 6:14 am

@kareem: Are you getting zero BER in no noise case?
How are the bits getting converted to modulation symbols?

Ahmed October 27, 2011 at 3:22 am

Hello,

Can you told me, how to simplify

sum(a^2)/sum(a)

where a is a vector of N complex variables.

Krishna Sankar October 30, 2011 at 7:29 pm

@Ahmed: How about sum(a.^2)./sum(a) in matlab ? Note the dot (.)

nanu nadoda May 18, 2011 at 3:26 pm

hi krishna
find here with program for standard OFDM simulator in MATLAB
%%OFDM simulator
ep = [0 .15 .3 ];
% Es/No
EbNo=0:30;
% NS = number of OFDM symbols to transmit
NS = 100;
% Modulation type
modulation = ‘psk’;
M = 4
% N = number of carriers in OFDM symbol
N = 52;
% BPS = number of bits per OFDM symbol
BPS = N*log2(M);
% index for carriers in OFDM symbol
carriers = (1:52) + 2;
% IFFT size
ifftsize = 64;
% Input Bit Stream is normally Distributed
input_bit_stream = sign(randn(1,BPS*NS));
input_bit_stream(input_bit_stream == -1) = 0;
% PERFORM SERIAL TO PARALLEL CONVERSION
parallel_data = reshape(input_bit_stream, log2(M));
% PERFORM MODULATION
modulated_data = dmodce(parallel_data, 1, 1, modulation, M);
% CREATE OFDM SYMBOLS
disp(‘Transmitting OFDM symbols’)
%Normalize
%modulated_data = (modulated_data/max(abs(modulated_data)));
for ll= 1:length(ep)
for l=1:length(EsNo)
k = 1;
for n = 1:NS
ofdm_symbol = zeros(1,ifftsize);
% Map modulated data to FFT bins in OFDM symbol
ofdm_symbol(carriers) = modulated_data(k:k+51);
% Time Signal to transmit
tx_signal = ifft(ofdm_symbol,ifftsize);
% DOPPLER SHIFT
rx_signal = tx_signal.*exp((j*pi*ep(ll)/ifftsize)*(0:ifftsize-1));
noise = sqrt(1/(2*log2(M)*10^(EsNo(l)/10)))*(randn(1,64)+j*randn(1,64));
rx_signal = rx_signal + noise;
% FFT
% Extract data from carriers in OFDM symbol
k = k + 52;
end
% PERFROM DEMODULATION
%PERFORM PARALLEL TO SERIAL CONVERSION
% CALCULATE BER
BER(ll,l)= sum(xor(input_bit_stream, output_bit_stream))/length(input_bit_stream);
end
end
===================================================
i am experiencing problem in reshape. if you can rectify then i will be highly oblige.

Krishna Sankar May 23, 2011 at 2:46 am

@nanu: Am sure you will be able to identify the problem in reshape() yourself

Thavamaran November 17, 2010 at 12:24 am

I am surprised as well Krishna, its the non-linear dynamics of the laser. I am still analyzing now. thanks anyway

Krishna Sankar November 17, 2010 at 4:35 am

@Thavamaran: Ok, good luck

Thavamaran November 4, 2010 at 4:57 pm

Krishna, thanks for the quick reply. I dont get your question on linearly varying phase? But the constellation always has 45 or 135 or 225 or 315 degree of phase shift, so it has about 90 degree difference between them.

Anyway symbol timing synch has a lot of method, which method can I look into, do you have any code referring to timing synch?

For receiver portion, im using correlator receiver, not PLL cause I feel its pointless cause correlator works extremely well for my back-to-back.

Krishna Sankar November 15, 2010 at 2:08 am

@Thavamaran: Not sure why you are seeing a fixed phase shift. Kinda surprising.

eng_dina November 4, 2010 at 1:58 am

hello please I try to estimate frequency offset in mimo ofdm using pn sequences have you an exaples for matlab codes could help me i make acquistion and tracking please advise it’s important .thanks

Krishna Sankar November 15, 2010 at 2:08 am

@eng_dina: Sorry, I do not have the matlab codes.

Thavamaran November 4, 2010 at 12:20 am

Hi Krishna, this is my first post in your website. This is a very straight forward example. I have built my OFDM system and my back-to-back works perfectly fine. But when I perform optical OFDM, which is part of my work, at the receiver, the constellation point shifted by 45 degree, then I just compensate the phase, but end up I realize that its nonlinear phase shift.

But I dont think I have a problem with CFO, cause its ideal. Do you think I need timing symbol synchronization? Please advise. Thanks.

Krishna Sankar November 4, 2010 at 12:31 am

@Thavamaran: Are you having a linearly varying phase across subcarriers? If yes, it might be related to the symbol timing synchronization.

Obaid April 7, 2010 at 6:55 pm

Hi krishna

Kindly tell me why are we doing this: theoryErr = (theoryErr-1);

Regards
Obaid

Shaimaa March 28, 2010 at 4:32 pm

Thank you for replying, I will see the post then I will back to discuss you.

Krishna Sankar March 29, 2010 at 6:34 am

@Shaimaa: Ok

Shaimaa March 27, 2010 at 7:22 pm

The simulated curve was around 50% and increased slightly as EbNo increases.
Is it necessary to compensate for frequency offset before demodulating the bpsk symbols as in Rayleigh fading channel??????????

Krishna Sankar March 28, 2010 at 1:40 pm

@Shaimaa: Typically, receivers will have a circuit for compensating frequency offset prior to attempting demodulation. I have written a brief post on how to estimate frequency offset with short preamble defined in 802.11a
http://www.dsplog.com/2008/03/03/frequency-offset-estimation-using-80211a-short-preamble/

Shaimaa March 27, 2010 at 7:12 pm

xt = xt.*exp(j*2*pi*freqOffsetkHz_v*(1e3/20e6)*[0:length(xt)-1]);
with freqOffsetkHz_v values=10 or 20 kHz
in your script_ber_bpsk_ofdm then run the program but the simulated curve was so bad. Is that expected

Krishna Sankar March 28, 2010 at 1:39 pm

@Shaimaa: If there is frequency error, then the intercarrier interference can result in poor BER. However, I have not done the simulations to see how much bad it can get.

PRIYA March 14, 2010 at 10:29 pm

hi…
what are the problems are occur in high PAPR?

Krishna Sankar March 28, 2010 at 3:33 pm

@PRIYA: Power amplifier efficiency is comprimised

eng_dina February 6, 2010 at 5:44 am

thanks

invizible February 5, 2010 at 7:09 pm

Hi krishna,
I hope you are doing fine and great. I have seen your code and its great. here you have supposed that all the input symbols are modulated like ak=1, if I am right for this reason you are generating all ones as the input i.e.
ipBit = ones(1,nBitPerSym*nSym) > 0.5; (kindly correct me if I am wrong)

My point is that when we generate random bits i.e. ones and zeros, then the simmulated error is higher than the theoretical error …
kindly help in this regard …

Krishna Sankar April 4, 2010 at 4:20 am

@invizible: Oh, is it. I have not tried that.

eng_dina February 3, 2010 at 5:10 am

Idon’t try to simulte cfo for mimo system only but for mimo ofdm I propose a new scheme that targets MMIO OFDM systems which have unsynchronized oscillators such that CFO of individual paths have to be estimated separately. This scheme may also apply to OFDM systems with multi-user access. The new method, which is similar to Moose’s method, estimates the CFO by measuring the carrier phase difference between 2 identical successive training sequences embedded in the preambles. In order to make CFO estimates be more time efficient,I allow 2 transmitter antennas transmit their training sequence concurrently in every time period, except the first and the last period. I use Frank-Zadoff code with different phase shifts in the training sequences in different antennas. Due to the good correlation property of Frank-Zadoff code, it helps reduce the interference caused by the concurrent transmissions from other antennas.
please reply me it’s urgent Ineed the code it’s really important and thanks alot

Krishna Sankar April 4, 2010 at 4:26 am

@eng_dina: Good luck with you are algorithm investigation. Hope you have made the simulations and obtained satisfactory results.

Ahmed February 2, 2010 at 9:05 pm

Could you help me to find the theoretical BER of OFDM with Walsh-Hadamard over the multipath transmission

Krishna Sankar April 4, 2010 at 4:27 am

@Ahmed: Sorry, I do not have the required information

eng_dina February 1, 2010 at 11:51 pm

Idon’t try to simulte cfo for mimo system only but for mimo ofdm I propose a new scheme that targets MMIO OFDM systems which have unsynchronized oscillators such that CFO of individual paths have to be estimated separately. This scheme may also apply to OFDM systems with multi-user access. The new method, which is similar to Moose’s method, estimates the CFO by measuring the carrier phase difference between 2 identical successive training sequences embedded in the preambles. In order to make CFO estimates be more time efficient,I allow 2 transmitter antennas transmit their training sequence concurrently in every time period, except the first and the last period. I use Frank-Zadoff code with different phase shifts in the training sequences in different antennas. Due to the good correlation property of Frank-Zadoff code, it helps reduce the interference caused by the concurrent transmissions from other antennas.
cfo for mimo only but for mimo ofdm system

eng_dina January 28, 2010 at 4:37 pm

Idon’t try to simulte cfo for mimo system only but for mimo ofdm I propose a new scheme that targets MMIO OFDM systems which have unsynchronized oscillators such that CFO of individual paths have to be estimated separately. This scheme may also apply to OFDM systems with multi-user access. The new method, which is similar to Moose’s method, estimates the CFO by measuring the carrier phase difference between 2 identical successive training sequences embedded in the preambles. In order to make CFO estimates be more time efficient,I allow 2 transmitter antennas transmit their training sequence concurrently in every time period, except the first and the last period. I use Frank-Zadoff code with different phase shifts in the training sequences in different antennas. Due to the good correlation property of Frank-Zadoff code, it helps reduce the interference caused by the concurrent transmissions from other antennas.
cfo for mimo only but for mimo ofdm system

eng_dina January 28, 2010 at 4:35 pm

Idon’t try to simulte After examining some synchronization I propose a new scheme that targets MMIO OFDM systems which have unsynchronized oscillators such that CFO of individual paths have to be estimated separately. This scheme may also apply to OFDM systems with multi-user access. The new method, which is similar to Moose’s method, estimates the CFO by measuring the carrier phase difference between 2 identical successive training sequences embedded in the preambles. In order to make CFO estimates be more time efficient,I allow 2 transmitter antennas transmit their training sequence concurrently in every time period, except the first and the last period. I use Frank-Zadoff code with different phase shifts in the training sequences in different antennas. Due to the good correlation property of Frank-Zadoff code, it helps reduce the interference caused by the concurrent transmissions from other antennas.
cfo for mimo only but for mimo ofdm system

eng_dina January 27, 2010 at 4:18 pm

please I study for my master in frequency synchronization in mimo ofdm system but i have problem with the matlab code to simulate to find out if estimation of the CFO on one path is affected by the CFO values of the adjacent paths and examine the estimator accuracy in term of its mean and variance

f_max = f_Tofdm/(M_sub*T_s); % f_max =maximal Doppler frequency (Hz),M_sub*T_s = OFDM Symbol period (sec),
%f_ndopp = f_max*M_sub*T_s % Normalized Maximum Doppler Spread Freq.

% Area parameter
% ra Rural Area
% tu Typical Urban
% ht Hilly Terrain
AREA = ‘no’ ;

% start simulation loops
for ee = 1 : length(EcNo)
ee
[theo_fo_var, rfo_var, rfo] = FOE_mimo_fading(EcNo(ee), tfo_array, NTX, NRX, M_sub, N, f_max, AREA, T_s, model, L);
plot_theo_fo_var(:,:,ee)=theo_fo_var;
plot_rfo_var(:,:,ee)=rfo_var;
plot_theo_rfo(:,:,ee)=tfo_array;
plot_rfo(:,:,ee)=rfo;
end

% plot results
for ii_tx = 1 : NTX
for ii_rx = 1 : NRX

% rearrange array order for easier plotting
vect_plot_theo_rfo = permute(plot_theo_rfo(ii_tx,ii_rx, , [2 3 1]);
vect_plot_rfo= permute(plot_rfo(ii_tx,ii_rx, , [2 3 1] ) ;
vect_plot_theo_fo_var= permute(plot_theo_fo_var(ii_tx,ii_rx,:),[2 3 1]);
vect_plot_rfo_var= permute(plot_rfo_var(ii_tx,ii_rx, , [2 3 1]);

%plot mean
figure;
plot(EcNo, vect_plot_theo_rfo, ‘:’ , ‘Linewidth’,2) ;
hold;
plot(EcNo, vect_plot_rfo,’o-’,'MarkerSize’ , 6,’Linewidth’, 1) ;
grid on;
t_str=sprintf(‘New_ Theo and Est Freq Offset %s M=%d N=%d %dx%d path:tx%d-rx%d fo=%1.3f’,AREA,M_sub,N,NTX,NRX,ii_tx,ii_rx,tfo_array(ii_tx,ii_rx));
title(t_str);
xlabel(‘EcNo SNR range and step (in dB)’);
ylabel(‘Norm Freq Offset’) ;
legend(‘Theo’,'Est’,'Location’,'Northeast’);
% save graph
fstr=sprintf(‘new_m%d_%dx%dp%d%d_%s’,M_sub,NTX,NRX,ii_tx,ii_rx,AREA);
hgsave(fstr);

% plot variance
figure;
semilogy(EcNo, vect_plot_theo_fo_var,’:',’Linewidth’,2);
hold;
semilogy(EcNo, vect_plot_rfo_var,’o-’,'MarkerSize’,6,’Linewidth’,1);
grid on;
grid minor;
t_str=sprintf(‘New_ Est Var and CRLB %s M=%d N=%d %dx%d path:tx%d-rx%d fo=%1.3f’,AREA,M_sub,N,NTX,NRX,ii_tx,ii_rx,tfo_array(ii_tx,ii_rx));
title(t_str);
xlabel(‘EcNo (in dB)’);
ylabel(‘Variance’);
legend(‘CRLB’,'Est’,'Location’,'Northeast’);
% save graph
fstr=sprintf(‘new_y%d_%dx%dp%d%d_%s’,M_sub,NTX,NRX,ii_tx,ii_rx, AREA) ;
hgsave(fstr);
end
end
% rename variables for export
new_plot_theo_fo_var=plot_theo_fo_var;
new_plot_rfo_var=plot_rfo_var ;
new_plot_theo_rfo=plot_theo_rfo;
new_plot_rfo=plot_rfo;

% save all variables
fstr=sprintf(‘new_f%d_%dx%d_%s.mat’,M_sub,NTX,NRX,AREA);
save(fstr);
% save variables for plotting
fstr=sprintf(‘new_p%d_%dx%d_%s.mat’,M_sub,NTX,NRX,AREA);
save(fstr,’new_plot_theo_fo_var’,'new_plot_rfo_var’,'new_plot_theo_rfo’,'new_plot_theo_rfo’);

% end of file
and this is the core of the code

Krishna Sankar January 28, 2010 at 5:25 am

@eng_dina: How are you modeling the CFO for MIMO systems?

If all the chains have a common RF clock, then all the chains will have similar CFO and the estimate from all the chains can be combined to improve the accuracy of the CFO estimation.
If the chains have independent RF clock, then we need to estimate CFO on each chain independently.

eng_dina January 26, 2010 at 12:22 am

thanks alot for your helpful work please I work in my master in frequency synchronization in mimo ofdm and I have problem in the matlab code try to examine the estimator accuracy in term of its mean and variance and find out if estimation of the CFO on one path is affected by the CFO values of the adjacent paths

joel January 14, 2010 at 4:36 pm

Hello,

can You explain why is sample frequency (20e6) in the term freqOffsetkHz_v(ii)*(1e3/20e6) necessary ? We need delta_f so it shall be actually -200:200kHz and not delta_f*sample_time …

best regards

Obaid January 13, 2010 at 8:17 pm

Hi krishna

Can you please provide any references (books or web links) for SNR loss calculations (analytical) for AWGN and dispersive channels.

Regards.
Obaid

Ayesa January 2, 2010 at 4:11 pm

Sir,
I want to find BER for 4QAM in OFDM using AWGN. If i take the difference between reciver’s demodulated symbols and actual symbols(at transmitter) and devide the difference by the length of actual symbols, can i get the BER?
Thanks.

shindeujwala December 30, 2009 at 7:37 pm

Hello Sir!
i gone through above code.it is useful to understand ici. but i have queery that how to cancel ici due to phase offset due to local oscillator frequency offset.
thank you.

r.kalidoss November 25, 2009 at 10:23 am

Can i think, delay spread is equal to total number of multiple paths in the system

Krishna Sankar December 7, 2009 at 4:31 am

@r.kalidoss: Delay spread is computed using the amplitude of the taps and their delay values.

cyrus November 8, 2009 at 9:42 pm

Hi there…for one more question..

ipBit = ones(1,nBitPerSym*nSym) > 0.5; % random 1′s and 0′s

if i change “ones” to “rand”, the result seems to have differences. Can you explain it?

Thanks very much

Krishna Sankar November 12, 2009 at 5:38 am

@cyrus:
With ak’s randomly distributed, the interference term slightly changes. How much difference did you see?

cyrus November 8, 2009 at 9:32 pm

1.I would like to know that why we need to have 1e3 in the following expression.
xt = xt.*exp(j*2*pi*freqOffsetkHz_v(ii)*(1e3/20e6)*[0:length(xt)-1]);

2.As you mentioned about,choosing -5 to 5 as subcarriers outside that range has negligible interference.I still have a bit of confuse about it.Can i change to others values?

Krishna Sankar November 12, 2009 at 5:33 am

@cyrus:
1/ To convert kHz to Hz
2/ Sure, you can.

Treasa November 4, 2009 at 5:09 pm

Hi there,
I’m a bit confused about the theorical results calculation..
theoryErr =sum(1./(j*2*pi*([-5:5]+delta)).*(exp(j*2*pi*([5:5]+delta))-1));

could someone explain to me please how ([-5:5]+delta) relates to (k-m+delta)? Well I of course get the delta part just not sure how -5:5 was chosen?

T

Krishna Sankar November 8, 2009 at 8:53 am

@Treasa: I just chose -5 to 5 as subcarriers outside that range has negligible interference.

Obaid October 30, 2009 at 4:49 pm

referring to last line of this post:
why the subcarriers at the edge undergo lower distortion ???

Krishna Sankar November 8, 2009 at 8:14 am

@Obaid: Well, at the edge there will be subcarriers only at the left or right and not both. Hence there will be lower interference.

Khaja Rasool October 25, 2009 at 10:44 am

Hi krishna,
thank you so much for ur help and posts in this website,

i am working on Next generation WLAN 802.11n Simulation.
I need ur help
i would like get the simulation for MIMO OFDM with MMSE equalizer .and also with MIMO OFDM STBC codes.

pls help me .i would greatful if you help me.
thank you once again.

Sk.khaja rasool.
Pls: do reply to this mail ID khajarasool_17@yahoo.com

Krishna Sankar October 27, 2009 at 5:41 am

@Khaja Rasool: Though I have not disucssed MIMO + OFDM or STBC + OFDM, I have discussed MIMO, STBC, and OFDM independently. You may refer
http://www.dsplog.com/tag/mimo
http://www.dsplog.com/tag/stbc
http://www.dsplog.com/tag/ofdm
Good luck.

r.kalidoss August 11, 2009 at 1:25 pm

Can i think, due to change of frequency i.e. m/T to m+q/T (Frequency offset) orthogonality of the signal change?

Krishna Sankar August 12, 2009 at 4:13 pm

@kalidoss: Yes, you are right.

r.kalidoss August 10, 2009 at 11:47 am

Krishna, Can we think frequency offset is due to doppler shift…..apart from carrier mismatch in the receiver….

Krishna Sankar August 11, 2009 at 5:06 am

@kalidoss: I have not discussed Doppler in this post. I guess the effect of Doppler might not be as simple to understand as is the case with frequency offset. I will write about Doppler soon.

r.kalidoss August 10, 2009 at 11:19 am

First time i saw the frequency offset problem in OFDM with simple example.Its fine working. Then to how to mitigate this problem.

Any method available to solve this issue.

Krishna Sankar August 11, 2009 at 4:56 am

@kalidoss: You may checkout the post on Frequency offset estimation using 802.11a short preamble
http://www.dsplog.com/2008/03/03/frequency-offset-estimation-using-80211a-short-preamble/

Urbie October 13, 2010 at 10:05 pm

Krishna,
I stand self-corrected. I realized that the term “[0:length(xt)-1]/Fs” corresponds to time, i.e t in the expression
exp(1i*2*pi*freqOffsetkHz_v(ii)*1e3*t), and you are simply shifting the spectrum by multiplying the two time-domain signals.
Sorry, I didn’t know what I was thinking.
Urbie