You are on page 1of 14

Signals, Spectra and Signal Processing

Name:__________________________________
Date Performed: _________________________

Rating:__________________________
Date Submitted: __________________

Signals, Spectra and Signal Processing


FAMILIARIZATION WITH LABVIEW DSP MODULE AND NI SPEEDY-33
Activity No. 3
I. INTENDED LEARNING OUTCOMES
1. Familiarize oneself with the use of LabVIEW DSP module and NI SPEEDY-33.
2. Use NI SPEEDY-33 in acquiring real-time signals, process these signals using LabVIEW and
output the processed signal back to SPEEDY-33.
3. Apply the concepts learned in modulation techniques used in communications.
II. BACKGROUND INFORMATION
One useful capability of LabVIEW is it can be interfaced with external hardware so that the system
developed in LabVIEW can be implemented in real-time. One such hardware is the SPEEDY-33. SPEEDY33 stands for Signal Processing Educational Engineering Devices for Youth. This hardware, as well as
other DSPs from Texas Instruments, can be interfaced to LabVIEW through the DSP Module. The DSP
Module of LabVIEW contains functions which enables the user to create, process and output a signal to
any output devices.
The SPEEDY-33 is an easy-to-use board that contains Texas Instruments floating-point TMS320VC33
DSP. The DSP processor optimizes speed by implementing functions in hardware rather than software. It
connects to a standard PC via a universal serial bus (USB) host port. The following figure shows the
components of the SPEEDY-33 board.
Part
Number

2
3

Function
On the lower left end of the picture is the power port. It can supply the NISPEEDY-33
withexternal power when operating the device in standalone mode for livedemonstrations and
real-world proof-of-concept applications, without being connected tothe PC through USB. When
power is supplied to the device, the power LED lights. Theinput voltage must be 9 Volt DC
(VDC), at 500 milliamps, with the outside contact beingground and inner contact being positive
VDC.
Right above it is the connector that attaches to a USB port of the PC. LabVIEW programs and
runs the DSP through this connection.
The two small rectangular devices at the top left and top right are onboard microphones.

Activity No. 3 Familiarization with LabVIEW DSP Module and NI SPEEDY-33

Page 1

Signals, Spectra and Signal Processing


Part
Number

7&8
9
10
11 & 12

13 & 14
15
16
17
18

Function
The biggest thing on the board is the processor or DSP. Texas Instruments (TI)makes this
particular DSP. TI makes many different DSPs; the TMS320VC33 tellswhich chip this one is.
This DSP chip has 150 written on the top. That means theprocessor is running at 150 MHz. This
is rather slow compared to computers running at1 GHz to 3 GHz; however, it will be seen how
this is more than fast enough for thisprocessor to process voice, music, and even video in realtime.
Right next to the DSP is the flash memory. Once the flash is programmed, theboard can be
``unplugged from the PC, powered (9V DC), and run by itself in a standalonemode for live
demonstrations and real-world proof-of-concept applications.
One of the chips is the Audio Interface Controller. Its job is to convert the analogsignal from the
microphone into a digital form the processor can use. It also takes digitaldata from the processor
and converts it into an analog form the speaker can use. This isoften called an analog-to-digital
converter (A/D or ADC) and a digital-to-analogconverter (D/A or DAC). The 16-bit stereo audio
CODEC included on the NI SPEEDY-33 allows for up to 48 kHz dual-channel sampling on the
input signal. Softwarecomponents are included in the LabVIEW DSP Module to allow 8 kHz, 18
kHz, 24 kHz,36 kHz, and 48 kHz sample rates to be used in applications.
The audio input level jumpers (J1, J2) control the amount of gain appliedto the input audio
signals. It is used to choose between Line Input (11) and On-BoardMicrophones (3).
When power is supplied to the device, the power LED lights.
The reset button is a small push button that manually resets the DSP and isusually used in the
event of a software or hardware freeze.
The two connectors on the right end are Audio Stereo Input Port & AudioStereo Output Port.
They are used for attaching audio equipment. The upper one goes tothe microphone. The lower
one goes to the speakers.
There are eight lines of digital Input-Output (I/O) on the board: InputPorts are represented by 8
switches (lower right) and Output Ports are represented by 8LEDs (right bottom). The digital I/O
lines can be programmed with the LabVIEW DSPModule.
The Flash Boot Jumper controls whether the DSP will attempt to boot from theflash memory,
which is the default setting. It must be enabled to run the device instand-alone mode.
The simple 20-pin expansion header allows for easy interface to external hardware.The header
includes power, ground, eight digital inputs, and eight digital outputs underDSP control.
Two connectors make up the standard expansion analog I/O connectors, that can beused for
optional daughter modules.
The flash write enable jumper controls whether the DSP can write to the flashmemory or not.
This is useful in write protecting the DSP algorithm for productionpurposes.

