A Primer For The 802.XX Physical Layer

Part 2: What the PHY is all about and why it’s so important in the IoE.

popularity

This is the second installment of the 802.XX for the IoE series of articles. The first one was published in the August issue and addressed the Media Access Control (MAC) layer. In this article, we will examine the elements of the physical (PHY) layer of the 802.11 protocol stack. For reference, the protocol stack is shown in figure 1.

The best designs, like everything else, are built on a solid foundation. It’s no different for physical and MAC layers of the protocol stack.

The MAC layer offers a variety of functions in support of 802.11-based Wireless Local Area Networks (WLAN) operation. It is generally considered to be the brains of the network. It maintains, and manages the communications between the access points (AP) and the 802.11 clients.

The MAC layer’s fundamental function is to coordinate the access to the shared radio channel for all the devices on the LAN. It is also responsible for implementing the protocols that enhance communications over the wireless medium. It uses the PHY layer where the various flavors of the standard are defined, 802.11b, a, n, ab, etc.

The original 802.11 standard defined three wireless data interchange procedures, of which only two, frequency hopping spread spectrum (FHSS), and direct sequence spread spectrum (DSSS) are of interest. The third, IR, although it is a wireless technology, is not prevalent in the wireless landscape. Discussions in this article will focus on RF. (More information about spread spectrum can be found here.)

802.11
Fig. 1: The 802.11 protocol stack.

Getting physical
The PHY encompasses two major sublayers: the Physical Layer Convergence Protocol (PLCP), and the Physical Medium Dependent (PMD). The MAC contains a set of protocols that define how these two layers will interface with it, and are controlled by it, as well.

The direct interface with the MAC is the Physical Layer Convergence Protocol sublayer. It uses a set of primitives, which utilize a Service Access Point (SAP) to communicate with the MAC layer. Basically, it waits for the MAC layer to send the instruction set to the Physical Layer Convergence Protocol, at which time readies the MAC protocol data units (PPDU) for transmission.

To reduce the dependence on the MAC on the Physical Medium Dependent (PMD) sublayer (discussed next) for each transmission, there is a bit of staging done. The Physical Layer Convergence Protocol layer maps the MAC protocol data units into a suitable frame format so they are ready for transmission by the PMD. One other function of the Physical Layer Convergence Protocol is to route the incoming frames from the client to the MAC layer.

It is interesting how it does that. Specifically, the code in the Physical Layer Convergence Protocol binds a PHY-specific header field and preamble with the information needed by the PHY transceivers. This information is attached to the Mac protocol data unit by the Physical Layer Convergence Protocol. This is called a composite frame and referenced as either the Physical Layer Convergence Protocol data unit (PPDU) or the Physical Layer Convergence Protocol Service Data Unit (PSDU) – both are used interchangeably. The reason this approach is used is because it allows for the transfer of PSDUs between stations, asynchronously, which dramatically improves throughput.

Physical Medium Dependent
The Physical Medium Dependent is the second critical element of the PHY layer. It is controlled by the Physical Layer Convergence Protocol. Its main function is to provide the mechanism for the transmission and reception of the client stations over the wireless medium.

This service interfaces directly to the RF. It modulates/demodulates (MODEM) the frame transmissions. It handles functions such as signal encoding, bit timing, and transmission medium properties. This layer also applies some highly complex coding schemes such as (BPSK, DQPSK, DBPSK, CCK, QPSK, and QAM) with modulation schemes such as DSSS, OFDM, MIMO-ODFM to code signals, depending upon the system requirements.

Within the PHY layer exists what is called the Physical Layer Management Entity (PLME). These entities are designed to provide layer management services, used to call various management functions. For example, the MAC needs to know what is happening in the station. That service is provided by the station management entity (SME), which is present in every station and houses the station’s unique details. It is actually layer-independent and resides off in a separate plane, but is attached to the particular layer. It is responsible for collecting data from the various layer management entities and sets the value of layer-specific strictures. A counterpart exists in the MAC layer as well.

Layer management primitives
Layer management is housed in the particular layer’s management information base (MIB). This information is exchanged via the management service access point, which handles the transactional exchange of these primitives. The management information base is user-configured and values are stored in it for later retrieval by the primitives. The management information base also can have attributes set by the user.

An example of how this might work is as follows. Let’s assume the access point has to have some changes made in a particular wireless parameter. Say one wants to change the security level from WEP to WPA, or go from a 64- to 128-bit security protocol. The configuration page of the access point is accessed much like accessing a home router. When the change is made, it is written into the management information base. Such a change might set the true/false flags or the 0/1 bit.

Under the covers – PHY operations
The PHY is responsible for the signal functions, including Carrier Sense/Clear Channel Assessment (CS/CCA), transmit and receive. The TX and RX functions are standard, but he CS/CCA is a bit more complex.

The primary role of the CS/CCA is to determine the state of the wireless medium, specifically to sense when a network signal has started (Carrier Sense), and to determine if the channel has traffic or is clear (Clear Channel Assessment) prior to packet transmission.

On the receive side, when the Physical Layer Convergence Protocol CS/CCA senses the packet’s preamble sync pattern, followed the valid start frame delimiter (SFD), and Physical Layer Convergence Protocol header, it sets in motion the procedure to receive the packet. The preamble and the header are discarded and only the MAC frame is kept.

