data acquisition overview 1 using labview to acquire, analyze and record data
TRANSCRIPT
![Page 1: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/1.jpg)
Data Acquisition Overview
1
Using LabVIEW to acquire, analyze and record data
![Page 2: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/2.jpg)
Data Collection
One shot
vs. time
Using the while loop
Using the DAQ for timing
2
![Page 3: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/3.jpg)
DAQ set up for both
Choose RSE or differential, usually the latter
Choose voltage range to match your expected inputs
3
![Page 4: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/4.jpg)
DAQ set up for while
Collect one sample
DAQ set up for DAQ timing
Collect N samples
Put controls on the front panel for rate and number of points
Timing
4
![Page 5: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/5.jpg)
Saving Data
Use the Write to Measurement vi
For one shots or while loop control set up: Append to File
One File onlyOne header onlyOne time column only
General set up
For DAQ timing: Use next available file name.
5
![Page 6: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/6.jpg)
Power Spectra
Use Spectral Analysis
Set to power spectrum, linear
Use DAQ timing
Number of points must be a power of 2, N = 2k
Sampling frequency (rate) must be high enough that half the frequency,the so-called Nyquist frequency,
exceeds the highest expected frequency
6
(Maximum sampling frequency for USB6009 is 48 kHz)
![Page 7: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/7.jpg)
7
Zero Offset
Correct using a high pass filter
Install a control for the cut-off frequency
Aliasing
Test for by changing the sampling frequency
Other Power Spectra Issues
![Page 8: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/8.jpg)
8
Power spectra amplitudes and frequencies
Use the Peak Detector vi
Create controls for threshold and peak/valley
Create indicators for number detected, locations and amplitudes(but see below)
Wire the output of the Spectral Analysis vi to the X (input) terminalof the Peak Detector
Optional: Multiply the output of the locations terminal by rate/(number of points)
to convert location to frequency
![Page 9: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/9.jpg)
9
DAQ
Filter
Spectrum
Peaks
File
Raw data
The spectrum
I think we can record peaks as well,but I haven’t done it yet.
Spectral Analysis Schematic
![Page 10: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/10.jpg)
10
Data Analysis Overview
What to do with your data when you’ve got itsitting in an Excel file
![Page 11: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/11.jpg)
11
Possible tasks
Calibration, interpolation
Deducing constants in a theory
Deducing a theory
Characterizing variation in material properties
![Page 12: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/12.jpg)
12
Calibration, interpolation
Generally a polynomial trendline is good enough
Assess the fit using R2, which you get for free, but which isn’t as good as
Standard deviation of the fit
€
s =
y i − y i( )2
i
∑n − k
(We have not explored techniques by which we can choose a “best” k.)
![Page 13: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/13.jpg)
13
Characterization of Material Properties
You can use interpolation if you are fully ignorant
You can fit models if you have one
If you have time, energy and intuition, you can perhaps dream up a model
and assess it!
We looked at the Andrade model for the viscosity of water
![Page 14: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/14.jpg)
14
Deducing Constants in a Theory
Write out the theory
Beat your data into a form that you can fit in Excel
Find the trendline
Convert back to theory
Assess the result using s.
![Page 15: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/15.jpg)
15
Bernoulli Example
Theory:
€
h = h0 − CD
AE
AT
2gh0 t +1
2gCD
2 AE
AT
⎛
⎝ ⎜
⎞
⎠ ⎟
2
t 2
€
Plot h vs. t and fit a quadratic equation.
Calculate s for the fit
Is s consistent with the expected errors in the data?
Do the two values of CD you calculate agree with each other?
![Page 16: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/16.jpg)
16
Cooling Curve Example
Theory:
€
T = Tf + Ti − Tf( )e−kt
You need to know, measure or estimate Tf.
Plot ln(T-Tf) vs. t
Fit a linear trendline: m = -k and b = ln(Ti-Tf)
Assess the fit in the original data:
€
s =
Ti − T i( )2
i
∑n − 2
€
T = exp b − mt( )
![Page 17: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/17.jpg)
17
Deducing a Theory (Boyle’s Law)
Plot the data and look at it
![Page 18: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/18.jpg)
18
Looks good, but what is it?
It’s not linear
You can make a polynomial fit, but . . .
there’s no physics in that — not a good idea
Note: p = 0 —> V —> ∞; V —> 0 —> p —> ∞.
A power law might be a good thing; plot ln(p) vs. ln(V).
![Page 19: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/19.jpg)
19
![Page 20: Data Acquisition Overview 1 Using LabVIEW to acquire, analyze and record data](https://reader036.vdocuments.site/reader036/viewer/2022062516/56649e575503460f94b4f5fe/html5/thumbnails/20.jpg)
20
Nice trendline (which you should assess)
The linear term is the exponent, looks like -1.
Carry on with the hypothesis pV = constant.
(We did this and I won’t do it again here.)