Oflate, I am getting frequent requests for bit error rate simulations using OFDM (Orthogonal Frequency Division Multiplexing) modulation. In this post, we will discuss a simple OFDM transmitter and receiver, find the relation between Eb/No (Bit to Noise ratio) and Es/No (Signal to Noise ratio) and compute the bit error rate with BPSK.
OFDM modulation
Let us use the OFDM system loosely based on IEEE 802.11a specifications.
| Parameter | Value |
| FFT size. nFFT | 64 |
| Number of used subcarriers. nDSC | 52 |
| FFT Sampling frequency | 20MHz |
| Subcarrier spacing | 312.5kHz |
| Used subcarrier index | {-26 to -1, +1 to +26} |
| Cylcic prefix duration, Tcp | 0.8us |
| Data symbol duration, Td | 3.2us |
| Total Symbol duration, Ts | 4us |
You may refer to post Understanding an OFDM Transmission for getting a better understanding of the above mentioned parameters.
Cyclic prefix
In an OFDM transmission, we know that the transmission of cyclic prefix does not carry ‘extra’ information in Additive White Gaussian Noise channel. The signal energy is spread over time whereas the bit energy is spread over the time
i.e.
.
Simplifying,
Frequency spread
In OFDM transmission, all the available subcarriers from the DFT is not used for data transmission. Typically some subcarriers at the edge are left unused to ensure spectrum roll off. For the example scenario, out of the available bandwidth from -10MHz to +10MHz, only subcarriers from -8.1250MHz (-26/64*20MHz) to +8.1250MHz (+26/64*20MHz) are used.
This means that the signal energy is spread over a bandwidth of 16.250MHz, whereas noise is spread over bandwidth of 20MHz (-10MHz to +10MHz), i.e.
Simplifying,
.
Relation between Eb/No and Es/No in OFDM
Combining the above two aspects, the relation between symbol energy and the bit energy is as follows:
.
Expressing in decibels,
Simulation model
The attached Matlab/Octave simulation script performs the following:
(a) Generation of random binary sequence
(b) BPSK modulation i.e bit 0 represented as -1 and bit 1 represented as +1
(c) Assigning to multiple OFDM symbols where data subcarriers from -26 to -1 and +1 to +26 are used, adding cyclic prefix, concatenation of multiple symbols to form a long transmit sequence
(d) Adding White Gaussian Noise
(e) Grouping the received vector into multiple symbols, removing cyclic prefix, taking the desired subcarriers
(f) Demodulation and conversion to bits
(g) Counting the number of bit errors
Click here to download: Script for BER computation of BPSK using OFDM

Figure: Bit Error Rate plot for BPSK using OFDM modulation
Can observe that the simulated bit error rate is in good agreement with the theoretical bit error rate for BPSK modulation i.e.
.
Related posts
- BER for BPSK in OFDM with Rayleigh multipath channel
- Cylcic prefix in Orthogonal Frequency Division Multiplexing
- Understanding an OFDM transmission
- Trying out PAPR reduction for OFDM by multiplication with j
- Inter Carrier Interference (ICI) in OFDM due to frequency offset
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.