On the transmit side, the CS/CCA is listening for a PHY-TXSTART.request (TXVECTOR) from the MAC Sublayer. Once received, the CS/CCA calls the transmit procedure. The CSMA/CA protocol is actually handled by the MAC and runs the PHY Physical Layer Convergence Protocol in the CS/CCA procedure before the transmit function is executed.

How carrier sense works
Carrier sense has one primary purpose; to direct channel traffic and avoid collisions. The PMD is directed by the PHY to monitor the channel. Basically, it just listens for traffic. Once it senses traffic, it reads the Physical Layer Convergence Protocol frame header and preamble, and makes an attempt to synchronize the receiver’s data rate to that of the signal. If the channel remains clear, the data is received and processed.

Another function of Carrier Sense is to do channel assessment. Channel assessment is done by the PHY layer and relayed to the MAC layer. The process is relatively simple. A busy channel causes the PHY layer to send a PHYCCA.indicate primitive with the bit set to busy in the status field. If the channel is idle, then the PHY layer sends a PHYCCA.indicate primitive with the bit set to idle in the status field. This is a typical example of what is stored in the MIB database. CCA is also very dynamic in its ability to be configured.

How the receive function works
Figure 2 shows the WLAN physical layer for the “a” standard, but the design is similar for all. Starting out with a frame arriving at the device, the Physical Layer Convergence Protocol will examine the frame header looking for a valid Sync and SFD. On a side note, the Physical Medium Dependent will always consider the channel busy if a signal of at least -85 dBm is present. If there is a lot of noise on the channel, for whatever reason, the channel can be rendered useless. With wireless, that is less of a problem than other medium, but worth noting here.

If the Physical Layer Convergence Protocol finds the header valid and error-free, it sends notification to the MAC layer via the PHY-RXSTART.indicate primitive. If everything is order and the MAC layer is ready to receive, once the reception starts, an octet counter is set, from the Physical Layer Convergence Protocol data unit’s header length field value. It keeps track of all the Physical Layer Convergence Protocol Service Data Unit octets received. That way the Physical Layer Convergence Protocol knows when the frame end happens. During this procedure, the data received by the Physical Layer Convergence Protocol is sent, via octets of the PSDU to the MAC layer using PHY-DATA.indicate messages. Once the final octet is received, a PHY-RXEND.indicate primitive is sent to the MAC telling it this is the last frame octet.

phy2
Fig. 2. Phy layer transmit and receive elements block diagram and legend. Courtesy: Mathworks.

pic3

How the transmit function works
The transmit function, is initialized when the MAC layer sends the Physical Layer Convergence Protocol a PHYTXSTART.request primitive. The transmit function has a number of options when doing that, which will be detailed shortly. The Physical Layer Convergence Protocol will then place the Physical Medium Dependent to transmit mode. The MAC layer will include the octet count of the frame, between 0 and 4095, and the data rate it wants to use, with this request to transmit. This sequence also instructs the Physical Medium Dependent to transmit the preamble of the frame.

Things get a bit more complex in transmit mode. This is because this process is the same for all versions of the standard, yet it has to accommodate various coding schemes and spectrum (channel widths, spectrum masks, and backward compatibility, for example). For 802.11b DSSS, the preamble and PHY header transmission rate is 1 Mbps. For 802.11 a/g, ERP-OFDM, it is 6 Mbps. There are also some options to use short or long preambles, again depending upon the modulation and revisions (it is done this way to set up the channel for transmission).

Once the preamble and header are sent, and the channel is clear, the data rate of the transmission is set to what was specified in the header and the PSDU is sent. Finally, the Physical Layer Convergence Protocol sends the PHYTXSTEND.confirm primitive down to the MAC layer, turns off the transmitter, and changes the Physical Medium Dependent back to receive mode.

As the standards evolve, these basic rates vary and the latest, such as “ac,” have options for data rates, preambles and headers. It is always the lowest common denominator (i.e., oldest standard) in the loop that sets the rates.

Missive
This article has taken a rather in-depth look at the physical layer of the 802.11 standard. As the standard has evolved, many of the parameters have been expanded. For example, there are several PHYs in the series, such as DSSS, DSSS-OFDM, FHSS, HR-DSSS, ERPOFDM, and ERP-PBCC. The definitions of the acronyms are not important here, just shown as examples.

Physical Layer Convergence Protocols and Physical Medium Dependents are specific to each PHY layer, and they define both the framing and modulation schemes of the particular 802.11x standard. When designing-in WLAN technology, a thorough understanding of all of the elements of the platform will insure that the end product will function as desired, especially across mixed network. This will be especially true as the Internet of Everything (IoE) evolves and a vast majority of the objects within it will rely on WLANs for interconnect.

Additional acronyms not defined in the article.
BPSK – Binary Phase Shift Keying
CCK – Complementary Code Keying
DBPSK –Differential Binary Phase Shift Keying
DQPSK – Differential Quadrature Phase Shift Keying
DSSS – Direct-Sequence Spread Spectrum
ERP – Extended Rate Physicals
MIMO-ODFM – Multiple-in, Multiple-out OFDM
OFDM – Orthogonal Frequency-Division Multiplexing
WEP – Wired Equivalent Privacy
WPA – Wi-Fi Protected Access
QAM – Quadrature amplitude modulation
QPSK – Quadrature Phase Shift Keying



Leave a Reply


(Note: This name will be displayed publicly)