Skip to content Skip to navigation Skip to collection information

OpenStax_CNX

You are here: Home » Content » Communication Systems Projects with LabVIEW » Hamming Block Code Channel Decoder

Navigation

Table of Contents

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

In these lenses

Recently Viewed

This feature requires Javascript to be enabled.

Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.
 

Hamming Block Code Channel Decoder

Module by: Ed Doering. E-mail the authorEdited By: Brett Hern, Erik Luther, Sam Shearman

Summary: Channel encoding inserts additional information into a transmitted bit stream to facilitate error detection and error correction at the receiver. Block coding breaks up a bit stream into words of length k bits and appends check bits to form a codeword of length n bits. A corresponding channel decoder examines the complete codeword, and detects and even corrects certain types of erroneous bits caused by the channel. In the prerequisite project "Hamming Block Code Channel Encoder" you developed a channel encoder using a special class of block code called a Hamming code. In this project, develop the companion channel decoder, and then evaluate the performance of the complete encoder/decoder system.

Table 1
LabVIEWtop.png This module refers to LabVIEW, a software development environment that features a graphical programming language. Please see the LabVIEW QuickStart Guide module for tutorials and documentation that will help you:
• Apply LabVIEW to Audio Signal Processing
• Get started with LabVIEW
• Obtain a fully-functional evaluation edition of LabVIEW

Note:

Visit LabVIEW Setup to learn how to adjust your own LabVIEW environment to match the settings used by the LabVIEW screencast video(s) in this module. Click the "Fullscreen" button at the lower right corner of the video player if the video does not fit properly within your browser window.

Summary

Channel encoding inserts additional information into a transmitted bit stream to facilitate error detection and error correction at the receiver. Block coding breaks up a bit stream into words of length k bits and appends check bits to form a codeword of length n bits. A corresponding channel decoder examines the complete codeword, and detects and even corrects certain types of erroneous bits caused by the channel.

In the prerequisite project Hamming Block Code Channel Encoder you developed a channel encoder using a special class of block code called a Hamming code. In this project, develop the companion channel decoder, and then evaluate the performance of the complete encoder/decoder system.

Objectives

  1. Develop an (n,k) Hamming block code channel decoder capable of error detection and correction
  2. Examine the behavior of the encoded bitstream before and after passing through the decoder
  3. Evaluate the performance of the complete encoder/decoder system

Deliverables

  1. Summary write-up of your results
  2. Hardcopy of all LabVIEW code that you develop (block diagrams and front panels)
  3. Any plots or diagrams requested

Note:

You can easily export LabVIEW front-panel waveform plots directly to your report. Right-click on the waveform indicator and choose "Export Simplified Image."

Setup

  1. LabVIEW 8.5 or later version

Textbook Linkages

Refer to the following textbooks for additional background on the project activities of this module; see the "References" section below for publication details:

  • Carlson, Crilly, and Rutledge -- Ch 13 (basis for notation used in this module)
  • Haykin -- Ch 10
  • Lathi -- Ch 16
  • Proakis and Salehi (FCS) -- Ch 13
  • Proakis and Salehi (CSE) -- Ch 9
  • Stern and Mahmoud -- Ch 10

Prerequisite Modules

If you have not done so already, please complete the prerequisite module Hamming Block Code Channel Encoder. If you are relatively new to LabVIEW, consider taking the course LabVIEW Techniques for Audio Signal Processing which provides the foundation you need to complete this project activity, including: block diagram editing techniques, essential programming structures, subVIs, arrays, and audio.

Introduction

Error control coding describes a class of techniques that prepare a digital message bitstream to pass through a noisy channel so that the receiver can detect and in some cases correct transmission errors. The prerequisite project Hamming Block Code Channel Encoder describes how to create a specific type of channel encoder based on the (n,k) Hamming code. The codeword length "n" and message length "k" are specific values calculated from the user-defined number of checkbits "q". As discussed in the prerequisite module, the code rate of the Hamming code approaches 1 (100% efficiency) as "q" increases, but the minimum Hamming distance "dmin" is fixed at 3. Therefore, the Hamming code can detect up to two bit errors in a received codeword, and can correct up to one bit error.

The channel decoder, a subsystem of the receiver, serves as a complement to the channel encoder in the transmitter. The channel decoder examines each received codeword, indicates detectable errors, fixes correctable errors, and extracts the message. Not all types of errors are detectable nor correctable, therefore the channel decoder can certainly emit garbled messages. Fortunately the channel noise must be rather severe before this becomes a problem.