In this activity, configuring and programming NI SPEEDY-33 to acquire signals, perform operations on
these signals and output these processed signals onto output devices will be described. To program the
DSP, the DSP Module of LabVEIW will be used.

Activity No. 3 Familiarization with LabVIEW DSP Module and NI SPEEDY-33

Page 2

Signals, Spectra and Signal Processing

Figure 1. Parts of the SPEEDY-33 board.

III. LEARNING ACTIVITIES


1. Connect the SPEEDY-33 to the USB port of the workstation. If the Found New Hardware window
appears, click Next, choose Install Automatically. If a warning window appears, click Continue Anyway.
Let the installation of the hardware finish and then click Finish.
2. Launch LabVIEW. The Getting Started window appears.Under the Targets option, choose DSP
Project then click Go. The Define project information window appears. Choose New DSP project, blank
VI under the Project type then click Next. Under the Select target type and input/output resources,
choose SPEEDY-33 and check all the inputs and outputs available (Analog and Digital inputs and outputs).
Click Finish. The Project Explorer window appears. Note: This step can also be accomplished by creating
an Empty Project under the Getting Started window. See the (NI Developer Zone) link formore details,
including how to add Vis (new or existing) into a LabVIEW project, and creating a build specification to flash
a DSP board.
3. Save the project. On the Project Explorer window, click File > Save All (this Project). The window
asking for the Project name will appear; supply the name Activity05 for this then click Ok. The VI under
this project will also ask for a filename. Use act05.vi for this, then click Ok.

Activity No. 3 Familiarization with LabVIEW DSP Module and NI SPEEDY-33

Page 3

Signals, Spectra and Signal Processing

4. Build the following FP and BD on act05.vi.

Activity No. 3 Familiarization with LabVIEW DSP Module and NI SPEEDY-33

Page 4

Signals, Spectra and Signal Processing

On the front panel, place a waveform graph, located on the Controls >Graphs palette and change
the label from default Waveform Graph to Input Signal - Time Domain (by double clicking on the
label). A sine wave will be simulated and display it in this graph. The timing characteristics of the
sine wave will be the following: samples per second: 8000, number of samples: 128.
From the Properties shortcut menu, under Scales tab disable the Autoscale options for X and Y
Axis. Change the x-axis minimum value to 0 and maximum value to 128. Change the y-axis
minimum value to be -5000 and maximum value to 5000.
Place another waveform graph to display the frequency domain of the input signal and label it
Input Signal - Frequency Domain.
From the Properties shortcut menu, under the Scales tab disable the Autoscale options for the
both axis. For x-axis change the name to Frequency (Hz), and set the minimum value to 0 and
maximum value to 4000. Since the signal will be sampled at 8000 Hz with 128 number of samples,
set the Multiplier to 62.5 (8000/128). For y-axis set the minimum value to 0 and maximum value to
5000.
Place two Horizontal Pointer Slides from Controls >Numeric palette and label them Frequency
(Hz) and Amplitude. Set the maximum scale range of Frequency (Hz) slider to 2000 and the
maximum scale range of Amplitude slider to 5000.
On the block diagram, place the Simulate Signal Express VI located on the Functions>
Embedded Signal Generation palette. Double click on the Express VI and configure it to have a
Signal Type of Sine. Check the Add noise box and choose Uniform White Noise for the Noise

Activity No. 3 Familiarization with LabVIEW DSP Module and NI SPEEDY-33

Page 5

Signals, Spectra and Signal Processing

type. Wire the Amplitude and Frequency (Hz) terminals to corresponding inputs of the Simulate
Signal Express VI. Wire the Sine with Uniform output of the VI to Input Signal Time Domain
graph terminal.
Place the Spectral Measurements Express VI from Functions > Signal ProcessingFrequency
Domain palette. Double click on the Express VI to configure it. Select the Magnitude (peak) option
under Spectral Measurement and click OK. Wire the Sine with Uniform output of Simulate
Signal VI to Signals input of Spectral Measurements.
Wire the FFT (Peak) output of the Express VI to Input Signal Frequency Domain graph
terminal.
Place a While Loop located under Functions >Structures palette, on the block diagram.

