Sunday, February 10, 2013

OFDM in WLAN: 802.11a and 802.11g: Detailed Analysis with Data Rate derivation

Previously we have learned about the fundamental concepts of OFDM, generic and independent of technology. Now lets take a more specific look at use of OFDM in 802.11.


Before, OFDM Wi-Fi was suffering from low data rates it was more like a PAN rather than a LAN. OFDM was first introduced in to Wi-Fi in the year 2003 with standardization of 802.11a (5GHz) and then with 802.11g (2.4GHz). Only then people started seeing Wi-Fi as something useful rather than a pure experimentation technology.

802.11b offers us atmost rate of 11Mbps through the use of CCK/HR-DSSS. But 802.11a/g offer 54 Mbps of data rate which is a drastic 5 fold increase compared to 802.11b.

Where as 11n gives us 600 Mbps of data rate a tremendous 11 fold increase. of course they are lots of factors involved there but whats the role of OFDM in this? Lets dive in to know.

802.11a/g: 

The IEEE 802.11 standard reserves 64 sub-carriers for use with OFDM but not all are used practically. Only 52 of them are used, remaining 12 are reserved.Enough theory lets get to some mathematics and see how OFDM achieves those fancy data rates.

802.11-2012: 20.6 has a good tables w.r.t data rates of 11n
Now before we start with the data rate calculations we need to understand a few terminologies, concepts and transmission process. 

  1. What parameters govern the Data rate?
  2. Modulation Scheme & Coding Rate (MCS)
  3. Bandwidth
  4. OFDM:  No of data sub-carriers
  5. Guard Interval


Modulation : With (A) and (B) from above, lets choose a modulation now modulation decides how many bits can carried for Eg. In case of QPSK we have 4 phases to choose from so using QPSK, so with the help of 2 bits we can choose one of the 4 possible phases meaning we can transport 2 bits. Similarly for 64 QAM (which is the highest modulation supported up to 802.11-2012 standard, 802.11-asc has 256 QAM support) we can transport 6 data bits (2^6=64).

Coding Rate: Any form of wireless communications suffers bits dostortion/corruption, so its important to know that our data Rx is intact and if its wrong we need to have capability identify the defect. For this we insert some extra bits in to the actual data so that we can do some error detection/correction, these are called parity bits and we have different coding schemes to employ Eg. convolutional encoding.



Shannon’s Noisy Channel Coding Theorem

“With every channel we can associate a “channel capacity” C (bits/sec). There exist such error control codes that information can be transmitted at a rate below C (bits/sec) with an arbitrarily low bit error rate.”


Coding rate determines the ratio of data to the extra parity bits. Higher the coding rate better the throughput because we are actually transporting more data bits.


OFDM Encoding Process: Group of all sub-carriers transmitted at once,so in .11a/g we have 52 sub carriers constituting a OFDM symbol.

We directly go to the source the standard 802.11-2012: 18.3.2.2 Overview of the PPDU encoding process, it says

i) Divide the resulting coded and interleaved data string into groups of NBPSC bits. For each of the bit groups, convert the bit group into a complex number according to the modulation encoding tables.Refer to 18.3.5.8 for details. 
This is the first step in the OFDM process after the scrambler and interleave  basically it is grouping the incoming data.

j) Divide the complex number string into groups of 48 complex numbers. Each such group is associated with one OFDM symbol. In each group, the complex numbers are numbered 0 to 47 and mapped hereafter into OFDM subcarriers numbered –26 to –22, –20 to –8, –6 to –1, 1 to 6, 8 to 20,and 22 to 26. The subcarriers –21, –7, 7, and 21 are skipped and, subsequently, used for insertingpilot subcarriers. The 0 subcarrier, associated with center frequency, is omitted and filled with the value 0. Refer to 18.3.5.10 for details.
 This is a crucial step, where in we map 48 bits of data to each sub carrier, all the mathematical representation is in form of complex numbers leaving space for pilot sub carriers. Here we don't use the subcarrier 0 which is the DC subcarrier because to avoid complexity in RF while performing D/A or A/D.

