Physics 434 Module 4: the FFT

Download Report

Transcript Physics 434 Module 4: the FFT

Module 5 – Serial devices using
VISA (LabView for “Virtual
Instrument Software Architecture”)
An application to measure capacitance
1
Physics 434 Module 5
Lab & writeup thanks to Prof. Toby Burnett
Examples of “serial interfaces”




RS232 (dumb terminal)
HPIB GPIB (general purpose instrument bus)
“Fire wire”
USB
2
Physics 434 Module 5
The Agilent (nee HP) 43310A
voltmeter: example of a GPIB instrument
3
Physics 434 Module 5
You could measure in the frequency
domain: A low-pass RC filter
Bode plot for a low-pass RC filter
10
1
2R C
1
2
|H(f)|
1
0.1
0.01
100
4
Physics 434 Module 5
1 10
1 10
frequency (Hz)
3
4
1 10
5
You could measure in the time
domain (à la Module 4)

Apply a square wave,
measure response,
charge or discharge
May not seen serial
device; at least use
Agilent to measure
resistor
RC circuit
voltage across capacitor

discharge
charge
0.8
0.6
3
R  1  10
7
C  1  10
0.4
0.2
0
0
1 10
4
2 10
4
3 10
time (s)
5
Physics 434 Module 5
4
4 10
4
5 10
4
Main points (see the doc)



Understand the Agilent instrument
Build the RC circuit (you might want to use the signal
generator and scope to get a quick understanding).
Two options (or your own ideas)



Frequency domain: Get and use the SweptSineGenerator (in
the Module5 llb). Generate the sweep.
Time domain: use the Vi from Module 4 to create a long
square-wave pulse
Analysis either inline, or write out the data to fit
Generate a final vi to calculate the frequency.
6
Physics 434 Module 5
Example Fitting:
Levenberg-Marquartd.vi



This VI has a nice interface to
specify a model. It is a cluster of 3
items: the formula, an array of
parameters to fit, (a,f) and the
independent variable (x).
Package it into a subVI, inputs X, Y,
“Initial Guess”, output “Best Fit” and
“Best Fit Coefficients” (really
parameters). Make a LED light up if
there is an error. The graph
comparing data with best fit can be
generated here
(But note that this is already done:
there is a fit_bode.vi you can use)
7
Physics 434 Module 5
The final project


We will be coming around to discuss this. See the list of
suggestions on the web site
Can be individual or joint (will probably be joint):


if joint, the individual contributions need to be specified
(specific sub-vis, for example.) It will still be a joint grade.
Make a proposal, perhaps by e-mail. I want to have a title
and a short description.
8
Physics 434 Module 5