0% found this document useful (0 votes)
64 views6 pages

Time and FRQ Display

This document describes how to set up time and frequency domain displays in LabVIEW DSP. It explains how to view signals in the time domain using a waveform chart and how to take the Fourier transform of a signal to view its frequency content. It provides step-by-step instructions for setting up these displays using audio input signals from a microphone and function generator. It also includes exercises asking the user to analyze periodic signals in both the time and frequency domains and discuss how changing the amplitude of a sine wave affects the frequency spectrum.

Uploaded by

telecom_numl8233
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views6 pages

Time and FRQ Display

This document describes how to set up time and frequency domain displays in LabVIEW DSP. It explains how to view signals in the time domain using a waveform chart and how to take the Fourier transform of a signal to view its frequency content. It provides step-by-step instructions for setting up these displays using audio input signals from a microphone and function generator. It also includes exercises asking the user to analyze periodic signals in both the time and frequency domains and discuss how changing the amplitude of a sine wave affects the frequency spectrum.

Uploaded by

telecom_numl8233
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Connexions module: m13037

DSP Laboratory: Time and


Frequency Displays
Version 1.1: Sep 20, 2005 1:19 pm GMT-5

Erik Luther
This work is produced by The Connexions Project and licensed under the
Creative Commons Attribution License

1 Time and Frequency Displays


LabVIEW DSP gives you the ability to view the data in time domain or take its Fourier Transform and view
its frequency content. In this section of the lab, we'll learn how to set up and interpret these views. In the
later labs, you will need to set up these displays on a regular basis, so you may want to refer to this part of
the lab in the future.

1.1 Time Domain

Whenever an analog signal is passed through an A/D converter, its samples are stored as a number (usually
as an integer). If we have a 16-bit system, there are 216 = 65,536 possible values that can be stored. These
stored values can be displayed either as discrete samples or as a smooth line connecting the samples. The
instructions below outline how to set up a basic time-domain display using a Waveform Chart.
Switch over to the Front Panel and right click on the Front panel window anywhere to bring out the
Controls palette. From the Graph palette bring out the Waveform Chart and place it on the Front Panel, as
shown in step 1 of Figure 1. Right click on the Waveform Chart and select Properties from the popup menu
as shown in step 2 of Figure 6. In the Chart Properties window on the Appearance tab change the Label to
Left Channel Time Domain. Specify the settings as shown in step 4 of Figure 1. Deselecting Autoscale will
ensure that the Y-axis of the chart does not change with the data values. Minimum and Maximum values
of -32000 and 32000 will cover all the values for a 16-bit A/D channel.
http://creativecommons.org/licenses/by/2.0/

http://cnx.org/content/m13037/1.1/

Connexions module: m13037

Figure 1:

Waveform Chart Properties

The Waveform Chart maintains a buer of values that are plotted on it, the number of points that are
stored can be adjusted by Right Clicking on the Chart and selecting Chart History Length. . . from the popup
menu. By default the chart history length is 1024. Right Click on Waveform Chart from the Visible Items
sub menu and select X Scrollbar to show the toolbar for the X-axis. From the same sub menu (Visible Items)
select Graph Palette. This palette gives you the ability to zoom in on the data.
1. Wire the Left output of the Analog Input Node to the Waveform Chart as shown in Figure 1 below.

http://cnx.org/content/m13037/1.1/

Connexions module: m13037

Figure 2:

Chart Time Domain Data

2. Un-mute the microphone Input, run the program and speak into the microphone. You should be able
to see your voice, in addition to hearing it. Play around with the properties of the Waveform Chart
(Right Click and select Properties form the menu) and become familiar with the dierent options. Also
use the zoom tools on the Graph Palette and become familiar with it.
3. If you stop the program the currently displayed data will freeze on the Waveform Chart.
4. Often, you'll nd it necessary to display less (or more) of the signal in the time-domain display. This is
done by changing the Chart History Length from the popup menu of the Waveform Chart. The time
range that will be displayed will always be

Time Range = Chart History Length/Sample Frequency


Example 1

Using the default settings, the displayed time range is 1024/48000 = 0.02133 = 21.33 msec.

1.2 Frequency Domain Magnitude Display