k) Four subcarriers are inserted as pilots into positions –21, –7, 7, and 21. The total number of thesubcarriers is 52 (48 + 4). Refer to 18.3.5.9 for details.
Insert the pilot sub carriers at predefined positions.  
l) For each group of subcarriers –26 to 26, convert the subcarriers to time domain using inverse Fourier transform. Prepend to the Fourier-transformed waveform a circular extension of itself thus forming a GI, and truncate the resulting periodic waveform to a single OFDM symbol length by applying time domain windowing. Refer to 18.3.5.10 for details.
Here comes the IFFT, faster way of doing DFT which converts from frequency domain to time domain. The CP (Cyclic Prefix) is also done after IFFT.

Data Rate Calculation:       Data rate is the "No of bits transported per sec" now with the above concepts we can see that,  

 Data Rate (bps)= No of bits in Modulation/OFDM carrier * No of data sub carriers *Coding Rate * Time Spread/sec 

As discussed above 802.11a/g standard specifies 64 sub carriers out of which 52 are used in a/g.

  1. Total Theoretical sub carriers: 64
  2. Total Sub carriers used: 52
  3. Total data sub carriers used: 48  ====> A
  4. Pilot sub carriers: 4 
Now with this, we know that the standard bandwidth in WLAN is 20MHz, (802.11-2012 introduces half and quarter rates also, but lets leave that as home work :-) anyways they are just inverse exponential to 20MHz).       

We also need to know about a few FFT related paramters. Refer Table 18-5 in 802.11-2012.

With 20 MHz bandwidth and 64 subcarriers: The sub carrier frequency spacing comes to
                 (SCFS) : 20MHz/64=0.3125 MHz.

So the IFFT/FFT has to run at a period of 1/SCFS to convert it to time/frequency domain:
                  IFFT/FFT period =1/0.3125 MHz=3.2 us.

So the total symbol duration is 3.2us and the thumb rule in .11a/g is that we leave a guard interval of 1/4 symbol time i.e., 0.8 us. 

                    So the total symbol time = 3.2us + 0.8 us = 4us. ====> B

 The above formula for data rate becomes,

Data Rate (bps)= No of bits in Modulation/OFDM carrier *A*Coding Rate * B

So for a BPSK we can transport 1 bit per sub carrier which makes 48 bits per OFDM symbol which spreads 4us in time domain. Now with coding rate of 1/2 it comes to, 

Data Rate =1*48*1/2*4=6 Mbps

Similarly for 64QAM with data rate 3/4 (The highest coding rate in 802.11), 
Data Rate=6*48*3/4*4=54 Mbps

Frequently Asked Questions:

1) Is OFDM performed first and then modulation or vice-versa?

First we divide and map the incoming bits to the "constellation mapper" in to N streams (N=no of sub-carriers) and  based on the encoding tables/modulation scheme converts to the complex number. Which is given as input to the IFFT for conversion to time domain, it also acts as a parallel to serial converter N-Frequency domain modulated streams to a single time domain stream for transmission.

2) Is there any rule between a modulation scheme and coding rate?Why cant i use 5/6 coding rate with BPSK?

Yes. Generally the more the no of bits carried by the modulation the more it is error prone but carrying more bits gives us high data rate. Its always a tradeoff between BER and Data Rate. In that aspect BPSK has the highest BER but lowest data rate. 

Here's the results from agilent on EVM and Constellation Errros (Measures the Tx Modulation Quality) , as you can see BPSK in the best in the table.

Allowed EVM and Relative Constellation Error
Data Rate (Mbps)Relative Constellation Error (dB)EVM (% RMS)
6-556.2
9-839.8
12-1031.6
18-1322.3
24-1615.8
36-1911.2
48-227.9
54-255.6
But, The error rate in BPSK is high as there is only one 
bit for representing data so slight error causes high BER. So it depends on the channel and type of fading whether BPSK can cause high BER or Low BER.

Hence the 802.11 standard has fixed these mappings for modulation and coding rates.


References:


No comments:

Post a Comment