Skip to content Skip to navigation

Connexions

You are here: Home » Content » Hamming Block Code Channel Encoder

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

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

      What is in a lens?

      Lens makers point to Connexions 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 Connexions 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
  • E-mail the author
  • Rate this module (How does the rating system work?)

    Rating system

    Ratings

    Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

    How to rate a module

    Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

    (0 ratings)

Lenses

What is a lens?

Definition of a lens

Lenses

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

What is in a lens?

Lens makers point to Connexions 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 Connexions 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 Encoder

Module by: Ed Doering

Summary: Channel encoding inserts additional information into a transmitted bitstream to facilitate error detection and error correction at the receiver. Block coding breaks up a bitstream 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 this project, develop a channel encoder using a special class of block code called a Hamming code. In a follow-on project, develop a 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 bitstream to facilitate error detection and error correction at the receiver. Block coding breaks up a bitstream 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 this project, develop a channel encoder using a special class of block code called a Hamming code. In a follow-on project, develop a companion channel decoder, and then evaluate the performance of the complete encoder/decoder system.

Objectives

  1. Develop an (n,k) Hamming block code channel encoder
  2. Examine the behavior of the encoded bitstream before and after passing through a binary symmetric channel (BSC)
  3. Learn how to use LabVIEW matrix-oriented subVIs

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 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 transmission errors and in some cases correct these errors.

The Figure 1 screencast video introduces error control coding, including visualization of codewords, Hamming distance, minimum distance of a code, and error detection and correction power of a code.

Figure 1: [video] Error control coding basic concepts
Figure 1 (lbc_hamming-encoder-coding-basics.htm)

(n,k) block codes break up a message bitstream into blocks of k bits and insert additional blocks of checkbits. The checkbit information permits a receiver to diagnose the received bitstream for errors, and to correct some types of errors automatically.

The Figure 2 screencast video introduces (n,k) block codes, code rate, the special case of linear block codes, and illustrates the trade-off between code rate and error control power.

Figure 2: [video] (n,k) block coding basic concepts
Figure 2 (lbc_hamming-encoder-blockcodes.htm)

(n,k) Hamming block codes represent a popular type of block code. The Figure 3 screencast video introduces the (n,k) Hamming block code, explains how to construct the generator matrix to transform message blocks into codewords rate, and presents a detailed example to illustrate the encoding process.

Figure 3: [video] (n,k) Hamming code construction rules and example
Figure 3 (lbc_hamming-encoder-hammingcode.htm)

Procedure

Manual calculations

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

  1. Construct two distinct (7,4) Hamming code "G" matrices.
  2. For each "G" matrix, calculate the codewords that emerge from the following message words: 0000, 1010, and 1111.

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 encoder

Review again the background theory presented earlier for the Hamming block code channel encoder, and then assemble your subVIs into a top-level application VI that creates a message bitstream, encodes the bitstream using Hamming coding, passes the bitstream through a noisy channel (the binary symmetric channel), and displays selected results of the channel encoding process.

LabVIEW.png Download the LabVIEW VI Front_Panel_Indicators.vi. This VI contains pre-formatted front panel indicators suitable for convenient display of binary values.

Debug your application until it works properly. Include a front-panel screenshot with hand-written annotations that demonstrates correct operation of your encoder.

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

Comments, questions, feedback, criticisms?

Send feedback