1. To display the frequency content of the audio signal we will take a Fast Fourier Transform (FFT) of
the data and display it in a Waveform Chart. Add a second Waveform Chart Display to the Front
Panel (as described in step 1 on page 7). Change the label of this Chart to Left Channel Frequency
Domain and enable Autoscale for the Y-axis by checking the box in the Waveform Chart Properties
window on the Scales Tab. On the Scales Tab switch over to the X axis properties by selecting it in
the dropdown menu and change the X-axis range to 0-255.
2. Switch over to the Block Diagram and resize the while loop as shown in Figure 8. Place the Spectral
Measurements Express VI from the FunctionsSignal ProcessingFrequency Domain Sub-Palette.
Refer to Figure 8 for details.

http://cnx.org/content/m13037/1.1/

Connexions module: m13037

Figure 3:

FFT of the Audio Input

3. Wire the Block Diagram as in Figure 3.

Figure 4:

Note:

Frequency Domain Block Diagram

The frequency-domain Waveform Chart will display the magnitude response in the range

0 (DC) to Fs /2.

1. With the CD Audio input selected, run the program and examine the spectrum of the music signal.
Now change the input to microphone and examine the frequency spectrum of your voice as well. Stop
the program when done.
2. The frequency spectrum is always displayed from 0 Hz. (DC) to Fs/2. For voice signals, which have
most of the energy

< 2000 Hz, the voice frequencies only cover a small portion of the display (assuming

http://cnx.org/content/m13037/1.1/

Connexions module: m13037

Fs = 48000 Hz.). To get a more detailed view of your voice spectrum, change the sampling frequency
to 8000 Hz. (making sure to change both the Anaog Input and Analog Output nodes). Now, your
voice spectrum will cover a wider range of the display. Run the VI.
3. Speak into the microphone using a single held-out note (like AHHHHHHHHHH or EEEEEEEEEEE).
Examine both the time-domain and frequency domain displays. If necessary, change the Chart History
Length so that about 4-5 periods of the signal are on the time-domain display. Because a note like this
is periodic, you should notice a fairly steady time signal as well as a well-dened frequency spectrum
consisting of large peaks at your note's fundamental frequency and its harmonics. Change the frequency
(pitch) of this note and examine how it aects the frequency spectrum. Also try experimenting with
various notes.

Once you get a fairly steady display in both the time- and frequency-domains, hold

your note and stop the program to freeze the displays. You can now zoom into various parts of the
spectrum to examine it closely.

1.2.1 Answer These Questions


Exercise 1

From your time-domain plot, determine the fundamental period of your voice note (AHHHHHH,
EEEEEEEE, etc.). Remember that the time base is in milliseconds. Measure the period as accurately as possible and record the period below. From your frequency-domain plot, determine the
frequency of the 1st harmonic (fundamental frequency) and record it below as well. Do these results
concur with each other? Why or why not?
Exercise 2

Fundamental Period of signal __________ Fundamental Frequency of signal __________

We are now ready to use the third input  the function generator. Begin by going to the Surround
Mixer and changing the active playback device to Line-in. Make sure that the volume is set to 100%.
Locate the black cable (with an RCA-type connector on the end) coming out of the computer  this
cable is connected to the Line-in port of the sound card. Connect the other end of this cable to the Func
Out port of the function generator using the RCA to BNC adapter. Turn on the function generator
and set the following parameters. You need to press EXEC after setting each one.

FREQ: 400 Hz
AMPL: 0.2 V
OFST: 0 V (DC oset)
MODE: CONTINUOUS (use the
FUNC: SINE (use the

[U+F0AD][U+F0AF] keys to cycle through the options if needed)


[U+F0AD][U+F0AF] keys to cycle through the options if needed)

After all of these are set, press the OUT/ON button (bottom middle) and use the

[U+F0AD][U+F0AF]

keys to select OUTPUT ON. If you now run your VI again, you should hear a 400 Hz tone. You should
also see the sine wave in the time- and frequency-domain Charts on your Front Panel. Use the Zoom
tools to view the signals in detail.

1.2.2 Answer These Questions


Exercise 3

From the time-domain plot, measure the period of the sine wave and record it below. From the
frequency-domain plot, measure the frequency of the sine wave and record it as well.
whether these results concur with each other.
Exercise 4

Period of the sine wave __________ Frequency of the sine wave __________

http://cnx.org/content/m13037/1.1/

Discuss

Connexions module: m13037

Now change the amplitude of the sine wave to 1 V and observe the resulting frequency spectrum. Is
this expected?

1.2.3 Answer These Questions


Exercise 5

Explain in detail what is happening to your frequency spectrum when you increase the amplitude
of the sine wave to 1 V. Why is this happening?

When you're done, stop the program and save the VI.

http://cnx.org/content/m13037/1.1/

You might also like