Showing posts with label OFDM. Show all posts
Showing posts with label OFDM. Show all posts

Thursday, August 8, 2013

802.11 AC Primer: Whats all the fuzz about?

802.11ac is the upcoming big standard with tremendous increase in the data rates and throughput if properly utilized. Lets take a Brief/Raw look at the all the new features and how they help to achieve greater data rates and spectrum utilization.


PHY Features
  • 256 QAM
    • Very high order modulation scheme which increases the spectral efficiency only when used with beamforming technology, as high order modulation schemes are susceptible to noise and interference.
    • Compared to 11n 64QAM, spectrum efficiency improves by 33% 
    • Require about 30dB increase in SNR and coverage area is reduced (beam forming can solve this)
  • Sub-carriers
    • The maximum subcarriers that can be used with OFDM in WLAN is 64/20MHz, as of now 11ac uses this limit most efficiently, the next standard will run out the this limit, its time to increase it to 128/20MHz #IEEE :-)
      • 11a/11g ==> 52
      • 11n        ==> 57
      • 11ac      ==> ~59
  • 80 MHz
  • 160MHz
  • 80+80 MHz
    • Single continuous 160MHz and 2 discrete 80MHz can also be combined as 160MHz channel, increases the throuhgput but not the spctral efficiency.
  • 8 Spatial Streams
    • Sounds high, yeah for a single user it doesn't make sense, but with Multi User MIMO we can exploit this to increase the overall spectrum efficiency.
  • MU-MIMO
    • Instead of using all the Antennae for a single user (Even though some of them are not really used for some MCSes) we can use each antenna for a single user (max up to 4) and serve all of them in parallel.  This poses few issues like how do we identify each STA? What about group frames? How can a STA for which the data is not destined can ignore the frames? 
    • The answer to these questions is the additional features introduced in MAC as explained below. 
  • AES-256
  • GMAC and GCMP
    • Present in 11n in most of the enterprise AP's, now its official along with few other extra algorithms.

MAC Features


PHY ID's (Included in the VHT SIG field) 


Basic motivation is determine if the packet is not destined for you at the earliest possible stage (PHY instead of MAC) and go to micro sleep. (Most likely the case when MU-MIMO is in use)


GroupID


"An AP determines the possible combinations of STAs that can be addressed by an MU PPDU by assigning
STAs to groups and to specific user positions within those groups. (through a new GroupID management Frame).
So after decoding the TXVECTOR the STA can decided whether the frame is for itself (or) not."


Note: Group ID 0 is reserved for transmissions to AP and Group ID 63 is reserved for downlink SU transmissions

Partial AID: The partial AID is a non-unique identifier of a STA and is 9 bits conveyed in the TXVECTOR To identify whther the transmissions are destined to a STA/not, used in conjunction with GroupID.


PHY Power-saving with PHY ID's



TXOP Sharing 

In the TXOP won for a particular AC, we can also send frames destined for others AC's to other STA's as well.
"This mode only applies to an AP that supports DL-MU-MIMO. 
The AC associated with the EDCAF that gains an EDCA TXOP becomes the primary AC. TXOP sharing is allowed when primary AC traffic is transmitted in a VHT MU PPDU and resources permit traffic from secondary ACs to be included, targeting up to four STAs."


TXOP power save


Sounds weird but is a good feature. Basically in a TXOP for MU-MIMO, if the frame is not destined for the STA it can doze off for that TXOP duration.

"If the AP allows non-AP VHT STAs to enter Doze state during a TXOP, then a non-AP VHT STA that is in VHT TXOP power save mode may enter the Doze state till the end of that TXOP when one of the following
conditions is met:
— On receipt of a VHT MU PPDU, the STA determines that it is not a member of the group indicated by the RXVECTOR parameter GROUP_ID. 
— On receipt of an SU PPDU, the STA determines that the RXVECTOR parameter PARTIAL_AID is neither equal to 0 nor does it match the STA’s partial AID. 
— The STA finds that the PARTIAL_AID in the RXVECTOR matches its partial AID but the RA in the MAC header of the corresponding frame that is received correctly does not match the MAC address of the STA."
 References:

    1. IEEE Discussions: Spectrum Efficiency 
    2. IEEE Discussion: PHY Powersave
    3. 802.11ac-draft 5.0

Monday, February 18, 2013

