Uploaded by James Anderson

Lab 1-Dynamic Data Acquisition and Uncertainty in Measurements revised assignment

advertisement
Part B: Experiment
Dynamic Data Acquisition
Objective
Dynamically acquire voltage signals from a Data Acquisition (DAQ) device using the LabVIEW
development software and perform statistical analysis of the acquired signals.
There are four parts to this lab:
Part 1: Measurement of a fixed reference voltage using the DAQ and LabVIEW
Part 2: Estimation of strain in an object using a strain gage bonded to a feeler gage or a thin flexible metal
strip
A. Quantification and analysis of the accuracy associated with data acquisition using the DAQ
B. Use the strain gage in the Wheatstone bridge configuration to allow strain measurement.
C. Measure the diameter of an approximately circular object using strain measurement.
Part 3: Quantification and analysis of the accuracy associated with data acquisition using the DAQ to
measure Vg in Part 2.
Part 4: Quantify uncertainty associated with estimating the strain and diameter of the object in part 2.
Background needed for conducing the lab
Familiarity with LabVIEW programming is essential for all the labs. Useful LabVIEW instructional
videos can be found on National Instruments website. A brief tutorial on how to construct a VI for a lab
is also provided in the Appendix 1.
Prelab Questions:
Generate a VI that meets the requirements for part 1 of lab 1. Submit a pdf of a screen shot of the back
panel of the VI. An appendix is provided that develops the VI needed.
Equipment and resources needed (Fig.1.B.1)
List of suppliers for these items is provided at the end of this lab write up.

Laptop computer with LabVIEW installed

Multi-function DAQ with USB cable: Minimum 2 channel 14 bit ADC, usb interface, LabVIEW
support. Typical vendor: Out of The Box SADI DAQ, https://ootbrobotics.com/
Prepared by Ghatu Subhash and Shannon Ridgeway. Unauthorized copy is prohibited
1

Wire jumper kit: 7” male/male, 28 gage. Typical vendors: Digikey electronics.

Three 120 Ω resistors: Precision ¼ watt resistors, ± .01 % Typical vendors: Digikey

Breadboard: 400 tie.

Strain gage mounted on a feeler gage or a thin metallic strip: uniaxial strain gage, typical vendor:
Typical part: Bud Industries BB-32621, typical vendor: Digikey.
Micro Measurement. 0.30 mm thick feeler gage, typical vendor: Mcmaster Carr
Measurement tools in lab (rulers, micrometers, micrometers, etc.).
Micrometer
Various.
Jumper Cables
120 Ω Resistors
Vernier Calipers
Feeler gage with bonded strain gage

