**Lecture:** MWF 1:10-2:00 PM, Rm.185 Physics (in Physics atrium area, west side).

**Lab: **Wed. 3:10-6 PM Rm. 152 Roessler.

**Instructor: **Prof. David E. Pellett, 337 Physics, (530) 752-1783.

Office hours:normally Tue. 3:10-4 in 152 Roessler (subject to change), or by appointment.

E-mail:pellett (at) physics (dot) ucdavis (dot) edu

**TA:** Mark Triplett

Office hours:TBA in Physics 116 Lab

E-mail:mttriplett (at) ucdavis (dot) edu

Last updated

**Physics 116C** introduces techniques for making physical measurements using computer-based instrumentation. We use the LabVIEW programming system, which finds wide application in physics (and other) labs. The course will also cover experimental techniques, statistical analysis of data, the sampling theorem, finite Fourier transform techniques, noise spectra and other issues beyond the programming language itself in a series of lectures (see outline below). A brief overview of other approaches to data acquisition and experiment control will also be provided.

Physics experiments at the level of Physics 122 are a key component of the course. These will require complete reports.

The text by Essick is essentially a series of well-illustrated exercises and experiments for learning the LabVIEW language and applying it to mathematical problems as well as to data acquisition. This will be the focus of the first 6 weeks of the course (supplemented with related lectures and the Geiger counter and muon lifetime experiments). You should obtain the student edition of LabVIEW so you can work outside of the lab times to complete these assignments on your own computer (let me know if you have a problem here).You will need to upload your work on the assigned exercises in Essick to your SmartSite dropbox so they can be checked by the TA. This will be considered as part of your lab work. The initial labs will provide some time to work on the assigned Essick exercises.

**Prerequisites:** Physics 9D, 116B, Math 22AB or consent of department

**Web pages from other courses in sequence:** Physics 116A, Physics 116B

**
**

Overview, LabVIEW, Statistics Intro.

Self-study exercises in Essick, Ch. 1,2

(see Assignment 1 for details).

(see Assignment 2 for details).

Basic DAQ with Express VI

Chi-square test, parameter estimation.