MU-MIMO and 802.11n/ac:An User Level Overview

Multi User MIMO, the technology introduced first in 802.11ac (By first means in to the IEEE std's) and is known to increase the spectral efficiency of the wifi channel by using multiple antennas for multiple recipients in the Downlink.


When a 11n/11ac AP with 4 antennae transmitting to a smart phones with typically a single antenna, the AP is forced to use single antenna only, causing high spectral wastage. Now imagine, if we can make use of the other 3 antennas to transmit data to other connected clients while antenna1 is transmitting to STA1? 

Here's a quote from the 802.11-ac-draft-4.0:

The support for VHT transmit beamforming sounding and VHT MU PPDUs in a VHT AP and more than oneVHT STA within a VHT BSS enables the optional use of DL-MU-MIMO. 
With DL-MU-MIMO the AP can create up to four A-MPDUs each carrying MPDUs destined for an associated MU capable STA. The AP uses group identifiers (GIDs) to signal potential recipient STAs. 
The AP transmits the A-MPDUs simultaneously in separate space-time streams such that each recipient STA is able to demodulate the space-time streams carrying its A-MPDU. 
The simultaneous transmission of A-MPDUs in a single VHT MU PPDU provides a means to increase aggregate throughput over that which would be achieved by sending the A-MPDUs in separateSU PPDUs.
That's MU-MIMO causing us a higher DL throughput even when there are many STA's connected to AP. Now for a technical mind, we shall discuss the below queries in the upcoming 802.11ac article.


a) How the CSMA/CA works here?

b) How the ACK procedure works? 

c) Why TxBF is mandatory for DL-MU-MIMO

d) Can we explot this for Multi AP and Multi Channel COncurrency...so on


Here's a nice video demonstration by qualcomm R&D, Enjoy.


OFDM in WLAN: 802.11n: Similar to 802.11a and 802.11g with minor changes

In the previous article we have discussed about OFDM in 802.11 a/g, now let's take a look at how OFDM works in 11n. 

OFDM has little to do with the drastic 11n rate boost, MIMO is the key player there. Lets leave the MIMO part aside, its a candidate for next article. As far as OFDM is concerned it will work per antenna, but the basic concept per antenna is the same as 11g with few changes.


20 MHz:  This is same as 802.11 a/g but 


a) With an extra 4 sub carriers.
In 802.11a/g we use 48 sub-carriers for data and 4 sub-carriers for pilot. But in 11n we make use of an extra 4 sub-carriers from the reserved for data sub-carriers.So this results in increased throughput.


b) Short Guard Interval (Optional)

we have short guard interval introduced in 11nIn the previous article we have take the guard interval as 1/4 of symbol time, now in 11n they have still decreased the guard interval to 1/8 of the symbol time. So it comes down to,                          3.2us *1/8=0.4us 

Lets take an example to understand:

a) Full Guard Interval

20MHz/64=0.3125; 1/0.3125 =3.2us + 1/4 * 3.2 us=4 us

b) Short guard Interval

20MHz/64=0.3125; 1/0.3125 =3.2us + 1/8 * 3.2 us=3.6 us


Note: Important point to note here is that while doing the calculations for the FFT period we have considered the maximum carriers 64 not the used carriers, so the above calculation of 3.2us holds good in spite of increased sub carriers.

40 MHz: 

Its same as 20MHz but the process repeated in both primary and secondary channels.

So as derived above the total no of sub-carriers in  a 40MHz channel is 52*2 (primary and secondary) + 4 (extra).

The reason for these extra 4 data sub carriers is that we don't need that many (8) pilot sub-carriers combined for both the channels, so we converted some of them to data sub carriers.

Data Sub-Carriers = 52 *2 = 104
Pilot sub-carriers  = 4 + 4  = 8
======================
Total Sub-carriers = 112 with 8 pilot sub-carriers.

Now out of that if remove 2 sub-carriers from 8 and convert them to 2 and add 2 more (why?) 
======================
Data Sub-carriers = 104+2 (from pilot)+2 (extra)=108
Pilot sub-carriers = 4-1 + 4-1=6
======================
Total sub-carriers = 108+6 =114

I am not sure of the exact rationale behind adding some number of sub carriers  but its safe to attribute that to the evolution, as the IEEE std progresses they are trying to make use of all the reserved sub-carriers in that process.

