Showing posts with label coding rate. Show all posts
Showing posts with label coding rate. Show all posts

Wednesday, August 14, 2013

Why are some of the MCS combinations invalid in 11ac?

11ac boosts the WLAN rates tremendously in to the gigabit range, but it also introduces a slight problematic area which is not really focused in 11n (because its not much of a problem) "the no of BCC encoders."


In 802.11 there are 2 types of convolutional codes (FEC) defined,

 
  • BCC (binary convolutional code)
    • Encodes the data as per the coding rate, if multiple encoders are used demultiplexes the scrambled bits among NES (number of BCC encoders for the Data field) BCC encoders, in a round robin manner
    • Punctures the Encoded output to achieve higher coding rate, by puncturing we mean we decrease the no of output bits (the denominator of the coding rate) there by resulting in an higher coding rate.
        

                   "Higher  rates are derived from it by employing 'puncturing.' Puncturing is a procedure for omitting some of the encoded bits in the transmitter (thus reducing the number of transmitted bits and increasing the coding rate) and inserting a dummy “zero” metric into the convolutional decoder on the receive side in place of the omitted bits. Decoding by the Viterbi algorithm is recommended."


  • LDPC (low-density parity check code.)
    • High performance error-correcting codes, lets us discuss these some other time.
Note: The same MCS table shall be used for both BCC and LDPC coded transmissions.


Lets take a look at both 11N and 11AC with regard to BCC encoding and MCS Rates Validity.


11N:

The rules of BCC encoder in 11N are:

  1. A single BCC encoder can support up to 300 Mbps of data rate at most, after that for every 300 Mbps step we need to use an additional encoder.
  2. NES values were chosen to yield an integer number of punctured blocks for each BCC encoder per OFDM symbol.
  3. The number of BCC encoders is not limited

So if we observe the MCS's 21, 22, 23 they all use 2 BCC encoders as the Tx Rate is > 300 Mbps. When using multiple BCC encoders the encoder parser demultiplexes the scrambled bits among NES (number of BCC encoders for the Data field) BCC encoders, in a round robin manner. 

802.11ac data flow from higher-level protocols to symbols
Process of Convolutional Coding: Multiple BCC Encoders

So the total number of bits must be multiple of no of encoders, else there will be some extra bits left at the end of the distribution.

For Eg: In case of 
optional 40 MHz, NSS = 3, EQM

MCS 21: 64QAM-2/3-1944-1296-2 Encoders

The total number of coded bits 1944 are split across   648 blocks of BCC encoders with 3 bit length, each block yields 2 bits resulting in 1296 Data bits/sub carrier.

11AC:


The rules for BCC encoder in 11AC are:
  1. The maximum data rate per BCC encoder is 600Mbps
  2. The number of BCC encoders for a particular combination of MCS, Nsts and BW is determined by the short GI data rate and the same number of encoders are used for the corresponding normal GI rate
  3. The number of BCC encoders is not limited
  4. NES values were chosen to yield an integer number of punctured blocks for each BCC encoder per OFDM symbol.

As shown in the 11N example, lets take the case of 

mandatory 20 MHz, NSS = 1, 


MCS-8: 256QAM-3/4-416-312


Here the total no of coded bits 416 should be split across 104 blocks BCC encoders with 4 bit length each block yielding 3 data bits resulting in 312 data bits/sub carrier.


MCS-9: 256QAM-5/6-416-??

Here the total no of coded bits 416 cannot be split across a interger number of encoders violating the above rule #4, hence this MCS combination is invalid.


mandatory 20 MHz, NSS = 3, 


MCS-9: 256QAM-5/6-1248-1040


1248/6 = 208 Blocks of 6 bits each yielding 5 bits output resulting in 1040 data bits, which is valid.

Similarly we can do for other MCS holes (Missing MCS rates which are thrown because they are considered invalid).


Conclusion:


So if we convert the above example in to a mathematical forumala...it sumps as below


The reminder of the division of Total no of coded bits/denominator of coding rate (the length of each convolutional code block) should be 0.


         "For BCC encoding, some of the MCS-NSS combinations are excluded from the MCS table to avoid additional padding symbols. Allowed MCSs are selected such that the number of coded bits in each OFDM symbol contains an integer number of punctured blocks from all encoders, i.e., mathematically every allowed MCS-NSS satisfies:"
Condition for a MCS to be valid: For definitions refer the IEEE spec

References:


1) IEEE 802.11ac-draft 5.0
2) IEEE 802.11-2012

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: