Speedy 33 Manual
Speedy 33 Manual
Speedy 33 Manual
Page 1/22
Introduction
This lab introduces you to digital filter implementation on the NI-SPEEDY-33 target DSP board. The design will be carried out using the Labview Filter Design Toolkit and the implementation using Labview DSP module and the NI-SPEEDY-33 target DSP board.
Background Reading
Read the online tutorials on the NI website: http://zone.ni.com/devzone/cda/tut/p/id/3594#toc0 NI-SPEEDY-33 board Manual: http://www.ni.com/pdf/manuals/371577b.pdf Online video tutorials: http://www.fcet.staffs.ac.uk/mma2/dsp/dsp.htm DSP tutorial: http://www.bores.com/
Additional Reading
Consider spending some time at www.ni.com there are a number of free online tutorials.
Page 2/22
Launch LabVIEW 8.20. You will see the following launch screen:
On the lower left corner of the launch screen notice that under the targets section, DSP Project is highlighted. Click on the GO button to launch the DSP Project Wizard This will bring you to the first screen of the DSP Project Wizard as shown in figure 2. This lets you choose whether you want to include a new project with a new VI or an existing VI. If the option to use an existing VI is chosen, then
Page 3/22
the VI path needs to be specified in the dialog below the Project Type dialog. For this tutorial, we are going to choose a Blank VI.
Click on Next. In the next step you can choose the DSP target of your choice as shown in figure 3. The DSP project wizard only allows you to choose one DSP target. More targets may be added after the project is created.
Page 4/22
Note that you can also choose what I/O of the board you want to include your project. This is a software-only feature which means that even if you do not add an I/O to your project, it still exists in hardware but you will not be able to access the I/O in LabVIEW
Clicking on Finish will help create a LabVIEW Project that includes the chosen target and I/O as shown in figure 4.
You can now build your VI as you normally would in LabVIEW. Note that the VI that is created here (Untitled 1) resides under SPEEDY-33. This is because this particular VI will run on the SPEEDY-33 DSP board. To find out more information on how to add new targets and add existing/new VIs, refer to the other sections of this tutorial
Launch LabVIEW 8.20. You will see the splash screen in figure 5. Select the Empty Project from New
Page 5/22
LabVIEW will create a blank project that includes your host computer as the only target as shown in figure 6
Now you can add the necessary DSP target and I/O to this project. To add a new target to a LabVIEW project, right-click on Project:Untitled Project 2 or whatever the name of the project is for your application. From the menu, select New >> Targets and Devices
Page 6/22
If you have the DSP board connected to your computer, select the first option Existing target or device and LabVIEW will automatically detect the target for you. You can also add your target manually by selecting the third option New target or device Selecting this option will show you all the four supported targets in LabVIEW DSP Module (Note: You may see other targets if you have LabVIEW FPGA and LabVIEW Real-time modules installed)
Select SPEEDY-33 from this list and click OK LabVIEW creates a new item under the project hierarchy called the SPEEDY-33 as shown in figure 8. You can also rename the target to make it recognizable especially if you have multiple targets connected.
Page 7/22
Note that as it stands the SPEEDY-33 item does not include an I/O points in the project. To add an I/O point (analog input, analog output, digital input or digital output), right-click on the SPEEDY-33 in the project and select New >> Elemental I/O. You will see a screen similar to figure 9.
You can choose to add all the I/O points or only those that you wish to use in your current project. This does not change the hardware properties. This only affects what I/O you can access. If you are not sure what you want to use, we recommend that you add all the I/O points. After adding the I/O points, you should see something similar to figure 10
Page 8/22
You have successfully created a project in LabVIEW that targets the DSP module.
Page 9/22
This section assumes that you either have a project with a DSP target and I/O points already created similar to figure 12. If you need information on how to create one, please refer to the previous section. You may also have VIs already included.
Figure 12. A Project with a DSP target and I/O points in LabVIEW
Right-click on the SPEEDY-33 item in the project and select New >> VI
Page 10/22
Right-click on the SPEEDY-33 item in the project and select Add File and select the appropriate VI you would like to add. After adding the file, your project will look similar to figure 14.
Now, you may work with the VIs as you would normally would in LabVIEW. To open the VI, just double-click on it in the project.
LabVIEW Projects give you the option to have multiple build specifications for your DSP board, thereby helping you save time and make it easy to recompile and flash your VIs onto the DSP board To create a build specification right click on Build Specification under the SPEEDY-33 DSP item in the project (similar to the one shown in figure 15)
Page 11/22
Select New >> Flash Memory Build In the screen that follows as shown in figure 16, give your build a name that is descriptive of the application. For example in this case, we are going to perform convolution, hence we have named Convolution.
Next, in the Source File item, select the VIs that you would like to flash to the DSP memory
Page 12/22
Click on OK Now, to compile and flash the DSP with the selected VI, right-click on the build name and select Deploy
Page 13/22
1. Place a waveform graph, located on the ControlsGraphs palette and change the label from default Waveform Graph to Input Signal - Time Domain (by double clicking on the label). We will simulate a sine wave 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.
2. 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.
3. Place another waveform graph to display the frequency domain of the input signal and label it Input Signal - Frequency Domain.
4. 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 we will sample 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.
Page 14/22
5. Figure 2. Input Signal - Frequency Domain Graph Properties a. Place two Horizontal Pointer Slides from ControlsNumeric 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. 6. Build the following block diagram.
Figure 3. Block Diagram of Example 1 a. Place the Simulate Signal Express VI located on the Functions Embedded Signal Generation palette. Double click on the Express VI
Digital Signal Processing(CE00063-3) Lab 3
Page 15/22
and configure it to have a Signal Type of Sine. Check the Add noise box and choose Uniform White Noise for the Noise 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.
Figure 4. Configuration Window for Simulate Signal Express VI b. Place the Spectral Measurements Express VI from FunctionsSignal 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. c. Wire the FFT (Peak) output of the Express VI to Input Signal Frequency Domain graph terminal. d. Place a While Loop located under FunctionsStructures palette, on the block diagram. e. Save the VI as Example 1.vi. 7. Adjust the Frequency and Amplitude values and run the VI. LabVIEW DSP Module Status Monitor dialog box will open. After being compiled and downloaded to target, the VI starts running on the target hardware. As the VI runs, change these values and observe the graphs in time and frequency domains.
Page 16/22
8. Target the LabVIEW DSP Module to execute on Windows by choosing OperateSwitch Execution TargetLabVIEW for Windows from the menu. 9. Run the VI again. 10. Save and close Example1.vi.
Page 17/22
Front Panel
Page 18/22
Block Diagram
Page 19/22
Front Panel
False Case
VI Block Diagram
Page 20/22
Band-stop filter
This VI demonstrates how to implement an FIR band-stop (notch) filter. The filter has a stop-band between 950 and 1050 Hz. Create and run the following VI. 1. Observe how the VI filters out the sine wave when you enter a Frequency around 1000 Hz. 2. How many delay lines are in this filter 3. Modify the VI to display the filter transfer function.
Front Panel
Block Diagram
Digital Signal Processing(CE00063-3) Lab 3
Page 21/22
Filter Proparties
Digital Signal Processing(CE00063-3) Lab 3
Spectral Measurements
Page 22/22