You are on page 1of 3

Understanding the Fundamentals of Digital Communications

Publish Date: Apr 01, 2015


This tutorial explores how to use NI LabVIEW system design software and the NI USRP-2920 transceiver to build a digital wireless
video link and gain a better understanding of the basics of digital communications. In this exercise, briefly explore each step of a
wireless communications system in a modular programming approach that gives you the ability to experiment with the code. Text
messages, still images, and live webcam images are transmitted and received over the wireless link using NI USRP-2920 and
LabVIEW, providing a practical context to the underlying concepts.
By the end of this tutorial, you will be able to
Recognize the basic elements of a digital communication system
Understand the system components needed to create a packet-based wireless link
Experiment with system trade-offs with the ability to fully customize the wireless link
Table of Contents


Introduction to Digital Communications
System Components of the Wireless Link
Exploring the Wireless Link
Tx Program Architecture
Rx Program Architecture
Next Steps

1. Background

As the backbone of the digital age, digital communications allows information to be communicated over copper wire, fiber-optic
cable, and the air. The first wireless digital communications systems used spark-gap transmitters that used wide spectrum
impulses to send single bits. In comparison, todays modern communication systems make efficient use of spectrum to transmit
large amounts of data between multiple users. They connect cell phones to the cellular network, computers to the Internet, and
provide you with simple conveniences like unlocking your car doors without a key. As the number of transmitters rise, engineers
will be challenged to make the most of scarce spectrum and deal with interference while meeting the increasing demand for higher
data rates and reducing power consumption. Its increasingly important for all engineers and scientists to have a fundamental
understanding of RF communications principles as they incorporate wireless technology into everything from power plants to
medical devices.
2. Introduction to Digital Communications

A typical laptop computer has many ways it could connect to the Internet: Wi-Fi, cabled Ethernet, Bluetooth tether to a cell phone,
or a dial-up modem. It is miraculous that from my perspective as the user, once the connection is established, my web browser
doesnt know or care which method is being used (although the speed may vary a little.) This ability for the HTTP interface to be
decoupled from the physical connection type is due to the Open System Interconnection (OSI) model (ISO/IEC 7498-1) [1], which
breaks down digital communications into seven interoperable layers of abstraction. For example, the first layer is the physical
layer, which defines the medium and how to communicate over that medium. The physical layer might be an 802.11b Wi-Fi card
using binary phase shift keying (BPSK) over the air or an 802.3an 10 Gigabit Ethernet controller using phase amplitude
modulation (PAM) over wire. This case focuses on a wireless physical layer using an NI USRP (Universal Software Radio
Peripheral) software defined radio platform, which gives you the ability to configure and redefine the modulation schemes in the
software. Additionally, you can implement some basic parts of other layers in the software to successfully transmit and receive real

OSI Model
7. Application Layer
6. Presentation Layer
5. Session Layer


4. Transport Layer
3. Network Layer
2. Data Link Layer
- LLC sublayer
- MAC sublayer
1. Physical Layer
Table 1. OSI Model

Figure 1. NI USRP
3. System Components of the Wireless Link

This example implements a simple, yet complete communications system for sending text messages, small images, and webcam
video. Specifically the link consists of a physical layer, dynamic link layer MAC sublayer, transport layer, presentation layer, and
application layer.
Physical Layer: The NI USRP-2920 is used for wireless communication over an antenna using an 8 PSK modulation scheme
MAC Sublayer (Data Link Layer): Packet size and structure can be customized interactively at run time
Transport Layer: Synchronization bits provide a known pattern used for recovering timing information, validating packets, and
reporting errors
Session Layer: Determines if the data sent is an image, video, or text message
Presentation Layer: JPEG compression is used for reducing the amount of data in images and still video frames
Application Layer: LabVIEW provides connectivity to the webcam and computer display for acquiring images and video as well
as rebuilding and displaying the received data
In the case of the webcam, data is acquired from the camera, compressed using JPEG compression, and divided down into
packets. Guard bits protect against filter effects and synchronization bits provide a known reference for synchronization and data
validation. Once the packets are built, 8 PSK modulation is used, a pulse shaping filter is applied, and then the waveforms are
passed to the NI USRP for conversion to an RF signal. These steps repeat in reverse order on the downlink with the goal of
perfectly reconstructing the source data at the receiver. In most cases, the transmission of data is the easy part of the process
and reconstruction is challenging due to the need for multiple layers of synchronization and distortion introduced by noise,
interference, and multiple nondirect paths arriving at the receiver at different times (multipath).
On the receive side, the RF signal is being streamed back to the host PC continuously. Energy detection is used to determine
when an incoming packet is present. Once detected, the first demodulation step is to remove the guard bits and use the known
synchronization pattern to determine frequency offset and compensate for frequency offsets between the clock in the transmitter
versus receiver. Synchronization bits can also be used for equalization and timing information. The packet number and data bits
can then be recovered. The packet number is used to reassemble the data in the correct order and allows the receiver to
determine when all packets have been received and a full image frame has been received.


Figure 2. Generic Model of a Wireless Communications Link

4. Exploring the Wireless Link

The LabVIEW VIs developed on the transmitter and receiver use a modular asynchronous architecture to support the multirate
nature of the link. Each step is implemented on its own.
Download the example code
5. Tx Program Architecture

The interactive LabVIEW front panel on the transmit VI allows for intuitive step-by-step configuration of the system. First configure
the device and the channel. Then choose a packet structure and modulation scheme. Lastly you can choose the type of data you
wish to transmit.
On the block diagram, an effort was made to keep the code clean and documented for future customization. Four parallel,
asynchronous loops share data using Queue structures. The functions of the loops are to (1) capture or generate binary data; (2)
build packets; (3) apply modulation, and (4) write to NI USRP for transmission. Any of these steps could be kept, changed, or
replaced independently of the other loops. Students performing this project coined the term lab in a loop because a student could
easily focus an entire classroom lab assignment around building or modifying one of the asynchronous loops.
6. Rx Program Architecture

Once running, the receiver uses the same tabbed architecture to walk the user through the set-up steps. Its important that the
settings on the receiver match those chosen on the transmitter. Once configuration is complete, the final tab displays the resulting
message, image, or video. Below both a constellation plot and bits/second plot provide additional insight into the application.
The block diagram of the receiver is also well documented and designed for customization. Five parallel, asynchronous loops (1)
receive data from the NI USRP; (2) divide receive buffer into packets; (3) demodulate; (4) check for valid packet; and (5) decode
bits to retrieve message. Again, Queues allow the loops to operate independently, which maximizes the ability to customize a
single step without unexpected dependencies.
7. Conclusion

Digital wireless communications systems are all around you and present many tough concepts to understand. The first step in
understanding digital communications is to break the system into manageable pieces. The OSI model provides a standardized
method of organizing such systems. The NI USRP software defined radio platform with LabVIEW provides a flexible solution for
building and customizing wireless communications systems. We hope this brief example, video, and tutorial sparks a curiosity and
desire for you to learn more in this exciting and rapidly evolving field.
8. References

OSI Reference ModelThe ISO Model of Architecture for Open Systems Interconnection, Hubert Zimmermann, IEEE
Transactions on Communications, vol. 28, no. 4, April 1980, pp. 425 432. (PDF-Datei; 776 kB)
9. Next Steps

Learn more about the NI USRP