WiFi

 

 

 

PCF - Point Coordination Function

 

At least as of now(May 2017), in most of WLAN communication there is no specific centeral controller for data scheduling (i.e, data transmission and reception). Most of the scheduling is based on DCF(Distributed Coordination Function). As another way of scheduling algorithm, a new algorithm called PCF which works (at least in part) with a centeralized controller is introduced. However, PCF is not the mandatory algorithm in 802.11 specification. It is Optional even thought the specification itself was finalized many years ago. DCF is basically Contention based algorithm and PCF is more like Contention-Free algorithm.

Let's follow PCF in three steps. First, we see how PCF and DCF take turns on the same channel. Next, we walk through one Contention Free Period frame by frame. Finally, we look at the Beacon field that announces the CFP to every station.

How does PCF share the channel with DCF ?

Overall scheduling algorithm of PCF is illustrated below. As shown here, even in PCF not all data communication is done in CF(Contention Free) method. It happens in alternating period of CFP(Contention Free Period) and CP(Contention Period). In this page, I will focus mostly on what's happening in CFP. Regarding what's going on in CP, I would suggest you to refer to DCF page.

In PCF Operation, a speciall scheduler called PC(Point Coordinator in Access Point) take control over the wireless channel and control the data scheduling (transmission and reception) of all the stations (WLAN user devices). Actually in PCF, the Access Point hijack the radio channel by transmission Beacon during the IFS(Inter Frame Space) in which nobody should transmit anything.

The top row of the diagram in the next section shows this split. Each Super Frame starts with a Beacon, marked B. The CFP follows the Beacon and runs under PCF, and the CP follows the CFP and runs under DCF. So PCF never replaces DCF. It only takes the first part of each Super Frame.

The PC wins the channel at the start of the CFP because of the interframe spaces. A DCF station waits for DIFS before it contends, but the PC waits only for PIFS. Both are built from the same two values: PIFS = SIFS + 1 slot time, and DIFS = SIFS + 2 slot times. For 802.11a at 5 GHz, SIFS is 16 microseconds and the slot time is 9 microseconds. So PIFS is 25 microseconds and DIFS is 34 microseconds. For 802.11b, SIFS is 10 microseconds and the slot time is 20 microseconds, which gives 30 and 50 microseconds. In both cases the PC is one slot time ahead of every DCF station, so its Beacon goes out first.

Inside the CFP, each frame follows the previous one after SIFS. SIFS is shorter than both PIFS and DIFS, so no DCF station sees the medium idle for long enough to start a transmission.

  • PCF runs on top of DCF : every Super Frame has a CFP under PCF and a CP under DCF, so stations without PCF support still get the CP.
  • PIFS gives the PC priority : PIFS is one slot time shorter than DIFS, so the PC reaches the idle medium before any DCF station.
  • SIFS keeps the CFP closed : every exchange inside the CFP uses SIFS gaps, and these are too short for a DCF station to start.

How does the PC poll the stations in one CFP ?

Following is an example of PCF operation. (In reality, there can be many variations in how the PC controlls each Stations, but the fundamental logic would be similar to the diagram shown here)

The diagram below has two layers. The top layer shows two Super Frames, each made of a Beacon, a CFP under PCF and a CP under DCF. The lower layer zooms into one CFP, with three rows: the PC in the AP, Station A and Station B. The vertical lines mark the gaps between frames. PIFS comes before the Beacon, SIFS separates all the frames inside the CFP, and DIFS follows the end of the CFP. The green circles number the six steps.

PCF super frame with CFP and CP, and one CFP in detail: Beacon, Data + CF-Poll, Data + CF-ACK, CF ACK + CF-Poll, Data and CF-Ack + CF-End