With the same logic in the previous article we can similarly derive the rate calculations for the above 20MHz and 40Mhz as well. The above tables from the IEEE 802.11-2012 will help you.

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:


Saturday, February 9, 2013

What is OFDM?: Simplified..

Lets take a look at the technology that literally commanding all and any form of wireless communications OFDM without requiring any prior electronics knowledge.

Orthogonal Frequency Division Multiplexing is the most sought modulation technique in today's cutting edge wireless either it be 802.11 (WLAN), 802.16(WiMax), 3GPP 36 series (LTE)..

Single Carrier Modulation:

In the traditional communications we make use of a single Tx antenna and a single Rx Antenna. All the incoming data is modulated using a single carrier and sent OTA, at the Rx side its is  demodulated and data after removing the carrier is given out.

Multi-Carrier Modulation:

FDM: 

But in order to gain high throughput a new scheme is introduced. Where in we divide the channel in to different sub channels and assign a carrier to each sub-channel for modulation known as sub-carrier and finally multiplex all the carriers+data and send using the single Tx Antenna.
But in order to avoid interference (inter-symbol interference) we use a guard spacing between the sub channels causing in bandwidth wastage.

OFDM: 

In order to save the wastage and use it effectively we choose the sub-channels and sub-carriers such that they are orthogonal to each other meaning they don't interfere with each other. So we can skip the guard spacing between the sub-channels and save bandwidth.



FDM Vs. OFDM


Truly speaking it should be termed as FDMO, as you will see why just in a moment. lets understand each word in detail in the acronym.

Frequency Division (FD):

Instead of modulating all data with one carrier, divide the bandwidth in to equally separated sub-channels and assign a carrier to each sub-channel called sub-carrier.

Multiplexing (M):

As we have multiple sub-carriers but a single Tx antenna we need to map all the sub-carriers rather we need to multiplex all of them and send OTA. We make use Parallel to Serial converter for this.

Orthogonality(O):

We all know from the high school maths that orthogonality means "product of slopes = -1" meaning one signal will not overlap with the other.

In a similar context in the time domain a sub channel is represents as a rectangle which in a frequency domain converts to a "sinc" wave, now if we multiplex the "sinc" waves of all sub carriers sub channels it will look something like the below.

Now at the Rx side we can decode this wave because of the orthogonality, see the "arrows" they represent the frequency at which impact of all other sub carriers is zero, so we get to Rx only that particular sub-carrier we are interested in.


*2: By using an IFFT for modulation we implicitly chose the spacing of the subcarriers in such a way that at the frequency where we evaluate the received signal (indicated as arrows) all other signals are zero.



Advantages:

  1. Saves bandwidth
  2. Carries more no of data than a conventional carrier.


Disadvantages:
  1. Highly depends on the orthogonality achieved, need a good sync on Tx and Rx and also no multipath effect.
  2. High PAPR: Peak to Average Power Ratio.
The reason for high PAPR is that, as we use many sub-carriers with same bandwidth, the sum of peak power of all the sub-carriers varies instantaneously.
OFDM exhibits peaks whose power strongly exceeds the mean  power: the signal is said to have a high PAPR. This prevents use of high-efficiency amplification devices (High Power Amplifiers, HPA), which can cause nonlinearities reuslting in in-band distortion and increases Out-Of-Band  Radiation (OOBR), inter Symbol Interference and a high Bit-Error-Rate (BER).

Mitigations

1. 

a) Pilot: Instead of using all the sub-carriers/channels for data, use some selected sub carriers to send with zero-data so that the Rx can tune itself with the Tx. These are kind of training subcarriers.

b)  Cyclic Prefix (CP): In order to overcome the MultiPath effect, OFDM implements a clever technique of CP where in we first need to find the "Doppler Spread" of the multipath channel and then copy that amount of time from the data signal from the last to the first. So that even if that signal undergoes the multipath fading, we still have the data intact only the copied part is lost.


Doppler Spread: The amount of delay induced by the multipath channel to the 1st signal causing to overlap with the 2nd singal leading to infamous inter symbol interference. 


2.  There are many methods but below are famous ones
  • Clipping and Filtering
  • Peak Windowing


References:

  1. History behind OFDM
  2. Orthogonality in OFDM
  3. Why High PAR 

  4. PAPR Reduction Techniques



Note: All the pictures here are taken from the references and some additional resources. The author do not claim any copy right.