Saturday, September 25, 2010

Digital Communication System Simulation and Visualization


Simulation and visualization enhance understanding of communication system behavior and performance. In this project, develop a simple model for a transmitter, channel, and receiver, and study the performance of the system in terms of bit error rate (BER). Channel errors are visualized as images and "auralized" as sound to further develop insight into the relationships between bit error rate and message length.


  1. Learn how to simulate a "black box" model of a binary communication system and to evaluate its performance
  2. Develop an understanding of the relationships between bit error rate (BER) and message length
  3. Develop a qualitative appreciation for BER and its impact on the received signal
  4. Learn several ways to observe bitstreams


  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


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


  1. LabVIEW 8.5 or later version
  2. Computer soundcard
  3. Speaker

Textbook Linkages

Refer to the following textbooks for additional background on the binary symmetric channel (also known as the discrete memoryless channel) used in this project; see the "References" section below for publication details:
  • Carlson, Crilly, and Rutledge -- Ch 16
  • Couch -- Ch 7
  • Haykin -- Ch 10
  • Lathi -- Ch 15
  • Proakis and Salehi (FCS) -- Ch 12
  • Proakis and Salehi (CSE) -- Ch 9

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.


Figure 1 illustrates a generic communication system (transmitter, channel, and receiver) and a comparator to compare the original source bitstream to the output bitstream and report bit errors.
Figure 1: Generic communication system with comparator
Figure 1 (simviz_blackbox-blockdgm.png)
This project implements Figure 1 at an elementary level:
  1. The source is a bitstream with equiprobable 0s and 1s
  2. The transmitter, channel, and receiver are lumped together as a single "black box," i.e., the internal details are hidden and only the source and received bitstreams are visible
  3. The channel introduces errors according to the specified bit error rate (BER)
  4. The comparator detects mismatches between the input and output bitstreams (bit errors) and reports measured BER, the ratio of the total number of actual bit errors to the total number of bits observed


Build the subVIs

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.

Construct base system

  1. Create the application VI pictured in Figure 2 by assembling the subVIs you built in the previous step. Use the default control and indicator styles for now. Expand the Boolean array indicators to show 20 elements (click on the outer frame of the indicator and drag either horizontally or vertically).
  2. Try small values for length (say, 10 or 20) and various levels of bit error rate. Remember that the keyboard shortcut "Ctrl+R" runs the VI.
  3. Submit a screenshot of your front panel with handwritten calculations that confirms the correct operation of the measured BER output.
Figure 2: Generic communication system implemented as ""
Figure 2 (simviz_blackbox-base-system.png)

Improve usability of front panel

The default numerical controls and indicators are useful to examine details such as the BER calculation. However, changing many of the controls and indicators to other forms greatly improves the usability of the front panel and facilitates greater interactivity.
View the Figure 3 screencast video to learn how to convert the numerical front panel controls to sliders and to visualize the bitstreams as waveforms. In addition, learn how to set the BER slider control to use logarithmic mapping to more conveniently select values over a wide range. Modify your application VI front panel accordingly to produce
Figure 3: [video] Improve the usability of the front panel controls
Figure 3 (simviz_blackbox-improve-usability.htm)

Investigate the relationship between BER and bitstream length

You have noticed by now that the measured bit error rate value is rarely (if ever) the same value as the specified BER of the channel. Moreover, the measured BER can change considerably from one run to the next. Continual operation of a VI greatly improves one's ability to see patterns and relationships emerge. In this section, modify the VI to run continually and observe the relationship between specified and measured BER value as a function of the bitstream length. View the Figure 4 screencast video to learn how to add a while-loop structure to operate the system continually, and then modify your application VI accordingly to produce
Figure 4: [video] Modify base system to run continually
Figure 4 (simviz_blackbox-run-continually.htm)
Experiment with
  1. Estimate the average value (mean) of the measured BER as the specified channel BER varies over the range 0 to 1.
  2. Estimate the variance of the measured BER as the bitstream length changes over the range 10 to 10,000 (a rough guess of the spread around the mean is adequate). Feel free to increase the "millisecond multiple" constant if the loop goes too fast to see the numerical displays.
Discuss your results:
  1. How is the average value of the measured BER related to the specified channel BER?
  2. How is the variance of the measured BER related to the bitstream length?

Visualize the bitstreams as images

Visualizing the error bitstream as 2-D image develops a qualitative feel for the impact of bit error rate on the data output of a binary communication system. That is, what value of BER corresponds to a "high quality" image transmission? Or, what value of BER makes the received image "poor quality"?
View the Figure 5 screencast video to learn how to reshape the error bitstream into a two-dimensional array suitable for display as a binary (2-level) image using the LabVIEW subVIs "Flatten Pixmap" and "Draw Flattened Pixmap." In addition, learn how to programmatically control the size of the front-panel image indicator using a "property node." Modify your application VI accordingly to produce
Figure 5: [video] Visualize the error bitstream as a binary image
Figure 5 (simviz_blackbox-visualize-bitstream.htm)
Experiment with to study the relationship between BER and image size. To begin, set the bitstream length to 1,024 to produce a 32x32 image. Set the bit error rate to 0.0001. Describe the appearance of the error bitstream as an image, and state the relative "quality" of the image (remember that an ideal error image would always be uniformly black).
Now, gradually increase the bitstream length to 200,000 while watching the image. Would you still consider the image to be at the same quality level as before? What BER value do you need to obtain the same quality level you stated for the short bitstream length?
Explain why a specific BER value can be considered acceptable for some types of transmitted messages and not for others.

Listen to the error bitstream as sound

"Auralizing" the error bitstream as sound also develops your qualitative feel for bit error rate.
LabVIEW.png Download and run
This application VI continually generates "the sound of silence" (bitstream of 0s) at the source with channel bit errors inserted according to the "BER" slider. Sound is generated in blocks (frames), and total errors within a frame are reported. The average bit errors per second is also reported. Note that the circular panel indicators use logarithmic mapping.
  1. Change the bit error rate (BER) slider and listen to the bit errors.
  2. Try different values of soundcard sampling frequency. Your soundcard may or may not support arbitrary values, but should definitely support CD-quality (44,100 Hz) and lower sampling rates of 
    , where N is an integer greater than zero.
  3. If possible, use a media player to play music or speech through your soundcard while the VI is running. Determine the BER values you would associate with the following qualitative labels for the noise level's impact on the music signal: nonejust noticeabletolerableannoying, and overwhelming. Tabulate your value/label pairs.
  4. For BER=0.001, describe the character of the bit error click sound as a function of sampling frequency. Propose an explanation for the change in sound.
  5. Explain the role of data rate (samples per second) on the impact of bit errors. In other words, does BER tell the whole story?


  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. Couch, Leon W. II, "Digital and Analog Communication Systems," 7th ed., Pearson Prentice Hall, 2007. ISBN-10: 0-13-142492-0
  3. Haykin, Simon. "Communication Systems," 4th ed., Wiley, 2001. ISBN-10: 0-471-17869-1
  4. Lathi, Bhagwandas P., "Modern Digital and Analog Communication Systems," 3rd ed., Oxford University Press, 1998. ISBN-10: 0-19-511009-9
  5. Proakis, John G., and Masoud Salehi, "Fundamentals of Communication Systems," Pearson Prentice Hall, 2005. ISBN-10: 0-13-147135-X
  6. Proakis, John G., and Masoud Salehi, "Communication Systems Engineering," 2nd ed., Pearson Prentice Hall, 2002. ISBN-10: 0-13-061793-8

Content actions


No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Popular Projects

My Blog List

Give support

Give support
Encourage Me through Comments & Followers