{ 2 trackbacks }
{ 151 comments… read them below or add one }
Hello! Kirishna ur matlab script is very help full to simulate an OFDM over AWGN channel using BPSK and also other modulation scheme.Can u forward me a matlab script that can be used to simulate performance of BPSK modulated OFDM with a combination of TCM(Trellis coded Modulation)over a fading channel.
Hope fully u will
dear , thank you very much
can i use not rand binary data in line 9 in the script
i mean i have data positive and negative and want to put it instead of binary random data ,
so please i want your help in solving this problem , because i try to put this data but failed to run .
regards
traiq
@tariq: Well, I was unable to understand your concern. In the next line,
ipMod = 2*ipBit-1; % BPSK modulation 0 –> -1, 1 –> +1
the random binary data is converted to +1’s and -1’s respectively for binary 1 and binary 0.
Agree? OR where you looking for something else?
hi, KRISHNA
can u explain me the main difference of simulation results between the BPSK and BPSK with OFDM.What are the main factors that will effect the BER,and in which of the two two systems the BER performance is good,please help me as soon as possible because my project submission last date is 30th Sep., and what are the referances i have to read to understand this project.I hopefully waiting for your response,thank you
@ravi kumar:
As you can see, there is no difference in Eb/No vs BER plot provided for ‘BPSK in AWGN’ and ‘BPSK over OFDM in AWGN’.
As I have stated prior, in AWGN there is no performance improvement/loss by doing OFDM modulation. However, in multipath channel, when using a properly designed OFDM, the equalization becomes simpler.
A good book to read is OFDM Wireless LANs: A Theoretical and Practical Guide by Juha Heiskala , John Terry
Hello! Krishna
Thank you! for ur help . But now i have got a problem when i wrote a matlab code to simulate the BER performance of a trellis coded OFDM ( OFDM with trellis coded Modulation) and i can’t get a proper result . Please try to help me by sending a Matlab code to simulate OFDM with TCM.
Thank you in advance
Lealem
@Lealem : I have not yet written any posts on Trellis coded modulation. I hope to do so in future (maybe within couple of months).
Hi Krishna
thank you very much for Your simulation and theory prgram, really they are very useful. Do you have the matlab code for OFDM with 16-QAM in AWGN and Rayleigh Channels.
Best Regards
Hussien
@Hussein: Thanks. I do not have the codes, but I would think that it will be reasonable to extend the available simulation models to 16QAM case.
For 16-QAM in AWGN (without OFDM) you may look at the posts,
URI: http://www.dsplog.com/2008/06/05/16qam-bit-error-gray-mapping/
URI: http://www.dsplog.com/2007/12/09/symbol-error-rate-for-16-qam/
For extending them to OFDM, you may use the following posts as reference:
http://www.dsplog.com/2008/06/10/ofdm-bpsk-bit-error/
http://www.dsplog.com/2008/08/26/ofdm-rayleigh-channel-ber-bpsk/
Hope this helps.
Hi Krishna
One more thing: I’m looking for MATLAB code for channel estimation and synchronization for OFDM system.
Hi Krishna,
Thank you very much for your matlab script. I’m trying BER for OFDM using 16QAM, but I dont know what is Wrong in my code?! here is my code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% BER for OFDM using 16QAM Modulation
clear all
close all;
clc;
M = 16; % number of QAM constellation points (4,16,64,256)
nFFT = 64; % fft size
nDSC = 52; % number of data subcarriers
Td = 64; % Data Symbol Duration
Tcp = 16; % cylic prefix Duration (GI=1/4)
nBitPerSym = 52; % number of bits per OFDM symbol (same as the number of subcarriers for BPSK)
nSym = 10^4; % number of symbols
k = log2(M); % bits per symbol
EbN0dB = [0:16]; % bit to noise ratio
EsN0dB = EbN0dB + 10*log10(nDSC/nFFT) + 10*log10(64/80)+ 10*log10(k); % converting to EsNo (EsN0 = EbN0*(nDSC/nFFT)*(Td/(Td+Tcp))
% OFDM
for ii = 1:length(EbN0dB)
% Transmitter
%data Generation
ipBit = randint(1,nBitPerSym*nSym,M);
%Data Modulation
ipMod = (1/sqrt(10))*qammod(ipBit,M); % 16QAM modulation
tx = ipMod;
% S/P
ipMod = reshape(ipMod,nBitPerSym,nSym).’; % grouping into multiple symbolsa
% Assigning modulated symbols to subcarriers from [-26 to -1, +1 to +26] (zeros padding)
xF = [zeros(nSym,6) ipMod(:,[1:nBitPerSym/2]) zeros(nSym,1) ipMod(:,[nBitPerSym/2+1:nBitPerSym]) zeros(nSym,5)] ;
% Taking IFFT, 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];
% P/S
xt = reshape(xt.’,1,nSym*80);
% Generation 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;
yts = sqrt(80/64)*xt + 10^(-EsN0dB(ii)/20)*nt;
% Receiver
% S/P
yt = reshape(yt.’,80,nSym).’;
% removing cyclic prefix
yt = yt(:,[17:80]);
% Taking FFT (converting to frequency domain)
yF = (sqrt(nDSC)/nFFT)*fftshift(fft(yt.’)).’;
% zero removal
yMod = yF(:,[6+[1:nBitPerSym/2] 7+[nBitPerSym/2+1:nBitPerSym] ]);
rx = reshape(yMod,1,520000);
% 16QAM Demodulation
ipBitHat = qamdemod(yMod*sqrt(10),M); % rxData =qamdemod(rxDataMod*sqrt(10),M);
% P/S
ipBitHat = reshape(ipBitHat.’,nBitPerSym*nSym,1).’;
% counting the errors
nErr(ii) = size(find(ipBit – ipBitHat),2);
end
simBer = nErr/(nSym*nBitPerSym);
theoryBer = (1/k)*3/2*erfc(sqrt(k*0.1*(10.^(EbN0dB/10))));
figure (1)
semilogy(EbN0dB,theoryBer,’ms-’,'LineWidth’,2,’MarkerSize’,5);
hold on
semilogy(EbN0dB,simBer,’bx-’,'LineWidth’,2,’MarkerSize’,5);
axis([0 16 10^-5 1]);
grid on
legend(’theory’, ’simulation’);
xlabel(’Eb/No, dB’)
ylabel(’Bit Error Rate’)
title(’Bit error probability curve for 16QAM using OFDM’)
hold off
%####################
Regards
Moayid
@Hussien: Typically for channel estimation, we send a known sequence (called preamble). Using the knowledge of the known sequence and what we received, we can estimate the channel.
For eg, in an OFDM system, the system model can be written as
Y = HX + N where
Y – is the received symbol on subcarrier k
H – is the channel on subcarrier k
X – is the transmitted symbol on subcarrier k
N – is the noise on subcarrier k
Since X is known, the estimate of H is,
H^ = Y/X
For synchronization, different aspects need to addressed:
(a) Frequency synchronization – You can find an example of frequency offset estimation in 802.11a system at
http://www.dsplog.com/2008/03/03/frequency-offset-estimation-using-80211a-short-preamble/
(b) Time synchronization – Aligning the symbol boundary
(c) Sampling clock offset tracking
etc
@Moayid: Thanks for the comment. However, may I suggest I would prefer to help you debug (than debugging the code myself).
I think, to keep things simple, firsly you should try
(a) with out adding noise
(b) before moving to bit error rate, maybe its simpler to find symbol error rate.
(c) Once you get the symbol error rate curve correct, then one may move to bit error rate.
The following posts on 16QAM maybe helpful.
URI: http://www.dsplog.com/2007/12/09/symbol-error-rate-for-16-qam/
URI: http://www.dsplog.com/2008/06/05/16qam-bit-error-gray-mapping/
Hope this helps.
thank’s…can it made using another methode?except matlab.haw about C++.
@victor: Yes, it can be. However, I do expect coding/debugging to be take more time in C++.
Hi,
I saw your code for OFDM transmitter. You have written the code assuming that the bits are coming at the rate of 20Mbps. Is there a way to write a MATLAB script that will simulate a random bit generator at 20MHz using RAND function or should we only go to simulink for that? I would like to see the spectrum of the OFDM symbols for an random input of 20MHZ. though we can plot the spectrum by taking the x-axis as Fs*(-N/2:1:N/2)/N, it would only be to visulaise the plot.
Can you give me a hint on that?
Thank you.
Bye.
hi krishna
i am trying to simulate ofdm with bpsk.i was able to get the +1 -1 signs.what do i need to do before applying this out put to IFFT.
thanks for your help before hand
i am using ifft size 64,for 52 subcarriers
@MUTHUKRISHNAN: I do not think that the following statement – “You have written the code assuming that the bits are coming at the rate of 20Mbps.” is true.
If you see, in the simulation model, I have assumed that the (a) number of data subcarriers is 52
(b) modulation is BPSK
(c) there is no coding
(d) fft size is 64
(e) cyclic prefix size is 16 samples
(f) symbol duration is 80 samples
The key to control visualize the spectrum is on the assumption of sampling frequency of the fft. If the fft is operating at a frequency fs, then the symbol duration in the above system is 80/fs. The data rate is 52/(80/fs). If fs is assumed to be 20MHz, then the data rate is 13Mbps, Do you agree?
You can use pwelch() command to plot the spectrum of an OFDM packet consisting of multiple OFDM symbols. The Matlab/Octave script in the following URI might be helpful.
Understanding an OFDM transmission
http://www.dsplog.com/2008/02/03/understanding-an-ofdm-transmission/
Hope this helps.
@mohammed: It depends on the system which we have – some specifications like 802.11a has coding/interleaving etc.
In the simplest case, we can directly apply the data to the defined data subcarriers in the ifft. That is the approach which we used in the Matlab/Octave simulation model provided in this post.
Hope this helps.
In the code you define SNR as:
EsN0dB = EbN0dB + 10*log10(nDSC/nFFT) + 10*log10(64/80);
but should it include the additional term:
10*log10(log2(M)); where M is the alphabet size
Also, should there be any modifications to the addition of noise if our transmitted signal passed through a frequency selective channel? For example if our channel has tapped delay line profile (like a SUI channel) h=[1 0.3162 0.1], then the recieved signal is conv(s, h)+noise, where s is the OFDM symbol with cyclic prefix. The convolution will yield a signal with length=(fftsize+cyclic_prefix_size+length(h)-1). The noise to be added must also be a vector of this size, but what modifications must be made to the variance No, or the SNR expression?
Thank you very much.
@roisin:
(a) Yes, it should include the alphabet size. I did not include in the above equation as we were discussing BPSK case.
(b) It depends on the variance of the multipath channel. Typically, we can try to make the variance of the multipath channel to unity. Then there is no need to modify the variance in the noise term.
I used this approach for simulating BPSK BER in OFDM with 10-tap Rayleigh channel
URI: http://www.dsplog.com/2008/08/26/ofdm-rayleigh-channel-ber-bpsk/
Hope this helps.
Thank you for your reply.
I have one more question.
For the multipath channel which has tapped delay line coefficients h=[a b c], when you say making the variance of the multipath channel to unity, do you mean that |a|^2+|b|^2+|c|^2=1?
Thank you.
@roisin: Yes, normalize the average channel power over multiple channel realizations to 1.
Hi, how do we add in channel coding to the matlab code?
Let’s say we want to use block codes. Can we use any size for n and k?
@jimmy: Well, it depends on the type of block code which you want to simulate. In this OFDM example, if the number of bits after coding is not coming as an integer multiple of number of bits per symbol, we can add extra zeros (which maybe ignored at the receiver).
Hi, may i know why do we need to multiply the transmitted signal by sqrt(80/64)?
% 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;
If we include channel coding in the matlab code, the redundant bits needs to be accounted for. Is it done like the code below
% Gaussian noise of unit variance, 0 mean
nt = 1/sqrt(2*code_rate)*[randn(1,nSym*80) + j*randn(1,nSym*80)];
Thank you
@jimmy: In the simulation model, we assume that the cyclic prefix is of duration 16 samples and the data symbol is of duration 64 samples. The term sqrt(80/64) is to normalize the transmit power. This normalization ensures that scaling of noise with respect to Es/No is valid.
Yes, I think scaling of the noise by 1/sqrt(code_rate) to account for coding is correct. For eg, if coding rate is 1/2, the variance of noise is doubled as we require to send two coded bits for each data bit.
Hi, in the simulation result, the performance of both cases (with and without ofdm) is the same.
For the case with ofdm, it uses 52 subcarriers. 12 subcarriers are unused and 16 subcarriers are for the cyclic prefix. The energy would be spread among both the used and unused carriers. Since there is wastage of energy, why does the performance of both cases (with and without ofdm) appear to be the same?
For the WLAN, the fft size is 64 and the used subcarrier is 52. Isn’t it better to use a larger number of subcarriers instead of wasting it?
Thank you
@jimmy: If you see the simulation model, for defining the Eb/No I have considered the wastage due to cyclic prefix and unused subcarriers. That is why the Eb/No curves are matching. If we plot the Es/No curves we will see the difference (in a simple BPSK Eb/No = Es/No).
In typical WLAN, there may be multiple transmissions happening on different frequency bands. Multiple frequency bands are separated by atleast 20MHz. If you notice, the null subcarriers are located at both edges of each band. The presence of null subcarriers on each band ensure that the energy in one band does not leak into the other band and vice versa.
Hope this helps.
Let’s say we want to implement channel coding to the system and the size of the coded bits is 60. Can we use 60 subcarriers instead of 52?
The resulting effect: is it the transmitted signal will be more likely to be interfered by other signals?
If the size of the coded bits is 104, can we divide it into 2 streams to append the cyclic prefix separately and later concatenate the 104 coded bits at the receiver?
Thank you
Thank you
@jimmy: Yes, we can send on 60 subcarriers. For the unit level BER simulations the fact that we do not have sufficient gap between spectrum from adjacent channels does not matter. This matters only when we try to deploy the system and try to meet the spectral mask requirements as put up by 802.11a specification.
If the coded bits is 104, we can use double the number of OFDM symbols to transmit the information. I hope you meant that when you said two streams? OR where you thinking of parallel transmission stream (aka MIMO)?
Thanks for your great help.
I meant it for the first case that you answer to my second question. (not the MIMO)
I didnot understand how you got the final equation between Es/No and Eb/No. How you equate 20 MHz.Es = 16.25 MHz Eb?? I thing there should be equation number of easy reference.
@sandeep: This is because, the signal bandwidth is on 20MHz, however the used data subcarriers is only 16.25MHz.
If you are not comfortable using the MHz, then you may use the subcarrier count
64Es = 52*Eb.
Does that help?
hi guys…im new on this site…i am doing project on OFDM..i have made OFDM simulation models on simulink for data rate 6,9,12,18,36,and 54 Mbps…now i have to made these simulations Bandwidth efficient…would u guys help0 me in this regard….one sugestion in my mind is to remove guard interval that is 16 point cyclic prefix..and to find out some technique to handle the resultion ISI…
2NDLY how to use BERTOOL with simulink models??plzz help me…
waiting for ur help…
my email address is
shooter_silent87@yahoo.com
@zain:
As you said, one way is to reduce the duration of the cyclic prefix. If I were you, I would not eliminate cyclic prefix completely, rather use a shorter value of cyclic prefix. For ex, in 802.11n specification there is short GI mode, where cyclic prefix duration is 0.4us (instead of the normal 0.8us).
Another way to improve data rate is to use to reduce the number of guard subcarriers.
Probable third way to improve data rate is to use MIMO. However that requires more than one transmit and receive antenna.
I do not have Simulink with me. Hence wont be able to help you with bertool on simulink.
Good luck.
secondly can anyone tell that why we use 4 pilot carriers???
why we need them??
@ zain: Typically there will be carrier frequency offset errors, phase noise, sampling clock offset errors etc between a transmitter and receiver. The pilot subcarriers enables a receiver to estimate the phase and compensate for it, prior to data subcarrier demodulation
hey thanks krishna….
we add four pilot carriers modulate nothing on them and we just terminate these four carriers at reciever side…so why to waste our bandwidth by using these pilots??
why we have to use pilots???
…
can u pleez post here specifications table of IEEE802.11n as u have done above for IEEE802.11b…
THANKS…alot for helping me….i will be in touch with u for queries like that…ok
Dear,
I find ur work very intresting, especially the matlab implementation. Thank you for that. And now the question :
- Could u pls explain how did u connected the two formulas to become the EsNo = EbN0*(nDSC/nFFT)*(Td/(Td+Tcp)) ? Did u use the EbNo = (S/N)x(B/R) ? (S/N – SNR, B-Bandwidth, R-Bitrate).
Thank u in advance !
@Ik: The relation Eb/No = (S/N)*(B/R), is mostly tuned for single carrier systems. The underlying concept is still the same, however for OFDM, we need to consider some of the additional parameters like cylic prefix, number of used subcarriers etc.
Hope the explanation provided in the post helps.
Thanks for response. But i don’t quite get it. If u write Es = A*Ey, and Es = B*Ey then mathematically A = B. You can not just multiply those values and write Es = A*B*Ey, don’t you think ? Can you describe it mathematically how did u come to this farmula ? Thank you !
Did you find an answer to this question?
guys i am getting a very surprising result which i wanna discuss with u people…coz its confusing me…
actually i have to make OFDM bandwidth efficient…for this purpose when i completely removed cyclic prefix(guard interval) i saw that number of bit errors increases and probabilty of error increases as well…and this is logical….but thats not the case with 54Mbps datarate…For 54Mbps when i removed the guard interval it starts showing less bit errors and data rate became improved….why happened openly for 54Mbps…Plzzzzzzz help me out why this is happening????
waiting for replies…
regards
zain
@zain: Well, no. In AWGN, the absence of cyclic prefix should not cause bit errors to increase (need to ensure that Es/No and Eb/N0 are scaled appropriately).
hi…do you have qpsk ber with ofdm modulation matlab coding with some explaination???
if you do could u post the url??
TQ
@keroppi: Sorry, I have not posted on BER with QPSK with OFDM.
hi krishna
in your ofdm-bpsk your for loop changes according to EbNo and doing
yt = sqrt(80/64)*xt + 10^(-EsN0dB(ii)/20)*nt;
i was trying to to keep the ebno constant say at 10db and do the following
x=real(Transmi_signal);
y=imag(Transmi_signal);
% Calculating Attenution of the signal
spow=(sum(x.^2+y.^2)./nSym./nDSC);
attn=0.5*spow/(10.^(-EbN0/10));
attn(i)=sqrt(attn);
and
yt = sqrt((Td+Tcp)/Td)*Transmi_signal + nt.*attn(i);
and i will run the programme for a number of times,but the attn. is not changing and getting almost a constant Ber graph.
any help
@mohammed: Well, if you make the noise term (nt) to zero, are you getting zero bit error?
hi krishna..
i am very new to ofdm, i have to simulate the ofdm with adding noise and etc..
can u help me in that because i am not getting start…
regards.
Maria
@maria: To avoid the effect of noise, please make the multiply the term 10^(-EsN0dB(ii)/20)*nt with 0. Further, you may also refer to the post on OFDM transmission only @
http://www.dsplog.com/2008/02/03/understanding-an-ofdm-transmission/
hi kirshina
sorry i forgot to mension the nt term noise will be produced as usual with randn it is not zero.
second question
the normalization term you have used for the ifft
(nFFT/sqrt(nDSC))*ifft() can you give more explanation to it,if possible book or paper reference for the particular bit
thanks
@mohammed: My replies:
(1) So, are you getting zero error rate, if you force the noise term nt to 0?
(2) The term (nFFT/sqrt(nDSC)) is for normalizing the transmit power to unity.
hi, thankyou very much for previous responses… i hope you are doing fine … i saw your above code for ofdm transmission and i made some changes i.e. doubled the cyclic prefix and then plotted the curves … but the performence was exactly the same… shouldnt it get better with increase in cyclic prefix i mean in terms of error improvement?
thanking in advance …
invizi
@invizible: Hmm… the increase in cyclic prefix wont bring you better performance in AWGN case. As you are aware, cyclic prefix does not carry any extra information. It justs serves as a buffer to prevent interference from the previous symbol in a multipath channel. So, your observation that there is no improvement with extra cyclic prefix in AWGN is correct.
and one more thing … can you kindy send me the book which is free when we register? i have tried alot of times but havent received it yet … it will really nice of you
thanks
@invizible: I just the instructions over to you on email.
Maria,
I think the code by Krishna is available for ofdm.
and you can take help from the code. its really very helping things from Krishna.
HI KRISHNA
i want the codes for studying the effect of changing length of cyclic prefix on BER,Es/N,POWERPLz help me
hi krishna,
can u plz suggest me some cancellation techniques for ICI(inter carrier interference)
i’m in dire need for the matlab codes for any algorithm to cancel ICI…plz help me
@Atif: One approach is to remove the effect of frequency offset in time domain.
y(t) = x(t).*exp(j*2*pi*f_d*t), where
y(t) – is the received signal with frequency offset
x(t) – is the transmitted signal
f_d – is the frequency offset
t – is the time.
Assuming that we have an estimate of f_d, we can remove that by
r(t) = y(t)*exp(j*2*pi*-f’_d*t), where
f’_d – is the estimate of frequency offset.
Hi Krishna,
i’m working hard on a project about PLC – Powerline Communications, and i need to simulate a channel PLC with OFDM, and it can be with QAM or PSK. Do you have something like that?
Congratulations about this site, it’s helping a lot to many students around the world. Thank you.
@Monique: I do not have a model of the channel in power line comunication. I have discussed BER for BPSK in OFDM with Ralyeligh multipath channel @
http://www.dsplog.com/2008/08/26/ofdm-rayleigh-channel-ber-bpsk/
Hope this helps.
Krishna, do u have script for QPSK BER with OFDM modulation?
@said: Well, I do not have QPSK in OFDM modulation, however I do have QPSK in AWGN @
http://www.dsplog.com/2007/11/06/symbol-error-rate-for-4-qam/
Hope this helps.
Thanks krishna, this is indeed a great help to understand signal processing issues in OFDM, but I still do not understand why we need to normalize when using the FFT/IFFT or adding a term to compensate for the wasted power in CP. I really appreciate your help.
@Saria: We add all those normalizations to ensure that we define the correct Eb/N0 when obtaining the BER curves.
SO, it is not something applied in the practical signal transmission using the standard of the IEEE 802.11?
Also, in general for any modulation or multiple access scheme, when do I need to normalize and how do I determine the value of normalization factor. Really, many thanks.
@Saria: There will be normailzation factors defined based on the modulation schemes. For eq, in 802.11a spec you can see normalization used as follows:
BPSK – 1
QPSK – 1/sqrt(2)
16-QAM – 1/sqrt(10)
64-QAM – 1/sqrt(42) and so on.
I had discussed on how the normalization factor for an M-QAM modulation is derived @ http://www.dsplog.com/2007/09/23/scaling-factor-in-qam/
Hope this helps.
Krishna:
If I wanted to extend your equation for Es/No = f(Eb/No) to an OFDM system with QPSK inputs, how would I do that? I’m trying to build a Matlab script that computes the BER for OFDM using QPSK but I can’t get the correct noise variance.
Thanks,
Thomas
UC San Diego
@Thomas: For QPSK, we have two bits transmitted in each constellation symbol, so Es/N0 = 2Eb/N0
In your code should this line EsN0dB = EbN0dB + 10*log10(nDSC/nFFT) + 10*log10(64/80); % converting to symbol to noise ratio
be
EsN0dB = EbN0dB + 10*log10(nDSC/nFFT) + 10*log10(3.2/4); % converting to symbol to noise ratio
instead??
@santro: The result of 10*log10(64/80) and 10*log10(3.2/4) are the same, no? I just used the other one, because I assume that the sampling frequency is 20MHz, hence 3.2us = 64 samples and 4us = 80 samples.
Hello Karishna
I have nothing to say but you are doing very good work. I wrote my own code for BPSK-OFDM and it worked fine in AWGN channel, but when I involve the rayleigh channel (even the static single path one) my results of BER stays around 0.5. my thoughts are that I have some problem in the channel modelling as I am using the built-in matlab to build it. I will very much be grateful if you can email me to send you my code to have a look at and might suggest a better channel modelling.
with my best regards
@Abdulgader: Thanks. I have written a post on BER with flat fading Rayleigh channel in OFDM @
http://www.dsplog.com/2008/08/26/ofdm-rayleigh-channel-ber-bpsk/
There is one more post @
http://www.dsplog.com/2008/08/10/ber-bpsk-rayleigh-channel/
Hope this helps.
Hi! First of all thanks for your script that clarify me several aspects in OFDM. What I do not understand is how you obtain the expression
Es/N0 = Eb/No (nDSC/nFFT)(Td/(Td+Tcp))
starting from the two expression:
Es = (Td/(Td+Tcp))Eb and
Es = (nDSC/nFFT)Eb.
I want to extend the simulation to a general mQAM constellation and if I understand how this expression is derived, probably I can write an expression similar for example for 16QAM or 64QAM.
Thank you in advance
@Daniele: My replies:
1/ The term Es = (Td/(Td+Tcp))Eb comes because, we are sending samples over the time (Td+Tcp). However, useful information is contained only in the time Td.
2/ The term Es = (nDSC/nFFT)Eb comes because, we sending nFFT subcarriers. However, we are sending data only on nDSC subcarriers.
3/ Well, for a higher order modulation like M-QAM, one might also want to factor in that each symbol carrier log2(M) bits. For example, Es’/N0 = kEb/N0, where k = 4.
Also note: if you are using QAM constellation, you might want to normalize the transmit power to 1 by using the scaling factor 1/sqrt (2/3*(M-1)) http://www.dsplog.com/2007/09/23/scaling-factor-in-qam/
Thanks for your kind answer and clarifications.
It would be great if you could explain this sentence reported in your e-book about the simulations in awgn:
Relation between Eb/No and Es/No in OFDM
Combining (??how??) the above two aspects [Es = (Td/(Td+Tcp))Eb] and [Es=(nDSC/nFFT)Eb], the relation between symbol energy and the bit energy is as follows:Es/N0 = Eb/No (nDSC/nFFT)(Td/(Td+Tcp)).
Looking in this list of comment, I’m not the first that ask you the same question (see lk n.44). Also useful could be a reference where to find how this relation is derived.
Thank you again.
Dear sir
i am ding project on pulse shaping design for ofdm ….i am writing but not getting properly can u give any code for that …sothat i can go further plz ..
thank you sir
regards
@chanti: In typical OFDM systems, as we are using sinusoidal pulse shapes (thanks to ifft), we typically do not need to do any ‘extra’ pulse shaping.
Dear Krishna
I am trying to simulate an OFDM system using Cyclic Delay Diversity with different number of Tx antennas and 1 Rx antenna. I thought if i could use your program; but I have few questions for you:
1- I want to use Wimax frequency selective and flat fading channels, how can I create such a channels in your program? or the frequency selective channel you have created (random complex numbers) is also valid for Wimax and if I put nTap =1 would i be flat fading channel? I know there is also a built in function in MATLAB for such channels but I am unable to simulate using them.
2- As I increase the number of Tx antennas e.g. 2nd antenna, do I have to create a new set of parameters for it? e.g. separate channel, frequency response and noise for this 2nd signal. If its true; then How will I equalize 2 different signals after FFT as I would have already combined these two signals right after the Rx antenna (so now there is only 1 signal again).
One of my idea is to calculate separate frequency response for each channel and then add them to form a combined freq. response and then equalize using this single freq. response. Am I right! or whats your suggestion?
I would really appreciate your prompt help.
Regards.
@Muhammad:
1/ For WiMAX channel models, you may refer to the article Channel Models for Fixed Wireless Applications, Vinko Erceg, KVS Hari et al,
http://wirelessman.org/tga/docs/80216a-03_01.pdf
If you put nTap=1, then the channel is flat fading.
2/ You can write down the equations for 2-transmit 1-receive antenna case. Since you might be knowing the channel for each subcarrier, you can divide by the channel to equalize the received symbol. Hopefully the post on Transmit Beamforming might be of help.
http://www.dsplog.com/2009/04/13/transmit-beamforming/
Dear Krishna
Power normalization means that the power of the signal should equal one after normalization.
but when I calculate the power of the following:
1) x1 = 1/sqrt(2)*[randn(1,nSym*80) + j*randn(1,nSym*80)];
2) x2 = sqrt(80/64)*xt
the power do not equal one.
Could you explain what going on, pls?
Thanks in advanced
@Sami: The power of x1 is indeed one. Why did you multiply by sqrt(80/64)?
Dear Krishna Sankar
-For x1, the power will be one only if we make the value of nSym very large, but for small values of nSym the power does not normalized. So I think its better to generate the noise first, then calculate the generated noise power, after that normalize the generated noise power. In this case the noise power will be 100% normalized, and it will be independent on the value of nSym.
-For x2, I read your reply for Jimmy that you multiply by sqrt(80/64) for normalization purpose.
Thanks in advance
————————————————————————–
Krishna Pillai December 29, 2008 at 5:58 am
@jimmy: In the simulation model, we assume that the cyclic prefix is of duration 16 samples and the data symbol is of duration 64 samples. The term sqrt(80/64) is to normalize the transmit power. This normalization ensures that scaling of noise with respect to Es/No is valid.
@Sami: My replies:
1/ To be statistically accurate, we need more number of samples. I think, rather than simulating with lesser number of samples and then doing an ‘extra’ normalization on top of it, we would be better of simulating with a large number of samples
2/ The reply to Jimmy was about normalizing the transmit signal (and not the noise signal, which you are referring to). Jimmy’s query about sqrt(80/64) is pertaining to the transmit OFDM symbol where only 64 samples are useful (the rest 16 are redundant).
Hope this helps.
Dear Krishna Sankar
I have looked for the equation that you used in the simulation:
EsN0dB = EbN0dB + 10*log10(nDSC/nFFT) + 10*log10(64/80)+10*log2(M);
Or EsN0 = EbN0*(nDSC/nFFT)*(64/80)*log2(M); but I couldn’t find it in any reference.
If we multiply this equation by ts, we will get
EsN0 = EbN0*(nDSC/nFFT)*(64*ts/80*ts)*log2(M);
EsN0 = EbN0*(nDSC/nFFT)*T/Ts*log2(M);
Which does not consistent with the following equation :
EsN0 = EbN0*(T/Ts)*Rc*log2(M)
Where
T: Fourier period
Ts: OFDM symbol period
Rc: code rate
M=2^no.bits
Where there is an extra term (nDSC/nFFT) in your equation.
Reference book:
Theory and application of OFDM and CDMA, by Henriks, page 159
Could you give me your reference please?
Thanks in advance
@Sami: I do not have a reference for the term (nDSC/nFFT). However, the term is needed because we are using only nDSC subcarriers out of the nFFT subcarriers. When we define the variance of noise in time domain, the variance on each subcarrier is the same and affects the subcarriers which are not used also. However, the un-used subcarriers need not be factored in for Eb/N0 definition. Hence the usage of the term nDSC/nFFT.
Hope this helps. Please revert for clarifications.
sir in reference to your simulation for ber of ofdm in fading channel ,
i want to know why have u added only 10 taps ? what is the logic behind it ?
@hemdutt: In the simulations, I have a defined a cyclic prefix of duration 16 samples. I wanted to have a channel which is having shorter duration than the cyclic prefix. Hence I chose 10.
hello Krishna
i have a power line channel .could you please help me to simulate ofdm using the channel
here is the code
function y=testno(data_tobeatransmited)
u0=4*pi*realpow(10,-7);
ur=1;
e0=8.85*realpow(10,-12);
er=5.3;
con=5.8*realpow(10,7);
cond=5*realpow(10,-6);
ra=1.128e-3;
s=6*ra;
L=(u0/pi)*log((s/(2*ra))+sqrt((s/(2*ra)).^2 – 1));
C=(pi*e0*er)/(log((s/(2*ra))+sqrt((s/(2*ra)).^2 – 1)));
G=(pi*cond)/(log((s/(2*ra))+sqrt( (s/(2*ra)).^2 – 1)));
RS=50;
l=20;
RL=91.84;
q=length(data_tobeatransmited);
n=10000;%100000000/m;
f=1:n:100000000;
[n2 m2]=size(f);
ts=1e-9;
m=300/(q+1);
t=[0:m:299]*ts;
[n1 m1]=size(t);
R_Surface=sqrt((pi*f*u0*ur)/con);
R=(((R_Surface)/(pi*ra))*((s/(2*ra))/sqrt((s/(2*ra)).^2 – 1)));
Z= sqrt((R+j*2*pi*L*f)./(G+j*2*pi*C*f));
r= sqrt((R+j*2*pi*L*f).*(G+j*2*pi*C*f));
A=cosh(r*l);
B=Z.*sinh(r*l);
C=sinh(r*l)./Z;
D=cosh(r*l);
H=RL./(A*RL + B+ C*RL*RS + D*RS);
h=20* log10(abs(H));
% w=length(H);
% H=reshape(H,w,1);
for tx=1:m1
sum=0;
for kx=1:m2
sum=sum+H(kx)*exp(j*2*pi*t(tx)*f(kx));
end
y(tx)=(n/100e6)*sum;
end
H is the transfer function and y is the impluse response
thank you
@Amy: What is the bug in the code?
hello again Krishna
.it is power line channel it was in frequency domain using ifft program
for tx=1:m1
sum=0;
for kx=1:m2
sum=sum+H(kx)*exp(j*2*pi*t(tx)*f(kx));
end
y(tx)=(n/100e6)*sum;
end
y isin time domain.
which bag do you mean?
please i need help really ergent
which bug
@Amy: Hmm… why dont you use ifft to generate the frequency response of the channel?
Also, typically we can convolve the time domain transmit sequence with the time domain channel.
We can use this one. the above one was a function.
u0=4*pi*realpow(10,-7);
ur=1;
e0=8.85*realpow(10,-12);
er=5.3;
con=5.8*realpow(10,7);
cond=5*realpow(10,-6);
ra=1.128e-3;
s=6*ra;
L=(u0/pi)*log((s/(2*ra))+sqrt((s/(2*ra)).^2 – 1));
C=(pi*e0*er)/(log((s/(2*ra))+sqrt((s/(2*ra)).^2 -1)));
G=(pi*cond)/(log((s/(2*ra))+sqrt( (s/(2*ra)).^2 -1)));
RS=50;
l=20;
RL=91.84;
n=10000;
f=1:n:100000000;
[n2 m2]=size(f);
ts=1e-9;
t=[0:1:299]*ts;
[n1 m1]=size(t);
R_Surface=sqrt((pi*f*u0*ur)/con);
R=(((R_Surface)/(pi*ra))*((s/(2*ra))/sqrt((s/(2*ra)).^2 – 1)));
Z= sqrt((R+j*2*pi*L*f)./(G+j*2*pi*C*f));
r= sqrt((R+j*2*pi*L*f).*(G+j*2*pi*C*f));
A=cosh(r*l);
B=Z.*sinh(r*l);
C=sinh(r*l)./Z;
D=cosh(r*l);
H=RL./(A*RL + B+ C*RL*RS + D*RS);
h=20* log10(abs(H));
for tx=1:m1
sum=0;
for kx=1:m2
sum=sum+H(kx)*exp(j*2*pi*t(tx)*f(kx));
end
y(tx)=(n/100e6)*sum;
end
figure(1)
plot(f,h)
figure(2)
plot (t,y)
i did that and thanks but i tried to do same thing you did for qpsk but it is not working. could you hel me.
@amy: Sorry, due to time constraints, I find it difficult to debug the code. If you can mail more about “what is not working”, i can try to help.
Hi Krishna
your script is really very good
actually i got bit confused regarding data rate you used in the script BPSK BER with OFDM modulation. can you help me how we can we calculate data rate in the above script. plz tell me why you use nsym=10^4, any reason plz help me
@Bhasker Gupta: The actual data rate is notional in this script. In the system, it depends on how fast we sample the ifft samples. For example, if we have a sampling clock of 20MHz and as we are using 80 samples to send 52 bits,
the data rate = number of bits per symbol / symbol duration = 52 / (80/20) = 13Mbps.
I use nSym = 10^4 to get statistically accurate results.
hi krishna
thanks for answering my previous query
in your script you added term 10^(-EsN0dB(ii)/20)*nt to xt as additive white gaussian noise. i want to know how actually the above term comes. how can i do same thing with awgn command in matlab. secondly i want to include RS channel coding in above script will you help me plz.
@Bhasker: The term 10^(-EsN0dB(ii)/20) is to scale the noise voltage such that the ratio between signal energy and noise energy is scaled. I do not have matlab, hence unable to help with the arguments in awgn() in Matlab.
I have not discussed RS codes in the posts till now. Hope to do so in future.
Hi Krishna,
I have a problem understanding the term ” number of used subcarrier=52″.
I understood the significance of the guard interval (Tcp+Td=Ts). In your example does the the data symbols ( 3.2 µs) correspond to the 52 used subcarriers. And deos the Tcp correspond to 14 other sub-carriers?
Is this correct.
Best,
Ismail
@Ismail: The data symbol duration of 3.2us corresponds to the fft size (64) and the sampling clock (20MHz). To send 64 samples at 20MHz, we need 3.2us. It does not correspond to the number of used subcarriers.
could help me to understand
xF = [zeros(nSym,6) ipMod(:,[1:nBitPerSym/2]) zeros(nSym,1) ipMod(:,[nBitPerSym/2+1:nBitPerSym]) zeros(nSym,5)] ;
thank you
@christine: The variable xF represents the input to the iFFT. It represents subcarrier indices from [-32 to 31]. However as we are using only indices from [-26 to -1, 1 to 26], we have 6 zeros in the beginning, 26 used subcarriers, unused dc subcarrier which is not used, 26 used subcarriers, then again 5 zeros at the edge. Helps?
Hi Krishna, how are you doing ? what’s current topic you are work on?
which is more logical way of representing (S-P & modulator) ?
method 1: bits pass to modulator first & then reshaping
ipBit = rand(1,nBitPerSym*nSym) > 0.5 ;
ipMod = 2*ipBit-1; % BPSK modulation 0 –> -1, 1 –> +1
ipMod = reshape(ipMod,nBitPerSym,nSym).’; % grouping into multiple symbolsa
method 2: first reshaping & then pass to modulator
ipBit = rand(1,nBitPerSym*nSym) > 0.5 ;
ipBit = reshape(ipBit, nBitPerSym,nSym).’ ;
ipMod = 2*ipBit-1; % BPSK modulation 0 –> -1, 1 –> +1
I think when no. of symbol=no. of bits(BPSK case), then it doesn’t matter the priority But for other modulation techniques like QPSK, MPSK , MQAM, (M> 2).. the method 2 should be followed. Am I right?
Thanks in advance.
@Karan: Well, for higher order modulation schemes, we need to group bits to form a constellation symbol. As we are doing a model, it does not matter how we do as long as it is mathematically accurate
Note that the grouping am performing here is to group into OFDM symbols.
Hi, I didn’t get your line, can you please make it simpler?
you said:
” The term 10^(-EsN0dB(ii)/20) is to scale the noise voltage such that the ratio between signal energy and noise energy is scaled. ”
Thanks.
@Karan: The variable EsN0dB represents the Symbol to Noise Ratio in dB. To convert it to a scaling factor for noise voltage, we convert that by 10^(-EsN0dB(ii)/20)
Helps?
Hi Krishna
Pls in the formular below
yt = sqrt(80/64)*xt + 10^(-EsN0dB(ii)/20)*nt;
i have tried to vary the /20 to get different kind of plots. But want to comfirm from you if is where you have to get “Variable noise in an OFDM channel to obtain different BER plots
dear sir,
1-we assume that the cyclic prefix is of duration 16 samples and the data symbol is of duration 64 samples. The term sqrt(80/64) is to normalize the transmit power. can you explain by equation how this term make transmit power=1?
2-you said that we put 12 carriers (6+6)at the edges of band to prevent interference from other bands….in your simulation,you used ifftshift and put zeros in the middle.why???
please reply as soon as possible.
@ahmed:
1/ The noise added to the 16 samples of cyclic prefix does not have any effect as these samples are discarded
2/ Please refer to the post on -ve frequency to understand the need for fftshift
http://www.dsplog.com/2008/08/08/negative-frequency/
http://www.dsplog.com/2008/02/03/understanding-an-ofdm-transmission/
@EGRUE: Yes, the term 10^(-EsN0dB(ii)/20) is to scale noise voltage differently.
Hi krishna, I have actually read the answers given to you by the concerns generated by the formula below
10^(-Eb_N0_dB(ii)/20)*n
for further clarification, i have actually divided by 18,16,14,12——3 to get different plots that actually decreases down the graph . Want to know if is how one can plot for BER with variable noise in the channel. I will appreciate if you reply me soon. Thanks
@Egerue: Do not change the division factor. Rather change the value of Eb_N0_dB. The division by 20 is required to convert dB into voltage.
dear Krishna,
1-we assume that the cyclic prefix is of duration 16 samples and the data symbol is of duration 64 samples. The term sqrt(80/64) is to normalize the transmit power. can you explain by equation how this term make transmit power=1?
2-you said that we put 12 carriers (6+6)at the edges of band to prevent interference from other bands….in your simulation,you used ifftshift and put zeros in the middle.why???
please reply as soon as possible.
@ahmed:
1/ The noise added to the 16 samples of cyclic prefix does not have any effect as these samples are discarded
2/ Please refer to the post on -ve frequency to understand the need for fftshift
http://www.dsplog.com/2008/08/08/negative-frequency/
http://www.dsplog.com/2008/02/03/understanding-an-ofdm-transmission/
dear Krishna,
it’s ok for second reply (understood)
but i can not understand why you multiply by sqrt(80/64) ??how this term normalize symbol power??
@ahmed: Since the cyclic prefix samples are ignored by the receiver, the noise added to those samples does not have any effect on demodulation. To account for that, the term sqrt(80/64) is used.
Dear Krishna,
thnks for Your simulations which are very usefull.
Does this script work correctly only if we know frequency response?
I ask You that because I thought that if we know frequency response, we
can compensate influence of Rayleigh fading and than we have BER like in
AWGN systems. In Your simulation You have frequency response, but BER
graphic has still tipicall shape for Rayleigh channel.
Thanks very much!
@David: Yes, the script assumes that the receiver knows the channel. Even if the receiver knows the frequency response and compensates for it, it still wont be like AWGN. Recall, Y = HX + N
At receiver, we do Y/H = X + N/H.
The term N/H can cause poorer BER. Makes sensE?
Hello Krishna,
While looking at your code, I find that you are adding CP before converting the parallel stream in to serial. So it means there is a cyclic prefix for every parallel branch.
I’m not too sure about this since I think CP should have been added at the very end, after the stream has been converted from parallel to serial.
May I know why you are doing this? Wouldn’t this be wrong? Although the graph seems to be correct. Perhaps I’m mistaken
Furthermore, I’m not sure when you reply so kindly forward the answer to this query on my email address, which is [my user name here]@yahoo.com
@communications_engineer: Well, the parallel to serial aspect is a ‘notional’ thing. Don’t you agree? We need to add cyclic prefix for every ofdm symbol (i.e for every ifft out).
Hi Krishna
Thanks very much, your guidance, your work and your advice is really getting me through in my dissertation work.You are indeed a supervisor for this my project, and i will not finish this work workout puting ur name in the ACKNOWLDGEMENT section of this project. More grace to your ego.
Actually i have used your answer below to try and achieve a different noise (SNR), that is to get different graph for different SNR, but i was unable to do that. WHEN I USE SNR=[0:10], THE FIRST GRAPH WAS PLOTTED, BUT WHEN I USE SNR=[0:20], AND [0:30] THE GRAPH STILL REMAIN AT SNR=[0:10] .i believe that something is still missing, pls i will need your help, so that i can provide solution to this.
Secondly, i want to use SIMULINK, a real life model of mobile to base station link and work out BER for various noise conditions, pls i will appreciation if you provide guidance on this for me OR probably a solution.
Eb_No_dB =[0:10], –> 0 to 10dB in steps of 1dB
Eb_No_dB =[0:20], –> 0 to 20dB in steps of 1dB
Eb_No_dB =[0:30], –> 0 to 30dB in steps of 1dB
Thanks very much.
NNAMDI
@Egerue: Thanks. You might want to check the axis() command in the simulation code
You have given the Es/No smilarly,
for CDMA in rappaport’s book , He has explained from the block diagram till the derivation of probability of error.With Gaussain approximations too.
Could you suggests me one or where have you reffered for the derivation of the same kind and deeper explanation.
@rakesh: Adding OFDM to BPSK does not change the underlying BER for BPSK modulation. The derivation of BER for BPSK in AWGN is captured in http://www.dsplog.com/2007/08/05/bit-error-probability-for-bpsk-modulation/
Hello! Kirishna
will u pls. help… or send me matlab prog. which compareies the Ber vs multipath delay spread for different modulations used in OFDM like 16psk,qpsk,bpsk,8psk,32psk,etc.. PLEASE REPLY AS SOON AS POSSIBLE…
@Ruby: You may find the comparison of various modulation schemes in AWGN in
http://www.dsplog.com/2008/07/08/compare-bpsk-qpsk-4pam-16qam-16psk-64qam-32psk/
Hi Krishna sankar
i am new user , i want to BPSK BER with OFDM modulation with 802.11g. so what should i do….? i can do it with above equation…
please can you give reply as soon as possibe
because it is related to my project
@kim: This post should serve as a basic starting step. Ofcourse, in 802.11a/g OFDM chain, there are other stuff like scrambler, coding, interleaving, filters etc….
Good luck.
Hi Krishna sankar
because 802.11a and g same parameter
@kim: Yes, 802.11a and OFDM rates in 802.11g share the same baseband. Only the RF carrier changes from 5GHz to 2.4GHz band
is there any code with help me to comparission between 802.11a and 802.11g
@kim: What are metrics on which you wish to compare?
Dear Krishan
Thank for Reply
but I need simulation matlab codes for Post and Pre-FFT Beamforming in an OFDM System
Please help me
Thank a lot
@waleed: Sorry, I am not familiar with the topic which you are referring to.
Hi Krishna sankar
I am really thanks becuase you give me response i am written detail here
bit error rate versus bit signal-to-noise ratio for eight
different operation modes (6, 9, 12, 18, 24, 36, 48, and
54 Mbps) under AWGN channel.
compare the throughput performance of
802.11g and 802.11a which employ same OFDM
technique, but used different MAC parameters,
specified in Table
Table 2. IEEE 802.11g and 802.11a Parameters
Parameters 802.11g 802.11a
CW min 32 16
CW max 1024 1024
Slot Time 20 μs 9 μs
SIFS 10 μs 16 μs
DIFS 50 μs 34 μs
Propagation Delay 1 μs 1 μs
Basic Rate 1 Mbps 6 Mbps
Data Rate 54 Mbps 54 Mbps
Packet Payload 1000 Bytes 1000 Bytes
MAC Header 28 Bytes 28 Bytes
RTS Packet 44 Bytes 44 Bytes
CTS Packet 38 Bytes 38 Bytes
ACK Packet 38 Bytes 38 Bytes
PHY Header 24 Bytes 24 Bytes
these are paramters for 802.11a and 802.11g
if you need more information i can give to you
thanks
BR
@kim: For error rates for various modulation schemes, you can
http://www.dsplog.com/2007/08/05/bit-error-probability-for-bpsk-modulation/
http://www.dsplog.com/2007/11/06/symbol-error-rate-for-4-qam/
http://www.dsplog.com/2007/12/09/symbol-error-rate-for-16-qam/
http://www.dsplog.com/2008/06/05/16qam-bit-error-gray-mapping/
For the implications of MAC level parameters, please refer to the paper
Throughput and Delay Limits of IEEE 802.11, Yang Xiao, Jon Rosdahl, IEEE COMMUNICATIONS LETTERS, VOL. 6, NO. 8, AUGUST 2002
Hi Krishna sankar,
Your simulation is a great help to me, and I can well understand it.
However, there is one question confusing me: Although the simulation result showed the same performance between BPSK in AWGN and BPSK over OFDM in AWGN, could you please give me a deeper explanation?
{In my opinion, the system can be descripted as
xF_est = FFT(IFFT(xF))+n)=xF+FFT(n)
xF: the transmitted symbols
n: noises
xF_est: the estimate of transmitted symbols
As far as I know, FFT(n) don’t have the same statistic property as n. So we can’t get the same result as BPSK in AWGN. Is this correct?
}
Thanks in advance!
Best Regards,
Zhongliang
@Zhongliang: Well, I think fft(n) has the same statistical property as n, and hence we get the same result.
Unfortunately, am unable to point you to some text books which describes the proof for above. If you stumble across something, please let me know.
Hi Krishna Sankar, I think very carefully about the coefficient nDSC/nFFT in the formula Es=nDSC/nFFT*Eb but I didn’t get the point. Is Eb the bit energy that spreads over nDSC subcarriers? Es also spreads over nDSC subcarriers because no energy is located to the guard bands, so I think in the frequency domain, it should be Es = Eb. Please give me the answer soon, I have to explain to my teacher. Thank you in advance
P.S: Thank you for your Matlab code, it helps me a lot with my thesis.
Hi Krishna Sankar,
% Taking IFFT, the term (nFFT/sqrt(nDSC)) is for normalizing the power %of transmit symbol to 1
xt = (nFFT/sqrt(nDSC))*ifft(fftshift(xF.’)).’;
Why the normalization factor in the ifft is (nFFT/sqrt(nDSC)) instead of sqrt(nFFT/nDSC), just like sqrt(80/64) when considering cp?
And in the receiver ,
% Taking FFT (converting to frequency domain)
yF = (sqrt(nDSC)/nFFT)*fftshift(fft(yt.’)).’;
why to multiply sqrt(nDSC)/nFFT ? In order to normalize again?
But when you normalize the transmitted signal , you just add awgn, nothing else affect it . Why to multiply the factor?
Hi, could u please post a new subject to describe the SER and BER for MQAM(M>=4) in OFDM?
I’m confused about the Es here, does it mean the sample energy in time domain or the energy in frequency domain in used data sub-carriers?
And, why do you use the same theory BER formula for BPSK in an un-coded awgn? how can I get SER from BER(vice versa) in OFDM?
@danial: My replies
a) Extending to M>4 should be reasonably simple. You may have a look at the following posts for reference
Symbol error rate for 16QAM in AWGN
http://www.dsplog.com/2007/12/09/symbol-error-rate-for-16-qam/
Bit error rate for 16QAM in AWGN assuming Gray coded bit mapping
http://www.dsplog.com/2008/06/05/16qam-bit-error-gray-mapping/
b) Es stands for energy per constellation symbol (defined in frequency domain)
c) OFDM does not do any special except that it allows for sending information on parallel channels simultaneously. Hence the BER in AWGN is same as BER with OFDM in AWGN
d) The relation between Symbol error rate and bit error rate is independent of whether we use OFDM. I have a brief discussion on this relation in the post Bit error rate for 16QAM in AWGN assuming Gray coded bit mapping
http://www.dsplog.com/2008/06/05/16qam-bit-error-gray-mapping/
Hope this helps
thanks for your your graet work
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
please help me it’s urgent and necessary
@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.
I want to add 4 pilot carriers in the unused 12 slots that is left(64-52) in the code u have put up.Can u just help me in this regard
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 helpppppppppppppppppppppppp
please reply me it’s urgent Ineed the code it’s really important and thanks alot