Saturday, September 25, 2010

labview Speaker-Air-Microphone (SAM) Channel Characterization

Summary: A speaker and microphone connected to a computer serve as an excellent communications channel because the transmitted information is audible. Listening to the channel while making parameter adjustments and viewing plots builds additional insight into the specific modulation scheme under study. This project describes how to characterize a "speaker-air-microphone" (SAM) channel for use in subsequent projects that use bandpass modulation techniques.
TABLE 1
LabVIEWtop.pngThis 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 Communications / 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

A speaker and microphone connected to a computer serve as an excellent communications channel because the transmitted information is audible. Listening to the channel while making parameter adjustments and viewing plots builds additional insight into the specific modulation scheme under study.
The passband limits and bandwidth of the SAM channel (Speaker-to-Air-to-Microphone) must be characterized to effectively choose modulation parameters such as carrier frequency, bit rate, and signal pulse shape. This project describes how to characterize a SAM channel for use in subsequent projects that use bandpass modulation techniques.

Objectives

  1. Measure the passband limits and bandwidth of a speaker-air-microphone (SAM) channel
  2. Learn how to use LabVIEW Express subVIs for audio and power spectrum measurement

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
  2. Computer soundcard
  3. Speaker
  4. Microphone

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 9
  • Couch -- Ch 6
  • Haykin -- Ch 1
  • Haykin and Moher -- Ch 8
  • Lathi -- Ch 3
  • Proakis and Salehi (FCS) -- Ch 5
  • Proakis and Salehi (CSE) -- Ch 4
  • Stern and Mahmoud -- Ch 2

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

Figure 1 illustrates the speaker-to-air-to-microphone (SAM) channel.
Figure 1: Speaker-air-microphone channel
Figure 1 (samch_characterize-SAM-channel-diagram.png)
The magnitude frequency response of the SAM channel can be easily measured by applying white noise to the speaker, recording the result, and calculating the power spectrum of the of the recorded signal. White noise contains equal contribution from all frequencies; therefore, any deviation from a flat power spectrum at the channel output must be the response of the channel.
The computer sound card forms part of the channel, as well. Sound card microphone inputs are often AC-coupled and do not pass DC. Microphone inputs are sometimes intentionally lowpass filtered to reduce high-frequency hiss, and all soundcard inputs include lowpass filters to serve as anti-aliasing filters.
Most modern sound cards are full duplex, meaning that they can simultaneously generate and record sound -- a necessary feature for this project. Older half duplex sound cards can still be used but require two computers, one to transmit the sound and another to receive the sound.

Procedure

White noise source

Create a white noise sound source to serve as the SAM channel excitation:
  1. Use the "Express | Output | Play Waveform" Express VI to generate audio for the speaker.
  2. Use the "Express | Signal Analysis | Simulate Signal" Express VI to generate uniform white noise in the range -1 to +1.
  3. Set the Express VI parameters to generate a signal with 44.1 kHz sampling frequency and duration of 10 seconds.
Refer to the video of Figure 2 for LabVIEW coding techniques for the white noise source.
Figure 2: [video] LabVIEW coding techniques for white noise source
Figure 2 (samch_characterize-white-noise-source.htm)

Recording device

Create a device to record the microphone signal:
  1. Use the "Express | Input | Acquire Sound" Express VI configured for the same sampling frequency as the white noise source (44.1 kHz) and a 0.1 second duration.
  2. Monitor the recorded signal as a time-domain plot.
  3. Use the "Express | Signal Manipulation | Extract Portion of Signal" Express VI to discard a user-specified number of samples at the beginning of the waveform to account for transient startup.
Refer to the video of Figure 3 for LabVIEW coding techniques for the recording device.
Figure 3: [video] LabVIEW coding techniques for recording device
Figure 3 (samch_characterize-recording-device.htm)

Power spectrum display