Now let's look into the above diagram in more detail.

  • Step (1) : (If Carrier is idle for a certain time period (PIFS : PCF Inter Frame Space)) the AP sends a Beacon (PIFS is shorter than DIFS. It means that the Beacon is transmitted within an IFS of conventional scheduling method). Since this Beacon is transmitted onto the medium (radio channel) while nobody is transmitted, this message will reach every station(WLAN devices) without any risk of collision. This Beacon carries the information on PCF capability of the AP(See Beacon frame section for the details). By this step, AP would take the control of the wireless channel.
  • Step (2) : (If AP has data for Station A), the AP sends [Data] and [CF-Poll (a kind of Grant)] to Station A.
  • Step (3) : Since Station A get the CF-Poll(Grant) from the AP, (if it has any data for AP) it can transmit the [data and ACK] to the AP.
  • Step (4) : (Assuming that the AP has no data for Station B), now the AP sends [Ack] for Station A and [CF-Poll] to Station B.
  • Step (5) : Since Station B get the CF-Poll(Grant) from the AP, (if it has any data for AP) it can transmit the [data] to the AP
  • Step (6) : After the AP has given CF-Poll(Grant) to all the devices, it sends [ACK] for the last Station(in this case, Station B) and transmit [CF-End] in order to notify all the devices(stations) that this is the end of CFP.

Each box in the diagram is one frame. The 802.11 MAC gives a separate frame subtype to each combination of data, acknowledgement and poll, and Wireshark decodes them with the names below.

  • Step (2) : Data + CF-Poll. The PC delivers data to Station A and polls it in one frame.
  • Step (3) : Data + CF-Ack. Station A sends its own data and acknowledges the data from step (2).
  • Step (4) : CF-Ack/Poll with no data. The PC has nothing for Station B, so it sends only the acknowledgement for Station A and the poll for Station B.
  • Step (5) : Data. Station B has no data to acknowledge, so it sends data only.
  • Step (6) : CF-End + CF-Ack. This control frame acknowledges Station B and ends the CFP.

This piggybacking is the main gain of PCF. One frame can carry data, an acknowledgement and a poll together, so the CFP needs fewer frames and fewer SIFS gaps. A polled station must answer even when it has nothing to send. In that case it sends a Null frame, so the PC still gets a response.

  • A station transmits in the CFP only when it is polled : the CF-Poll works as the grant, and only the PC sends it.
  • Acknowledgements ride on the next frame : CF-Ack is carried by the next frame in the sequence, whichever side sends it.
  • CF-End closes the CFP : the PC ends the CFP when it has served every station, and the CP starts after DIFS.

What does the Beacon tell the stations about the CFP ?

Step (1) says that the Beacon carries the PCF information of the AP. Let's look at that information, because it is also how DCF stations learn to stay quiet during the CFP.

The Beacon carries a CF Parameter Set element, and its body is 6 bytes long. Wireshark decodes four fields in it:

  • CFP Count : 1 byte. It counts the DTIMs that remain before the next CFP starts.
  • CFP Period : 1 byte. It is the number of DTIM intervals between the starts of two CFPs.
  • CFP Max Duration : 2 bytes. It is the maximum length of the CFP, in TU.
  • CFP Dur Remaining : 2 bytes. It is the time left in the present CFP, in TU.

A TU is 1024 microseconds. Let's work through one example. Assume a beacon interval of 100 TU, a DTIM period of 1 and a CFP Period of 2. Then a CFP starts at every second Beacon, which is every 2 x 102.4 = 204.8 ms. If CFP Max Duration is 50 TU, the CFP lasts at most 51.2 ms. So at least 153.6 ms of each 204.8 ms is left for the CP.

The CFP also needs protection from stations that do not support PCF. Every station that hears the Beacon at the start of the CFP sets its NAV for the CFP. So a DCF station stays quiet without knowing anything about polling. The CF-End frame then tells all the stations that the CFP is over, and the CP can start before CFP Max Duration runs out.

PCF is optional, and very few devices implement it. One reason is that PCF is not part of the Wi-Fi Alliance interoperability certification. Later, 802.11e added QoS versions of the polling frames, such as QoS CF-Poll, for HCCA. So the polling idea continued, even though PCF itself is seldom used.

  • The CF Parameter Set schedules the CFP : CFP Period and CFP Count say when the CFP starts, and CFP Max Duration says how long it can last.
  • The NAV protects the CFP : stations set it from the Beacon, so they do not need to understand PCF.
  • The durations are in TU : 1 TU is 1024 microseconds, so 50 TU is 51.2 ms, not 50 ms.

Reference :

[1] PCF scheme 

[2] MAC 802.11 Point Coordinator Function

[3] Point coordination function - Wikipedia

[4] packet-ieee80211.c - Wireshark IEEE 802.11 dissector, CF Parameter Set and frame subtype names