(

(See information in SmartSite)

Linear and nonlinear least squares fit (see Bevington, Ch. 6-8)

Muon Lifetime (see Essick, Ch. 9, information in SmartSite)

Freq. spectra, windowing

Essick Ch. 11 DAQmx VI (example)

Signal sources, grounding, shielding

Linear least squares fits with errors

(Essick Ch. 9, SmartSite wiki for error calc.)

Thermoelectricity

(Essick, Ch. 12)

GPIB and instrument control (Ch. 13)

1:00 PM - 3:00 PM

**Texts: **

- Essick,
**Hands-On Introduction to LabVIEW for Scientists and Engineers**- Essick developed this text (recent major revision) for use in a year-long advanced physics laboratory course at Reed College.

**National Instruments, LabVIEW Student Edition software**- With this, you can use the LabVIEW language on your own computer (Windows or MacOS; student edition not available for Linux).

- Bevington and Robinson,
**Data Reduction and Error Analysis for the Physical Sciences, 3rd Ed.,**McGraw-Hill, ISBN 0-07-247227-8.- This is a "classic" basic reference on data analysis for experimental physics.

**Note that there are also many reading assignments in Horowitz and Hill,****The Art of Electronics, 2nd. Ed.,**the "classic" reference on electronics for experimental physics and a required text for Physics 116B. So it's a good idea to hang on to your copy from Physics 116B.

**References****:**

- Melissinos and Napolitano,
**Experiments in Modern Physics, 2nd Ed.** - Krane,
**Introductory Nuclear Physics** - Leo,
**Techniques for Particle and Nuclear Physics Experiments, 2nd Ed.** - Horowitz and Hill,
**The Art of Electronics, 2nd. Ed.** - Bobrow,
**Fundamentals of Electrical Engineering, 2nd. Ed.** - Squires,
**Practical Physics** - Johnson and Jennings,
**LabVIEW Graphical Programming, 3rd Ed.** - Hamming,
**Digital Filters** - Jacquot,
**Modern Digital Control Systems, 2nd Ed.** - Press et al.,
**Numerical Recipes, 3rd Ed.** - Cowan,
**Statistical Data Analysis** - Noble,
**Programming Interactivity**

**References for Technical Writing:**

**American Institute of Physics Style Manual**(4th Edition, 1990) has much useful information on writing papers, using technical terms and equations and making graphs. You can ignore the parts on preparing manuscripts for commercial typesetting.**IEEE Author Digital Toolbox**is geared toward computer typesetting. (Physics experimenters frequently publish in IEEE Transactions on Nuclear Science.)- Style Manual
- Example Paper (templates are available in MS Word and LaTeX formats). We will
*not*use two-column format or small figures for class reports.

- Squires,
**Practical Physics**, Ch. 13 (to be placed on library reserves)

*________*

**Other references ***(here or on the web)***:**

**Probability, Statistics, Least Squares Fits etc.**- Press et al.,
**Numerical Recipes in C**(see 14.0, 14.1, 14.3, 15) - Notes on Probability, Statistics and Monte Carlo Methods from the Particle Data Group

- Press et al.,
**Radioactivity and Particle Detectors****LabVIEW 2010 Help Pages**

**Grading: 7**% Quiz 1, 14% MT, 7% Quiz 2, 38% Lab, 10% HW, 24% Final.

- The greater relative weight for the lab score reflects the requirements for more sophisitcated experimental analysis and more complete written reports.

**Assignment 1 ( corresponds to Week 1 in the Outline, etc.): See SmartSite Assignments.**

**Lab (due at start of April 6 lab):**work through Ch. 1-2 of Essick. Also make the "Do It Yourself" projects at the end of Ch. 1 and Ch. 2. Submit your work as described in the SmartSite Lab Assignment.**Read**Bevington, Ch. 1-3.**Problems have been added on SmartSite Assignments due at start of class Friday, April 8.**

**Assignment 2 (see also SmartSite Assignments)**

**Lab:**work through Chapters 3 and 5 of Essick. Also make the "Do It Yourself" (DIY) projects at the end of Ch. 3 and Ch. 5 (amplitude modulation is discussed in Sec. 10.6 of Bobrow). See SmartSite Assignments for deadlines.

**Assignment 3 (see also SmartSite Assignments)**

**Lab:**during lab, work through Chapter 4 of Essick (this requires the lab computers with National Instruments data acquisition PCI cards). Do as many of the examples in Chapter 4 as possible in the time available. The "Do-It-Yourself " at the end of Ch. 4 isassigned this time.*not**Additional LabVIEW work during week*: Essick, Chapter 6 plus "Do-It-Yourself" project at the end of Ch. 6. See SmartSite Assignments for deadlines.**Read**Bevington, Ch. 4-6 (read Ch. 5 "once over lightly" to pick up key points).**Problems have been added on SmartSite Assignments as follows:**Bevington 2.6 (calculate the probabilities rather than the "payoff ratios"), 2.9, 2.15; 4.5, 4.7, 4.8, 4.13.

Also answer the following: in 4.13, do you think the 4.13(e) result is likely to be accurate? Why or why not?

These are due at the beginning of class on Friday, April 22. We may discuss the solutions in class since there is a quiz on Monday, April 25. (Note further changes in dates.)

**Assignment 4 (see also SmartSite Assignments)**

**Lab:**Start Geiger Counter and Counting Statistics Lab (details in SmartSite Assignments)- See the references for technical writing above.

**Quiz 1 Information:**

**25 min. quiz at beginning of class on April 25.**- You may bring and refer to the texts by Bevington and by Essick
- You may bring one 8.5" x 11" page of notes
- Quiz will cover the class notes and the first 4 chapters of Bevington
- Bring a calculator
- A sample quiz from last year is in SmartSite Resources (there are two problems even though the intro says 3).

**Assignment 5**

**Lab:**Start Muon Lifetime lab. See information in SmartSite Resources under Labs/Muon Lifetime. The experiment data taking was started on 4/27/11. The analysis description will be updated when the new data are ready.**Read:**- Bevington, Ch. 7 (least-squares fit to a polynomial and the covariance (error) matrix; Ch.8 (nonlinear fitting and the Levenberg-Marquardt method (called the Marquardt method in Bevington and referred to as "Lev-Mar" in LabVIEW). These techniques will be used in the muon lifetime analysis.
- Essick, Ch. 7 (case structure), Ch. 8 (sequence structure) and Ch. 9 (curve fitting with linear least-squares). You should have have learned the LabVIEW basics by now so
**you are not required to work through the examples any more.**Some of these techniques will be used in the muon lifetime analysis and later work. Also, the fitted thermistor function in Ch. 9 will be used in the last lab. There are linear and nonlinear LabVIEW least squares fitting examples in the SmartSite wiki.

**Assignment 6**

**Lab:**Essick, Ch. 10 (See SmartSite LabVIEW Assignment 4):- do the exercises in Ch. 10 of Essick. You do not need to do the "do-it-yourself" at the end. Next week you will use a pre-built DAQ VI (based on techniques in Ch. 10 and 11) to collect data and do FFT spectral analysis of a Johnson noise source.
- Continue work on Muon Lifetime lab (see SmartSite Muon Lifetme assignment, report due in class Wednesday, May 18.

**For further assignments, see Essick reading assignments in the course outline "Lab" column (above) and SmartSite Assignments. Also, **

**Horowitz and Hill References**- Differential and instrumentation amplifiers: Ch. 7, 421-428
- Amplifier noise: Ch. 7, 428-455
- Interference, shielding and grounding: Ch. 7, 455-466
- A/D conversion: Ch. 9, 613-641
- Active filters: Ch. 5, 263-281
- Coaxial cables: Ch. 13, 879-880.

**Quiz 2 Information:**

**25 min. quiz at beginning of class on May 27.**- You may bring and refer to the texts by Bevington and by Essick
- You may bring two 8.5" x 11" pages of notes
- Quiz will emphasize the recent class notes and material (especially sampling, FFT, noise, interference, transmission lines and Homework Assignment 3)
- Bring a calculator
- A sample quiz from last year is in SmartSite Resources.

**Johnson Noise Lab:**The goal of the lab is to make a plot of output noise power times BW vs. R. The slope will be used to determine Boltzmann's constant,*k*. We will also compare the results with the expected Johnson noise from the resistors and the amplifier.- Here is the writeup for the Physics 122 Johnson noise experiment. It gives an overview of the subject and theory. The LabVIEW version of the experiment is similar,
*but our circuit, VI and procedures are different.*See below. - Reference for the procedure and circuit we will use:
- Melissinos and Napolitano (M&N),
**Experiments in Modern Physics, 2nd. Ed.,**Sec. 3.6, "Measurements of Johnson Noise." - Links near the bottom of the page give leads to the history of Boltzmann's entropy formula and connections with statistical mechanics, information theory and cosmology.

- Melissinos and Napolitano (M&N),
- Here is a checklist for the writeup for the experiment. A complete writeup in the form of a brief technical report is required.
**Our circuit**(available here with additional notes) uses a different low-noise op-amps from the ones indicated in the reference. We use the LT1793 op-amp for the first stage and the AD797 for the second stage. An LF411 is used to make a 2-pole Butterworth low-pass filter (see Horowitz and Hill, Secs. 5.06 and 5.07). Note that the LT1793 has low voltage noise and extremely low current noise specifications. This will allow us to use relatively large resistance values where the thermal noise from the resistor will greatly exceed the amplifier contribution.**The Johnson Noise Test Fixture (JNTF):**for this experiment, you will use a pre-built circuit for the amplifier and filter for better performance and to save time wiring (the circuit diagram is here). It has +15 V, -15 V and ground connections (wires color-coded to match the binding posts on the circuit test boards), a BNC output jack and a threaded SMA input connector for the calibration signal or for an external resistor. A multiple positiion switch allows you to connect one of the following 0.5% metal film resistors to the input.*Note the labels differ from the nominal (and actual) values in some cases!*The nominal values are given below.**Label**Short 300 1K 3K 6K 10K 30K 60K 100K 500K 1M Ext **Resistor Nominal Value**0 Ohms 301 1.00 K 3.16 K 6.03 K 10.0 K 24.3 K 60.4 K 100. K 499 K 1.00 M SMA Input **Accurately measured values of resistance are given in a chart linked here**.**Key points**for measurement (see our circuit diagram):- Measure and plot g(f), the gain of the amplifier as a function of frequency, using the function generator, voltage divider and accurate wide-band digital multimeter (DMM). It is sufficient to check for midband flatness plus a few points near the corner frequency and beyond rather than to do a detailed measurement of the entire function. Be sure the high frequency corner frequency is as expected (16 kHz), the low frequency is still flat in the range 100 Hz to 1 kHz and that the gain is down by an order of magnitude by the Nyquist critical frequency (100 kHz). Use the provided approx. 1000:1 voltage divider (in a shielded box) between the signal generator output and the JNTF external input. Use shielded cables for connections to prevent pickup of interference. Measure the voltage divider voltage ratio and note the accuracy of your measurement. Check that the midband gain G agrees with the stated value for your JNTF in the chart available in the lab.
- Connect the circuit output to the NI ADC using a nonreferenced single-ended (NRSE) input with voltage range from -0.5 V to 0.5 V (use analog input 0)..
- The power spectrum will be measured using the VI on SmartSite (Scope_Spect_mod_nw_mod.vi). It also displays a histogram and waveform plots of the sampled noise waveform. The number of points should be 8192 and
**the sampling frequency should be 200000.**The spectrum should extend from 0-100 kHz in bins 0-4096 - Start with the100 kilohm 0.5% metal film resistor as the noise source. The spectrum should have the same shape as your amplifier gain vs. frequency curve if the signal is dominated by Johnson noise (either from the amplifier or the resistor). There may be some additional pickup of signals from 60 Hz AC (and harmonics). These should show up as peaks at the low end. But there should be a region which is fairly flat within the amplifier bandwidth (perhaps from approx. 1 kHz to 8 kHz – calculate which channels correspond to this frequency interval). If there is excessive pickup, check the wiring.
**The sum of the squares of the amplitudes of the FFT components**within these limits (f_{1}to f_{2}) will correspond to a measurement of <V^{2}>, the mean squared output voltage in that bandwidth. For an explanation, refer to these notes.- For each resistor value, you will need to sum the channels of interest for a single measurement. Repeat at least N=10 times to get a more accurate mean value for <V
^{2}> and an estimate of its standard deviation, sigma. The error in the mean value of <V^{2}> will be sigma/(square root of N). You should automate this procedure in your VI. The VI is set up to make multiple measurements of <V^{2}> but you will need to modify it to calculate the desired statistics and write an output file of the measurements if desired. - Repeat for other resistor values available in the JNTF.
- Find and plot <V
^{2}> vs. R with errors and fit to a straight line (two parameter fit). (See example in SmartSite wiki on linear least squares fit with errors.)- This linear fit corresponds to the function <V
^{2}> = (e_{A2}+ 4kTR)G^{2}(f_{2}-f_{1}), where- e
_{A2}represents the noise contribution from the amplifier (amplifier current noise component should be negligible with LT1793) - G
^{2}is the average of the square of the gain of the amplifier g(f) over the frequency range used. If you use the range 1 kHz - 8 kHz,*this should be reasonably constant.* - If g(f) is not sufficiently constant over your interval, you would have to find the integral from f
_{1 }to f_{2 }of g^{2}(f) df.*This should not be necessary if the system is functioning properly.* - Be sure to record the ambient temperature T from the thermometer in the lab.
- The parameters e
_{A2}and Boltzmann's constant k can be found from the fitted parameters. Find the errors in these quantities from the fit covariance matrix (using propagation of errors as appropriate). - Compare with the accepted value of Boltzmann's constant.
- Compare e
_{A }with what you expect from the op-amp specifications in a non-inverting amplifier configuration (see Horowitz and Hill, p. 447).

- e

- This linear fit corresponds to the function <V

*Reference for the procedure and circuit:*Melissinos and Napolitano (M&N),**Experiments in Modern Physics, 2nd. Ed.,**Sec. 3.6, "Measurements of Johnson Noise."

- Here is the writeup for the Physics 122 Johnson noise experiment. It gives an overview of the subject and theory. The LabVIEW version of the experiment is similar,
**PID Temperature Controller Lab:****The upcoming labs**(weeks 9 and 10) concern measuring temperature using a thermistor (Essick, "Do It Yourself" at the end of Ch. 9) and manipulating the temperature of an aluminum block with a PID temperature controller (Ch. 12 and Appendix I). Our version of the device in Appendix I has already been constructed. It includes the TE device driver (Fig. A.9) but you will have to provide the op-amp and and 470 Ohm resistor shown in Fig. A.7. Only general guidelines are given in Essick for the VI for PID control.**The overall procedure (including temperature measurement) is outlined in Sec. 12.3 of Essick.**- Read the above material in Essick.
**Keep up your individual lab notebook**for this project. This lab (PID temperature controller) will require a brief writeup when you are finished.- Here is a file (text file, tab-delimited with title and column header lines) of resistance vs. temperature data for the thermistor we will use.
*Use this instead of the R vs. T data in the text.* - To save you time, we have already fitted the transformed R-T data with a third order polynomial in x (see Essick, pp. 321, 329). Note that this is not the Steinhart-Hart Equation since we have kept the second order term. Since we did not need to a fit with errors here, we just used a spreadsheet to do the fit. You should use this function to calculate T from a given voltage reading. The fitted function was y(x) where y = 1/T and x = lnR (with T in K and R in ohms). A plot of the data and the function (with the resulting equation) are here.

- Here is a file (text file, tab-delimited with title and column header lines) of resistance vs. temperature data for the thermistor we will use.
- Information about thermoelectric devices from Tellurex
- Begin by getting the temperature measurement going (aim to have this running during Week 9).
- Wire the constant current driver circuit for the thermistor. Set the negative op-amp voltage to -12 V rather than -15 V to be compatible with the fan voltage for the heatsink fan of the temperature controller.
- Measure and record the current going to the thermistor (don't rely on calculations).
- Make the Digital Thermometer VI. This is even more of a do-it-yourself project than indicated in Ch. 9. You need to read the resistor voltage and convert to temperature using the parameters from the third order fit rather than using the Steinhart-Hart parameters and the Express VI temperature measurement (should not be very hard to do). Use the thermistor in the temperature control setup.
- Check the thermistor temperature reading at room temperature using a thermometer provided. You can insert the end of it in the open end of the hole containing the thermistor (be careful not to dislodge the thermistor).

- Develop the PID algorithm. This can be done outside of class.
- Put together the circuit for the controller. Start on this during Week 9 if possible.
- Be sure to use the large variable supplies (one per voltage) for +8 V and -8 V. The outputs of these supplies are floating. If you hook the + input to ground, the - input will be negative the indicated voltage. The supplies do not have their own ground points (other than the safety ground on the power plug). Connect the + input of one supply to the - input of the other. This common connection should then be connected to the breadboard ground banana plug. The remaining connections become the + and - supply voltages. Also hook the the ground lead from the thermoelectric device (black banana plug) to this common ground using a heavy banana plug lead since this is a high current return path.
- Once you have your controller working, you should investigate the PID controller performance.
- If you haven't done so already, add a "waveform chart" display of the temperature as a function of time. Then investivate the effect of the parameters on the waveform. Here are suggestions on tuning the parameters. Further information on the PID algorithm as applied to oven control (heater only) is also available from the site.
- If possible, add the possibility of inhibiting the integral term until you are close to equilibrium. Otherwise, it takes a long time to overcome the accumulated error when changing the set point.

- For your (brief) writeup, include an overview of the PID algorithm, your circuit and VI diagrams, a discussion of the performance of the system and a plot of temperature vs. time showing behavior after changing the set point (see checklist below).
**Turn in the report at the end of the lab on Wednesday, June 2.****Here is a checklist of points to address**in your lab writeup (version modified for 2011: only the due date is changed).

**More information on temperature measurement and thermistors:**- Horowitz and Hill (H&H), Ch. 15 has a good overview of many measurement transducers and techniques. There is a discussion of thermistor and thermocouple accuracy in H&H, Sec. 15.01. They state that thermistors are available with "tight conformity (0.1–0.2° C) to standard curves." This is better than what they claim for thermocouples (0.5 to 2° C). Here is a quick guide from the web which compares thermocouples, thermistors and a third device, the resistance temperature detector (RTD).
- Here is the datasheet on BC Components negative temperature coefficient (NTC) thermistors covering the device we use (2232 640 5 5103). It contains data needed to estimate temperature measurement accuracy (see the the next reference).
- Here is a thermistor selection guide discussing the Steinhart-Hart equation and thermistor accuracy from Vishnay, a corporation which acquired BC Components in 2002.

**Information on topics for further study:**- Interfacing commercial test and measurement equipment: VISA, SCPI language; GPIB, USB, Ethernet connections
- Availability of specialized VIs for instruments

- Use of the
*General Purpose Interface Bus*(GPIB) (also known as IEEE-488) to connect instruments is covered in Ch. 13 of Essick. Many commercial laboratory instruments have a GPIB interface and a ready-made LabVIEW VI to provide a quick start for a data acquisition system.- Further GPIB information:
- A useful GPIBdescription
**Example:**Keithley 197A GPIB (IEEE-488) Digital Multimeter (DMM)- Keithley 197A IEEE-488 Interface Instruction Manual
- Sample Keithley DMM LabVIEW VI

- Further GPIB information:
**Additional information**on other busses and real-time operating systems:- Horowitz and Hill, Secs. 10.15, 10.19, 10.20, 10.21 (needs updating since this field evolves rapidly).
- VME FAQ VME is a bus which is widely used in high energy physics applications, particularly realtime applications (see below). It was originally developed by Motorola for use with the then-new M68000 processor family to build specialized DAQ systems. Many other processors are now available along with a wide variety of I/O and other boards. A variant of VME, the VXI bus, (Vme bus eXtensions for Instrumentation) incorporates some GPIB features but builds on VME to achieve faster performance.
- Comp.realtime frequently-asked questions
- General computer bus comparisons

**Information on Comedi**(Linux*co*ntrol and*me*asurement*de*vice*i*nterface) drivers which allow use of various DAQ boards (including some NI boards) with Linux and C-language programs.

- Interfacing commercial test and measurement equipment: VISA, SCPI language; GPIB, USB, Ethernet connections

- Labview description at National Instruments
- Marquardt method history
- Analog Devices note: Fundamentals of Sampled Data Systems
- VI to make LabVIEW xy plots with error bars (courtesy of the LAVA web site). Hint: change the error bar plot symbol to "+" to get a more traditional look.
- National Instruments tutorial:
**Field Wiring and Noise Considerations for Analog Signals** - Linux drivers for various I/O cards such as the National Instruments PCI boards we use (www.comedi.org: Linux
*co*ntrol and*me*asurement*de*vice*i*nterface). - Discovery of cosmic microwave background (related to noise measurements in microwave antenna at Bell Laboratories)
- Robert W. Wilson Nobel Lecture (1978)
- Arno A. Penzias Nobel Lecture (1978)

- Boltzmann's ideas are mentioned in an interesting lecture by Sean Carroll on cosmology and the arrow of time.
- C.E. Shannon,
**A Mathematical Theory of Comunication**,*Bell System Technical Journal*(1948)