5. Save and run the VI.


Question: Explain the functionality of the VI. Observe the relationship between the time-domain
graph and the frequency-domain plot.
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
6. Modify the FP and BD as follows.
In the FP, create a copy of Input Signal Time Domain waveform graph. Review the Properties
of the new graph and note that it has the same x and y scales as Input Signal Time Domain
graph. Label the new graph Filtered Signal Time Domain.
Create a copy of Input Signal Frequency Domain waveform graph and label the new graph
Filtered Signal Frequency Domain.

Activity No. 3 Familiarization with LabVIEW DSP Module and NI SPEEDY-33

Page 6

Signals, Spectra and Signal Processing

Activity No. 3 Familiarization with LabVIEW DSP Module and NI SPEEDY-33

Page 7

Signals, Spectra and Signal Processing

In the BD, place a Filter Express VI from Functions > Signal Processing >Filters palette to apply
a Lowpass filter to the signal. Double click on the VI and configure it by entering 1000 for Cutoff
Frequency, and selecting Infinite impulse response (IIR) filter with Chebyshev topology of
order 5. Display the filtered signal by wiring the Filtered Signal output of the Express VI to Filtered
Signal Time Domain terminal.
Create another copy of the Spectral Measurements Express VI by dragging it while holding the
Ctrl key. Wire the Filtered Signal output of the Filter VI to the Signals input of Spectral
Measurements. Then connect the FFT - (Peak) output to Filtered Signal Frequency Domain
terminal to display the frequency component of the filtered signal.

7. Save and run the VI.


Question: When the frequency of the signal is less than the Cutoff Frequency of the filter, what can
be observed from the time-domain and frequency-domain graph?
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
Activity No. 3 Familiarization with LabVIEW DSP Module and NI SPEEDY-33

Page 8

Signals, Spectra and Signal Processing


Question: When the frequency of the signal is greater than the Cutoff Frequency of the filter, what
can be observed from the time-domain and frequency-domain graph?
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
Question: What then did the lowpass filter do to the input signal?
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
8. Modify FP and BD as shown below.

Activity No. 3 Familiarization with LabVIEW DSP Module and NI SPEEDY-33

Page 9

Signals, Spectra and Signal Processing

In the FP, place a Push Button from Controls >Boolean palette and label it as Filtered?.
In the BD, place a Select Function from Functions >Comparison palette and wire the
Filtered?terminal to its condition input. If the Filtered?button is ON, the filtered signal will be sent
to the sound output. Otherwise the unfiltered signal will be played. Wire the Filtered Signal output
from Filter Express VI to the true case of the Select function and wire the Sine output of the
SimulateSignal VI to the false input of the Select function.
Place the Analog Output node from Functions >Elemental I/O palette. Wire the output of the
Select function to Analog Output node.

9. Connect a speaker (a headphone will do) to the Analog Output jack of the NI SPEEDY-33 board.
Check the Input Level jumper settings on the board and make sure Mic (Microphone Level) is selected.
Jumper
JP1 (Left Channel)
JP2 (Right Channel)

Microphone Level
JP1-2 to JP1-1
JP2-2 to JP2-1

Line Level
JP1-2 to JP1-3
JP2-2 to JP2-1

Note: Ensure that line level audio signals are not connected to the audio input when the NI SPEEDY-33 is
configured for microphone level. It is possible to damage the audio input circuitry by overdriving the input.
10. Save and run the VI and listen to the filtered and unfiltered sine wave. Adjust the Frequency slide to
change the pitch and Amplitude slide to change the volume as needed.
Question: Adjusting the Amplitude and the Frequency of the input signal, describe the sound heard
when the input sound is unfiltered (i.e. when the push button is deactivated). Relate this to the
waveforms observed.
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________

Activity No. 3 Familiarization with LabVIEW DSP Module and NI SPEEDY-33

Page 10

Signals, Spectra and Signal Processing