The channel decoder developed in this project is called a table lookup syndrome decoder. View the Figure 1 screencast video to learn how to calculate the syndrome of a codeword, how to develop a lookup table of most-likely error patterns indexed by syndrome value, and how to use these results as the basic components of a channel decoder capable of detecting and correcting some types of error patterns.

Figure 1: [video] Table lookup syndrome channel decoder for Hamming block code
Figure 1 (lbc_hamming-decoder-syndrome.htm)

Procedure

Manual calculations

Work through the syndrome calculation process by hand to lay a good foundation for developing a correct and understandable computer implementation. Write up this work on a separate page.

The end of the Figure 1 screencast video presents an example of a specific Hamming code generator matrix "G", a specific message vector "M" and associated codeword vector "X", and three received versions of the same transmitted codeword with varying severity of bit errors.

  1. Determine the parity check matrix "HT" (the transpose of the matrix "H") that corresponds to the generator matrix "G".
  2. Write the three received codeword vectors.
  3. Calculate the syndrome for each of the three received codewords. Remember to use modulo-2 arithmetic for the matrix calculations.
  4. Discuss your results in terms of the potential to detect and correct errors for each of the three received codewords based on their calculated syndromes.

SubVI construction

Build the subVIs listed below. You may already have some of these available from previous projects.

Demonstrate that each of these subVIs works properly before continuing to the next part.

Hamming block code channel decoder

Use your top-level application VI from the prerequisite channel encoder project as a starting point for this project.

Review again the background theory presented earlier for the Hamming block code channel decoder, then extend the top-level application VI to decode the output of the channel. Follow the block diagram described near the end of the Figure 1 screencast video.

Display Boolean array front-panel indicators for the following values:

  • message -- original message words
  • encoded message -- message words with appended checkbits (transmitted codewords)
  • received message -- received codewords after passing through noisy channel
  • pre-decoding errors -- bit error locations in received codewords
  • corrected message -- received codewords with error correction applied
  • post-decoding errors -- bit error locations in corrected codewords
  • error detected (1-D array) -- error detected (non-zero syndrome)

Combined channel encoder/decoder performance

  1. Generate 50 words, and begin with 3 checkbits. Run the VI repeatedly and observe the channel decoder output indicators. What bit error rate tends to limit the received codeword errors to single-bit errors?
  2. Increase to 4 checkbits, then to 5 checkbits, and so on while holding the bit error rate fixed. Recalling the positive effect of increasing the number of checkbits (increased code rate), what appears to be the negative effect of an increased number of checkbits? Explain.
  3. Return to 3 checkbits. Run the VI until you observe a two-bit error in a received codeword. Does the "error detected" indicator work properly? How about the corrected codeword? Explain these results.
  4. Set the number of checkbits to 2 and run the VI several times. What is another name (hopefully familiar to you) for this code?

Text messaging

Replace the random number generator in the transmit section with the text data source util_BitstreamFromText.vi. Use the companion subVI util_BitstreamToText.vi to display the receiver output. Experiment with short messages and long messages, making sure that the intermediate Boolean displays make sense.

Experiment with intelligibility in the received message as a function of bit error rate (BER). Determine specific BER values you associate with the following qualitative labels: excellent, good, barely acceptable, and unintelligible.

References

  1. Carlson, A. Bruce, Paul B. Crilly, and Janet C. Rutledge, "Communication Systems," 4th ed., McGraw-Hill, 2002. ISBN-13: 978-0-07-011127-1
  2. Haykin, Simon. "Communication Systems," 4th ed., Wiley, 2001. ISBN-10: 0-471-17869-1
  3. Lathi, Bhagwandas P., "Modern Digital and Analog Communication Systems," 3rd ed., Oxford University Press, 1998. ISBN-10: 0-19-511009-9
  4. Proakis, John G., and Masoud Salehi, "Fundamentals of Communication Systems," Pearson Prentice Hall, 2005. ISBN-10: 0-13-147135-X
  5. Proakis, John G., and Masoud Salehi, "Communication Systems Engineering," 2nd ed., Pearson Prentice Hall, 2002. ISBN-10: 0-13-061793-8
  6. Stern, Harold P.E., and Samy A. Mahmoud, "Communication Systems," Pearson Prentice Hall, 2004. ISBN-10: 0-13-040268-0

Collection Navigation

Content actions

Download:

Collection as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add:

Collection to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks

Module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks