22.302 Experiment 3 PC-Based Digital Data Acquisition Introduction

advertisement
22.302 Experiment 3
PC-Based Digital Data Acquisition
Introduction
The use of the analog oscilloscope and digital multimeter to quantify electrical energy is limited
due to the fact that these instruments are unable to store a signal that is a function of time. Data
acquisition can be accomplished using a personal computer based system. Because signals
generated from transducers are commonly analog and the personal computer is digitally based,
analog-to-digital (A/D) conversion of the transducers output is required. The purpose of this
experiment is to introduce time domain digital data acquisition techniques and to study the
effects of aliasing, clipping, and quantization errors associated with digital data acquisition
systems.
Pre-Lab Assignment
1.
Determine the formula which would be required to convert bits to volts for a 12-bit
analog-to-digital converter with an input range of -5 to 5 volts.
2.
Given a sampling time window of 100 ms, calculate the number of samples acquired for
the following sampling rates: 62.5, 250, and 2000 samples/second.
3.
If an accelerometer is used to measure the vibration of a point on a structure vibrating
with a period of 0.2 ms., what sampling rate is required to properly determine the
frequency.
4.
Explain the differences among aliasing, clipping, and quantization errors associated with
digital data acquisition.
5.
Read Chapter 4 of Wheeler and Ganji. Answer problem 4.13 in the text.
Digital Data Acquisition System
The digital data acquisition system that will be used for experimentation in 22.302 and 22.403
consists of a PC, a Metrabyte DAS -16 A/D board, a screw terminal/BNC junction box, and
LABVIEW software. The characteristics of the DAS-16 A/D board are as follows:
- Number of channels:
16 (single ended) or 8 (differential)
- Sampling rate:
50,000 samples/second
- Resolution:
12 bit
- Digital/Analog:
2 channels, 12 bit output
- Input ranges:
0-1V, 0-2V, 0-5V, 0-10V,
+/- 0.5V, +/- 1V, +/- 2.5V, +/- 5V, +/- 10V
(NOTE: a 16 bit board may also be available in lieu of the 12 bit board)
ME 22.302 PC Data Acquisition Lab
1
Rev 010505
Assignment 1: Software Configuration & Sinewave Acquisition
1.
Turn on the PC and wait for the system to complete the self test and virus scan. Place a
formatted disk in the 3 1/2" disk drive. Perform a virus scan on this disk using the
instructions at the PC. If a virus is detected, notify the teaching assistant.
2.
With the mouse, click on the Digital Data Acquisition icon to load LabVIEW with the
VI (virtual instrument) for this experiment.
3.
It would be very useful for you to read a few pages from the help manual to get an
overview of Labview and to find out how to operate a VI. Click on the Help icon and
then on Online Reference in the dialog box. Then click on Getting Started with
LabVIEW. Finally open and read the sections entitled Introduction to LabVIEW and
Operating VIs.
4.
In the LabVIEW VI you can set the sampling rate, number of samples to be stored, the
channel number(s) on the connection box to be sampled, and a file name under which the
data is to be written. Set the sampling rate to 4000 samples per second, the number of
samples to 100, the channel setting to correspond to the channel connected by wire to the
function generator, and the file name to whatever you choose on disk A. The file named
does not have to exist before you run the VI. LabVIEW will create the file for you.
Make sure you record all this information in your lab notebook.
5.
Ensure that the function generator is connected to the data acquisition connector box, the
multimeter, and the oscilloscope. Set the function generator to produce a 1 Vrms 100 Hz
sinewave.
6.
Acquire the sinewave by clicking on the black arrow icon in the upper left hand corner of
the PC screen.
7.
View the data in the x-y plot with the VI window. Check to make sure your acquired
data corresponds to that displayed on the oscilloscope and on the multimeter. The
sinewave may not be symmetric about the zero volt axis. The source of asymmetry is
due to the DC bias from the function generator. This is a real part of the data and occurs
because the PC data acquisition system (DAS) is DC coupled.
8.
Examine the data in the file you just created. You may import the data in Excel.
Generate a column corresponding to time in a manner similar to that used in the first
experiment when you generated a sinewave. Plot the data in Excel and compare the plot
to that in the LabVIEW window to make sure your data is stored correctly.
ME 22.302 PC Data Acquisition Lab
2
Rev 010505
PC DAS
Junction Box
Figure 1. Equipment Configuration for Assignment 1
Assignment 2: Aliasing Errors
1.
Set the function generator to output a 1 Vrms 1000 Hz sinewave.
2.
Acquire the signal under a new file name.
3.
Confirm the data acquisition of the PC using the multimeter and
oscilloscope.
4.
Alter the function generator to output a 1 Vrms 4000 Hz sinewave. Save the data in yet
another file.
5.
View the 100 Hz, 1000 Hz, and 4000 Hz traces simultaneously in a spreadsheet. If
possible determine period of all traces on the PC. Note that you can also use the yellow
cursor indicators in the LabVIEW window to measure periods and signal voltages. The
positions of the yellow lines are indicated in the boxes below the x-y plot window.
6.
Save the worksheet to your disk.
Assignment 3: Clipping Errors
1.
Adjust the output voltage from the function generator to 4 Vrms 100 Hz.
2.
Acquire the signal.
3.
View the data in a spreadsheet.
4.
Save the worksheet to your disk.
ME 22.302 PC Data Acquisition Lab
3
Rev 010505
Assignment 4: Quantization Error
1.
Press the -20 dB attenuation button on the function generator.
2.
Adjust the output from the function generator to produce the lowest level signal possible
at 100 Hz.
3.
Acquire this signal.
4.
View the trace in the x-y plot window. Make sure that you can see the resulting step
effect in the trace.
5.
Save the data. Remember to record all the information on sampling rate, signal
frequency, and signal magnitude for each data file.
Post-Lab Analysis
1.
Determine the value of the DC bias from the sinewave of assignment 1.
2.
Numerically remove the DC bias from the sinewave of assignment 1.
3.
Plot the three sinewaves acquired from assignments 1 and 2 on the same plot.
Use symbols, legends, and titles as necessary.
4.
Estimate and discuss the cause of the errors associated with the sampling rate and the
input frequency of the signals from assignments 1 and 2.
5.
Plot the trace acquired in assignment 3.
6.
Estimate and discuss the error associated with signal magnitude limit of the A/D board
and the acquired signal from assignment 3.
7.
Plot the trace of voltage as a function of time from assignment 4.
8.
Estimate and discuss the cause of the error associated the acquisition of data in
assignment 4.
ME 22.302 PC Data Acquisition Lab
4
Rev 010505
Download