Question: Activate the push button to enable filtering. Adjusting the Amplitude and the Frequency
of the input signal, describe the sound heard. Relate this to the waveforms observed. Compare this
with the previous observations.
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
11. Go to the block diagram and replace the SimulateSignal VI with AnalogInput node located on
Functions >Elemental I/O palette. Remove the Amplitude and Frequency sliders and the broken wires.
The input signal will now be acquired through the left microphone.
12. Save and run the VI. Gently whisper into the left onboard microphone (the one near the USB port of
SPEEDY-33).
Question: What can be observed from the waveform and from the sound heard?
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
13. Using an audio jack, music files from the computer or MP3 players can be used as an input to
SPEEDY-33. Before doing this, however, make sure that the input level is set to line level so that the audio
circuitry will not be damaged.
14. In BD, change the Filtered? push button into a DSP Switch.vi. Make sure that Switch1 is the one that
appears in the node. Save and run the VI. Note that the functionality of the push button is now replaced by
the Switch 1 of the Digital Input Port of the SPEEDY-33.
15. Modify the BD and FP as shown (note that the screenshots include the modifications made earlier like
the insertion of the Analog Input node and the Switch1 node).

Activity No. 3 Familiarization with LabVIEW DSP Module and NI SPEEDY-33

Page 11

Signals, Spectra and Signal Processing

Activity No. 3 Familiarization with LabVIEW DSP Module and NI SPEEDY-33

Page 12

Signals, Spectra and Signal Processing

In the front panel place a Vertical Pointer Slide from Controls > Numeric palette and label it
Level Scale Gain. Set the maximum scale range of the slider to 0.01.
Place a Vertical Fill Slide from Controls > Numeric palette and label it Energy. Set the maximum
scale range of the slider to 1000. Change the control to an indicator by right clicking on it and
selecting Change to Indicator.
Place an RMS.vi located at Functions > Signal Processing > Time Domain palette. Wire the
output from Analog Input to RMS X input and wire the rms value output from the RMS VI to
Energy.
Place a Multiply function form Functions > Numeric palette and connect rms value and Level
Scale Gain as inputs.
Place a Greater?function located at Functions > Boolean palette and wire the output from the
Multiply function as its first input. Create a constant 0.125 for the second input of the
Greater?function.
Place a DSP LED node from Functions > Elemental I/O palette. Click the node and choose
Digital Output > LED1 from the shortcut menu.Then wire the output from the Greater?function to
LED 1.
Repeat the last two steps, varying the constant and the LED number of the DSP LED node
accordingly.

16. Save and run the VI. Play a music from the MP3 player input of the SPEEDY-33. Adjust the volume of
the player and the Level Scale Gain so that the volume (energy) entering the SPEEDY-33 can be read by
the VI.
Question: Describe the functionality of the VI.
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
IV. CONCLUSIONS
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
Activity No. 3 Familiarization with LabVIEW DSP Module and NI SPEEDY-33

Page 13

Signals, Spectra and Signal Processing


V. MACHINE PROBLEM
Use NI SPEEDY-33 and LabVIEW DSP Module to demonstrate any one of the following:

Amplitude modulation / demodulation


Single Sideband AM modulation / demodulation
Frequency / Phase modulation / demodulation
Frequency Shift Keying (FSK) (generation and detection)
Phase-Shift Keying (PSK) (generation and detection)
Quadrature Amplitude Modulation (QAM) (generation and detection)

Use the output from MP3 player as the input signal, and have LabVIEW generate the carrier signal. Show
important parameters in AM waveform such as its spectrum, power of the carrier and the sidebands, etc.
Design an interactive and appealing front panel. Call the project for this machine problem as macpro03
and the VIs for this as macpro03.vi.
VI. REFERENCES
Kehtarnavaz, N. & Kim, N. (2005).Digital Signal Processing System-Level Design Using LabVIEW.Oxford,
United Kingdom: Elsevier, Inc.
Proakis, J. &Manolakis D. (2006). Digital Signal Processing: Principles, Algorithms and Applications 4th
Edition. New Jersey, USA: Prentice-Hall.
Karim L. &Mounsef, N. (2006).EEE 101 SPEEDY-33 Experiments. Arizona State University, USA.
NI Developer Zone (n.d.).Learn LabVIEW DSP in 3 Hours. From http://zone.ni.com/devzone/cda/tut/p/id/3594#toc7
retrieved August 21, 2011.
National Instruments (2008).NI SPEEDY-33 User Manual. From http://www.ni.com/pdf/manuals/ retrieved
August 21, 2011.

Activity No. 3 Familiarization with LabVIEW DSP Module and NI SPEEDY-33

Page 14