AA Battery
and holder
DAQ
Breadboard
Measuring Tape
Fig. 1.B.1. Tools and supplies required to conduct lab exercise.
Part 1: Measurement of a Fixed Reference Voltage using the DAQ and LabVIEW
Problem Statement: To examine the performance of the DAQ as it measures a fixed reference voltage
in digital form with different gain windows (voltage ranges). A reference voltage of 2.5 is used in the
instructions. If 2.5 V is unavailable, use any available voltage in this range, for example 3.3 V or 4 V.
Why are we doing this? To understand and learn how voltage signals can be measured (and visualized)
in the form of digital data using the DAQ and LabVIEW. Such voltage measurement (and the associated
scatter in the data) can be used to measure a physical quantity (and its variability). In Part 2 of this lab, we
will use such voltage measurements to estimate strain in an object (physical quantity) and then use
Prepared by Ghatu Subhash and Shannon Ridgeway. Unauthorized copy is prohibited
2
mechanics equations to measure diameter (physical quantity) of an object and the uncertainty in the
measured diameter.
Required LabVIEW program (VI)
1. Write a LabVIEW program that uses the “Gain.vi” as a sub-vi that:
a. Calculates the signal mean and signal standard deviation, and indicates the results on the front
panel of the acquired signal on AIN0 (in mV) as a function of time (in seconds). Recall that
the DAQ is programed to capture data at the sample rate over the acquisition time (set by the
user). The averages of this set of data are returned on the channel averages, right side of the
sub VI. The raw data is retuned in the raw data array, top right of the subVI.
b. Creates a dynamically updating X-Y graph scatter plot on the program front panel that graphs
the statistical standard deviation of the acquired signal on AIN0 (in mV) as a function of time
(in seconds).
c. Exports the data (voltage mean and standard deviation) to an Excel spreadsheet. Use this data
to include a plot in the report.
2. When the program is functioning properly, perform an experiment where the channel voltage mean
and standard deviation are monitored as the device sample window is changed over its range (via a
front panel gain control) and record the data to a spreadsheet.
Note: Take only meaningful data (include all sample windows that are meaningful, avoid saturation, if
you leave any out, justify).
Connections required (see Fig.1.B.2):
1. Connect a short jumper wire from the 3.3 V output terminal on the lower right side of the DAQ to
the AIN0+ (Analog INput channel 0 positive) terminal near the top right of the DAQ.
2. Connect a short jumper between any ground (GND) terminal and the AINO- (Analog INput channel
0 negative) terminal. See lab board for further wiring instructions.
Prepared by Ghatu Subhash and Shannon Ridgeway. Unauthorized copy is prohibited
3
Fig. 1.B.2. Illustration of wire connections to the computer from back side of DAQ
3. With these connections, the acquired (measured) voltage signal will be the difference between the
positive and negative terminals i.e. ((AIN0+) – (AIN0-)). The ground (GND) terminal represents the
reference voltage (usually zero volts). Since the negative terminal (AIN0-) is connected to device
ground and positive terminal (AIN0+) is connected to 3.3 V, the voltage signal measured is ~ 3.3 V0.0 = 3.3 V. This is called a differential voltage measurement and will be the way all voltage signals
will be measured in this laboratory. Remember, noise is associated with ALL voltage measurements,
so you will NOT get an exact reading of 3.3 V, but all digital data collected will be close to it but
scattered (random). Also remember we are using Channel 0 of the DAQ for acquisition of the data.
Experimental Task for Part 1:
1. Once the DAQ connections and LabVIEW VI are functional, follow the steps below to complete the
Part 1 of this lab.
2. Power the DAQ by connecting it to the laptop with the USB cable provided. The green light on DAQ
will flash indicating that it is powered. Wait for few seconds until the laptop detects the DAQ.
3. On the front panel of the VI, set the sampling window on Channel 0 to ± 10 V. We are measuring a
reference voltage of 3.3 V on channel 0 of the DAQ (See connections in Fig. 1.B.2).
4. Change the index of the index array block on VI to 1.
Prepared by Ghatu Subhash and Shannon Ridgeway. Unauthorized copy is prohibited
4
5. Read this step completely before you proceed. As the VI runs, monitor the channel voltage mean
and standard deviation for 10 seconds. After 10 seconds, change the sampling window via the front
panel to ± 5 volts and continue to monitor the voltage mean and standard deviation. Repeat this
procedure after every 10 seconds for four sample windows (± 10 V, ± 5 V, ± 2.5 V, ± 1.25 V or as
available). Once all sampling windows are recorded stop the VI.
6. Once the VI stops, the writetospreadsheettool.vi dialogue box will open. Save the data to a suitable
location as Lab_x_Part_1.xls.
7.
Disconnect the DAQ from laptop.
Issues to be discussed in the Lab Report for Part 1:
1. Develop and present in the report two plots from the saved data: a voltage mean vs time and a
standard deviation of the voltage mean vs time.
2. The reference voltage we were trying to measure on Channel 0 is approximately 3.3 volts with some
noise. Can you see this from the voltage mean vs time graph for all sampling windows? Comment
on your observation.
3. In the second graph, observe the variation of standard deviation as you change the sampling windows
at the intervals of 10 seconds. What happens? Why? If you observe zero standard deviation, explain
what it means.
PART 2: Estimation of Strain in an Object using a Strain Gage
Problem Statement: Use the stain gage (installed on a feeler gage) along with known resistors in the
Wheatstone bridge configuration to make strain measurement. Estimate the diameter of an object using
this strain measurement.
Why are we doing this? Whenever an object with a strain gage installed on it is subjected to strain
(applied loads), it causes a change in resistance of the gage. Such change in resistance is proportional to
the applied strain and therefore can be used to estimate the magnitude of strain (this is how transducers
work in general). Detailed discussion on ‘Theory of Strain Gages’ will be provided in Lab 2. The
Wheatstone bridge configuration provides an effective way to measure and transform such small
resistance changes into proportional voltage signal. Such voltage signals can be measured and analyzed
using the DAQ along with LabVIEW. In Part 3, we use strain gage in a Wheatstone bridge configuration
Prepared by Ghatu Subhash and Shannon Ridgeway. Unauthorized copy is prohibited
5
and the DAQ to measure the strain in a thin metallic strip. The strain measurement is then used to estimate
the diameter of an object around which the metal strip is wound.
Background: A strain gage is used to measure strain in the feeler gage when bent around a circular
object. The following equation is used to estimate strain (ϵ) based on the measurement of two voltages
(output voltage VG and supply voltage VS) and the gage factor (Gf) of the strain gage
𝝐=
𝟒(𝑽𝑮 )
𝑽𝒔 𝑮𝒇
(1)
The diameter of a large circular object can then be calculated using the equation
𝝐=
𝒕/𝟐
𝝆
(2)
Where t is the thickness of the feeler gage and  is the radius of curvature of the object.
Required LabVIEW VI
1. Use Gain.vi subVI in a while loop similar to Part 1. We will measure VG and VS using the DAQ on
Channels 0 and 1, respectively. Design the VI to do so. Include front panel indicators to display Vs
and VG.
2. TARE operation: Resistors used in this part are R1= R2= R3 =120 Ω. The initial resistance of the
strain gage is R= 120 Ω. This means when the gage is NOT strained, the Wheatstone bridge is
balanced and ideally VG =0. But in reality, the resistance of the strain gage may not be exactly 120
Ω and the connecting lead wires generally possess small but finite resistance. This causes an
imbalance of the Wheatstone bridge and gives rise to a non-zero value of VG in Step 1. This is a
typical case of bias or systematic error. To avoid this, a TARE operation is used which is to manually
subtract this non-zero value of VG from that obtained in Step 1 (ensure the feeler gage is not
undergoing any strain). Display this tared VG on front panel using indicator.
3. Using Vs and tared VG acquired in Steps 1, 2 and knowing R1= R2= R3 =120 Ω, and the gage factor
of the strain gage, program the VI to calculate the change in strain the strain gage is measuring. You
may need to use simple numerical tools available in the LabVIEW.
4. Add the functionality to calculate the standard deviation of the measured voltages (VG , Vs).
Prepared by Ghatu Subhash and Shannon Ridgeway. Unauthorized copy is prohibited
6
5. Include the ability to save tared VG, Vs, the standard deviation of VG , Vs, and strain as a function of
time. You will need shift registers, initialize and build arrays, current time tool and
writetospreadsheet tools for this (similar to Part 1’s VI).
6. Add graphs of quantities tared VG and strain vs time for better visualization.
7. (Optional) Implement an expression to estimate the radius of curvature.
Connections required: A Wheatstone bridge configuration will be implemented on a breadboard using
3 known resistors (R1, R2, and R3 each with resistance 120 Ω ± 0.1%) and a strain gage (with initial
resistance of 120 Ω) bonded on a feeler gage acting as the unknown resistance (when bent). This
arrangement is shown in Fig. 1.B.4. Place the gage in the RU location of the bridge. Power the bridge with
+5 volts from your DAQ.
To construct a Wheatstone bridge: Consider each node as a row on the breadboard (Note: each row on
the breadboard has the same potential and they are all electrically connected). Plug relevant connects at
the node (numbered nodes shown in Fig. 1.B.4.) into the row. Note that the unknown resistance is the
strain gage on the feeler gage when the metal strip is bent.
Fig. 1.B.4. Schematic of the Wheatstone bridge and equivalent breadboard connections with the resistors
and strain gage.
Install jumpers for 5 V power (Wire to +5 volts on the DAQ, ground on the DAQ) as shown in Fig. 1.B.5.
Prepared by Ghatu Subhash and Shannon Ridgeway. Unauthorized copy is prohibited
7
Place jumper in node 3’s
row, connect to +5 VDC
on DAQ
Place jumper in node 0’s
row, connect to ground
on DAQ
Fig. 1.B.5. Installation of jumper cables to connect the Wheatstone bridge to power supply and ground
terminals (refer to Fig.4 for node identification).
Install jumpers for Data Acquisition with DAQ.
Place jumper in node 3’s row,
connect to + side of Analog in
terminal on DAQ. (Vs)
Place jumper in node 2’s row,
connect to + side of Analog in
terminal on DAQ. (Vg)
Place jumper in node 1s row,
connect to - side of Analog in
terminal on DAQ (same as
terminal 2). (Vg)
Place jumper in node 0’s row,
connect to - side of Analog in
terminal on DAQ (same
terminal as node 3). (Vs)
Fig. 1.B.6. Connections for jumper cables from breadboard to Wheatstone bridge and DAQ (refer to Fig.4
for node identification).
Prepared by Ghatu Subhash and Shannon Ridgeway. Unauthorized copy is prohibited
8
Experimental Task for Part 2
The strain gage on the feeler gage (thin metallic strip) is now connected to Wheatstone bridge, DAQ and
the computer as shown in Fig.1.B.7.
Fig. 1.B.7. Wire connections from the strain gage on the metallic strip to the computer.
After the Wheatstone bridge circuit and LabVIEW VI are verified, perform the following tasks and
include the results and related discussions in your lab report. Report which sampling windows were used
for measurement of Vs and VG and justify.
1.
Verify that VI yields the correct value for VG with no strain applied (close to 120 Ω). You will
perform a tare operation to accomplish this.
2.
Manually strain the feeler gage “in compression” for ~10-15 seconds and record the range of
variation seen in voltage Vg.
3.
Measure the diameter of a circular object provided in the lab. Use a method that reduces errors.
4.
Bend the feeler gage around the circumference of the object (see Fig. 1.B.8) while the part 2 VI is
running. Measure and record the strain induced and use it to calculate the diameter of the object.
Ensure that the strain gage is not strained beyond its limits. You will need to use the relationship
from bending of beams learned in MoM or use Eq.(2) above.
Prepared by Ghatu Subhash and Shannon Ridgeway. Unauthorized copy is prohibited
9
Fig. 1.B.8. Illustration of feeler gage with strain gage bent around the circumference of a circular object.
Issues to be discussed in the Lab Report for Part 2:
1. Include a plot of the variation of VG vs Time as the feeler gage is flexed in the report. Comment
on the results. Does the voltage increase or decrease? Why?
2. Discuss about the tare operation you used in VI to get accurate values of VG in the report.
3. Report the method used and the resultant diameter found using a linear measurment.
4. Report the diameter found from the use of the strain measurement.
5. Report the uncertainty found for each diameter, and discuss.
6. Discuss in the report what will happen if diameter of the object chosen is too small (~ 5cm)?
Part 3: Quantification of Accuracy in Measurements made by the DAQ when measuring Vg
Problem Statement: Quantify and analyze the accuracy associated with DAQ voltage measurements,
establish the type of random error encountered.
Why are we doing this? When we perform measurements in the lab, there are always some uncertainties
associated with data collected. Bias (or constant errors) can be directly addressed with differential
measurements and taring operations. Random noise in the measurements cannot be easily removed.
Therefore, it is a standard practice to monitor, quantify and report these random uncertainties during
experimentation. In Part 3 we will explore this random noise associated with voltage measurements. It is
expected that this method will be utilized when any voltage is being measured in Lab using the DAQ and
reported in your lab reports. The voltage sampled is to the Vg from part 2. The feeler gage is to be laid
flat and undisturbed during part 3.
Prepared by Ghatu Subhash and Shannon Ridgeway. Unauthorized copy is prohibited
10
Required LabVIEW program: Open a blank VI
1. Add a Gain Subvi (note: no ‘while-loop’ will be used in this VI).
2. Add controls for acquisition time, Channel 0 sample window (or the appropriate Vg window), and
sample rate.
3. Add an index array to the data array and index channel 0 out.
4. Use a histogram tool and plot a histogram of the raw data.
5. Calculate the average and standard deviation of the raw data and report on the front panel.
6. Add a write to spreadsheet subVI and save the channel 0 raw data.
7. Save the part 2 VI.
Connections required: Leave the DAQ/strain gage/Wheatstone Bridge connections assembled from Part
2
Experimental Task for Part 3: follow the steps given below to finish Part 3.
1. Power the DAQ by connecting it to the laptop with the USB cable provided. The green light on DAQ
will flash indicating that it is powered. Wait for few seconds until the laptop detects the DAQ.
2. Change the index of the index array block to 1 (or the appropriate index for the wired Vg value).
3. Set the acquisition time to 3 seconds and set the sample rate at the default 500 Hz.
4. set the sampling window on Channel 0 to +- 10 V
5. Run the VI
6. Once the VI stops, the writetospreadsheettool.vi dialogue box will open. Save the data to a suitable
location as Lab_1_Part_3_1.xls.
7. Observe the histogram displayed, what is the distribution of the data?
8. Repeat steps 4, 5, 6, and 7 for smaller sample windows until saturation is detected.
9. Disconnect the DAQ from laptop.
Issues to be discussed in the Lab Report for Part 3:
1.
For each sampling window, develop the mean and standard deviation for 3 seconds of reading
from the DAQ. Present these results in a table in the report. This is a quantification of the
measurement error of the DAQ for the voltage measured with the DAQ set on the specific
channel/gain window. Bias errors are not easily detected with this approach (and will be addressed
Prepared by Ghatu Subhash and Shannon Ridgeway. Unauthorized copy is prohibited
11
with tarring operations) but the standard deviation is a good representation of the random noise in
the measurement, provided the noise is Gaussian.
2.
Plot a histogram for one or more sample windows that shows the data’s distribution.
3.
Make observations about the variation of the readings in each sample set. Is the variation random,
or are some readings repeated? Why (discuss the A-D’s resolution with respect to this)?
Part 4: Uncertainty Calculations
Problem Statement: Develop the uncertainty in the two estimates of diameter.
Use the methodology from Part 3 to develop an estimate in the uncertainty in VG and Vs. Propagate this
uncertainty into estimates of resistance, strain and diameter accordingly. Develop and estimate the
uncertainty of the direct measure of the diameter using a liner scale.
In your report discuss the
uncertainties estimated, using them to evaluate both schemes used to estimate diameter of the object
measured.
Issues to be discussed in the Lab Report for Part 4:
Include an appendix in the report that:
1. Details all values and uncertainties used in the uncertainty calculations (a table is appropriate).
2. Shows the application of the Root-Sum-Square approach (see Theory section) to propagating the
uncertainty in strain. At this stage, it is not necessary to fully develop each partial derivative, but
each partial taken should be symbolically represented.
Note: a homework assignment may be assigned that covers the full uncertainty analysis developed in part
4.
Prepared by Ghatu Subhash and Shannon Ridgeway. Unauthorized copy is prohibited
12
Download