Create a graphical indicator to display the power spectrum of the recorded microphone signal:
  1. Use the "Express | Signal Analysis | Spectral Measurements" Express VI configured for power spectrum measurement.
  2. Create a "Waveform Graph" indicator to display the power spectrum. Calibrate the Y-axis in decibels and the X-axis in hertz. Use logarithmic mapping for the frequency axis.
  3. Enclose the power spectrum measurement and recording-related subVIs in a for-loop structure (N=80). This arrangement takes 80 short recordings, calculates the power spectrum for each, and averages them together to improve the estimated frequency response of the channel. The value of N is chosen to allow the recording/measurement process to complete before the white noise source stops.

NOTE: 

The white noise source and recording/measurement sections of the overall VI must be kept separate from each other to allow them to operate in parallel.
Refer to the video of Figure 4 for LabVIEW coding techniques for the power spectrum display.
Figure 4: [video] LabVIEW coding techniques for power spectrum display
Figure 4 (samch_characterize-power-spectrum.htm)

SAM channel physical setup

Set up the hardware for the SAM channel. Place the microphone within a few inches of the speaker. Adjust the soundcard setup and volume controls to generate and record sound to satisfy two goals:
  1. Signal applied to sound card lies within the range ±1 with no clipping (saturation)
  2. Signal recorded from sound card fills as much as possible the range ±1 without clipping
The video of Figure 5 for LabVIEW coding techniques for the power spectrum display.
Figure 5: [video] Adjust the audio settings in Windows XP
Figure 5 (samch_characterize-winXP-audio-setup.htm)

SAM channel measurements

Apply the white noise source to the SAM channel and record its response for 5 to 10 seconds. Also record the noise floor of the channel; use the identical speaker/microphone arrangement but do not generate any sound (set the "Noise Amplitude" parameter of the noise source to zero).
Subtract the noise floor measurement from the white noise measurement. The result should be approximately zero dB outside the passband region of the SAM channel.
Make hardcopy of your two measurements on the SAM channel as well as the measurement with the noise floor subtracted (right-click on the "Waveform Graph" indicator and choose "Export Simplified Image"). Annotate the plots with hand-written labels to identify the lower passband limit, the upper passband limit, and the overall bandwidth of the channel.
State your numerical criterion for choosing the passband limits. Half-power frequency, the frequency at which the response drops by 3 dB, is a standard method.

Optional: To Go Further

Your instructor may ask you to complete one or more of the following activities:
  1. If supported by your sound card, change the soundcard recording device to "Stereo Mix" and repeat the two measurements above. This soundcard loopback test helps you distinguish which parts of the frequency response to attribute to the soundcard itself as opposed to the speaker/microphone combination.
  2. Repeat the SAM channel measurement for other combinations of speakers and microphones
  3. Enhance the overall VI to record the white noise source on a first run of the VI and the noise floor on the next run of the VI. Subtract the noise floor from the white noise recording and display the result.
The video of Figure 6 shows how to retain a measurement from one run of the VI to the next.
Figure 6: [video] Retain a measurement from one run of a VI to the next
Figure 6 (samch_characterize-subtract-noisefloor.htm)

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. 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. Haykin, Simon, and Michael Moher, "Introduction to Analog and Digital Communication Systems," 2nd ed., Wiley, 2007. ISBN-13: 978-0-471-43222-7
  5. Lathi, Bhagwandas P., "Modern Digital and Analog Communication Systems," 3rd ed., Oxford University Press, 1998. ISBN-10: 0-19-511009-9
  6. Proakis, John G., and Masoud Salehi, "Fundamentals of Communication Systems," Pearson Prentice Hall, 2005. ISBN-10: 0-13-147135-X
  7. Proakis, John G., and Masoud Salehi, "Communication Systems Engineering," 2nd ed., Pearson Prentice Hall, 2002. ISBN-10: 0-13-061793-8
  8. Stern, Harold P.E., and Samy A. Mahmoud, "Communication Systems," Pearson Prentice Hall, 2004. ISBN-10: 0-13-040268-0

Content actions

GIVE FEEDBACK:

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

Followers