MAE 170 Lecture 2 AD conversion and sampling rates Error Analysis Report Writing - PowerPoint PPT Presentation

1 / 81
About This Presentation
Title:

MAE 170 Lecture 2 AD conversion and sampling rates Error Analysis Report Writing

Description:

Least-squares fit. Systematic approach to finding a linear relationship. n pairs of data (xi,yi) ... is the least-squares best fit. Measure of adequacy of fit ... – PowerPoint PPT presentation

Number of Views:59
Avg rating:3.0/5.0
Slides: 82
Provided by: prabba
Category:

less

Transcript and Presenter's Notes

Title: MAE 170 Lecture 2 AD conversion and sampling rates Error Analysis Report Writing


1
MAE 170Lecture 2A/D conversion and sampling
ratesError AnalysisReport Writing
  • April 6, 2009

2
Announcements
  • The door code for all 3 EBUII labs available to
    MAE170 class is 0834326
  • EBU2 203 and 205 have open door hours. EBU2-239
    is the only one that requires a code all the
    time.
  • You can find out your account information,
    including a password protected link for the door
    code, using the account Lookup Tool at
    http//acs.ucsd.edu.

3
What is due this week?
  • Worksheet (from Week 1)
  • Pre lab (summary of what you will be doing in
    lab.
  • not procedures!)
  • - Please type, lt 1 page
  • Prepare for Lab Quiz

4
Objectives for this week
  • Lab Understanding A/D converter
  • Sampling resolution
  • Sampling rate
  • Error Analysis and Report Writing
  • How, plus expectations on both fronts

5
A/D conversion and sampling rates
Please read Chapters 4 5Introduction to
Engineering ExperimentationWheeler and Ganji
6
What does an A/D converter do?
  • Most instruments give an analog output
  • E.g. voltage scale varies continuously with
    subject of measurement
  • Computer deals with discrete (digital) data
  • Inherent error between analog signal and digital
    representation
  • How quickly can we capture a changing signal (how
    fast)?
  • How close is the digital value to the analog (how
    good)?
  • Binary representation - of bits corresponds to
    number of powers of 2 represented

7
A/D conversion basics Dynamic Range
  • Dynamic range
  • The range between the lowest possible reading and
    the full-scale reading of a digital signal
  • In the case of a linear converter, directly
    related to the bits in the conversion
  • Tells us how many pieces we can chop our signal
    into
  • Sometimes nonlinearity has to be introduced to
    accommodate range of transducer

8
A/D Conversion Basics Resolution
  • Related to dynamic range, typically
  • Lowest bit determines resolution
  • Resolution 1 / 2N, where N bits

9
A/D Conversion Basics Resolution
  • For the DAC as the resolution gets bigger, the
    measurements
  • become more coarse and the DAC can not
    resolve small
  • voltage increments.
  • On the other hand as the DAC resolution gets
    smaller, the
  • measurements become more accurate because
    smaller
  • voltages can be measured.
  • So resolution in the context of the DAC is
    different than say
  • for a microscope, where higher resolution
    implies you can
  • resolve smaller things.)

10
A/D Conversion Basics Bandwidth
  • Sample speed affects the measurement
  • Nyquist sampling criterion sample at 2fmax or
    faster to prevent aliasing the signal due to
    undersampling

11
10 Hz Signal
  • There are ten cycles in one second

12
Sampling rate 11 Hz
  • The signal appears to be a sine wave
  • One cycle appears in the time that 10 cycles
    occurred for the sampled data
  • The frequency 1 Hz is the difference between the
    sampling frequency and sampled rate

13
Sampling rate 18 Hz
  • Difference is 8 Hz
  • The incorrect frequencies in the output data are
    called aliases

14
Sampling rate theorem
  • Any sampling rate greater than twice fm, the
    lowest frequency will be the same as the actual
    frequency
  • The restriction on the sampling rate is known as
    the sampling rate theorem
  • This theorem states that the sampling rate must
    be greater than twice the highest frequency
    component of the signal in order to construct the
    original signal

15
Week 2 lab experiment"How fast, how good?"
  • The resolution of our data acquisition card (DAC)
    is determined by the resolution of the A/D
    converter
  • Determine the resolution of the DAC using the
    digital multimeter (DMM)
  • Hint 6, 8, 10, 12, 16 bits are typical
    resolutions
  • Use the DAC to generate a voltage
  • Calculate the corresponding resolution
  • Use existing "Generate Voltage.vi"

Realize that any noise and an offset in the DMM
may also affect your measurements
16
Week 2 lab experiment"How fast, how good?"
  • Send analog output of computer back to the
    computer
  • No influence of DMM on measurement
  • Use existing "Accuracy.vi"
  • Use "continuous run" mode for LabView data
    acquisition
  • Sample a known signal at a known rate
  • "Sampling rate.vi"

17
Lab 2 objectives
  • To determine the resolution of the DAC
  • To investigate the importance of sampling rate
  • To demonstrate your LabView VI is working

18
Reporting experimental measurements and
associated error
Please read Chapters 2, 6 7Introduction to
Engineering ExperimentationWheeler and Ganji
19
Noise in typical measurements
  • Noise
  • Anything that obscures the intended signal
  • Frequency spectrum of noise?
  • Source of noise?
  • Common types of "white noise"
  • Johnson noise (resistors)
  • Noise generated by thermal effects
  • VJ(rms) (4kBTR?f)1/2 0.4 µV for a 1kQ
    resistor, 10kHz bandwidth
  • Shot noise
  • Quantum nature of electrons gives a statistical
    fluctuation in the current
  • ISHOT(rms) (2qIDC?f)1/2 0.4 µA for 50 A
    current
  • Johnson noise and shot noise are based on physics
    and work basically the same whether your
    components are cheap or expensive
  • Expect that your signal will fluctuate

20
Other type of noise 1/f sources
  • Many other types of noise follow a 1/f decay
  • Define the decibel (dB)
  • dB ? 10log10(X/X0)
  • There is equal power drop in noise per decade of
    frequency
  • Gain 10log10(P1/P2)
  • P1 1/f1 and P2 1/f2
  • If f1 2f2 (frequency halving)
  • 10log10(1/2) -3.01 dB
  • Hence, 1/f noise falls off at -3.01 dB/decade
  • P V2
  • Gain 20log10(Vout/Vin)
  • We will see later this is the fundamental
    property of an operational amplifier (op-amp)

21
Measurement error definitions
  • Error measured value - true value
  • Does not imply mistake in measurement
  • But mistakes in measurement cause error
  • Experimenter usually doesnt know error of
    measurement
  • What experimenter can estimate is the uncertainty
  • The uncertainty is an estimate (some level of
    confidence) of the limits of error in the
    measurement.

22
Accuracy precision
  • Accuracy - closeness of agreement between
    measured an true value - used to identify
    uncertainty
  • Precision - how often the instrument gives the
    same value
  • The error of a measurement system (thermometer,
    voltmeter, etc) is usually 1/2 of the last
    precise digit. E.g. 1.1 is read, can say the
    error of the instrument is .5 V
  • A measurement may be precise, but not accurate

23
Confidence uncertainty
  • Example
  • Voltage measurement
  • Could have a 95 confidence level that the
    uncertainty is 1V
  • Error is lt 5 that the voltage varies gt 1V
  • Narrow uncertainty levels
  • Use of high quality, calibrated equipment
  • Make many measurements

24
Random and systematic errors
  • Systematic error average of readings - true
    value
  • Random error reading - average value of readings

25
Systematic errors
  • Consistent, repeatable errors
  • Affects the accuracy of your result
  • A major source is an uncalibrated instrument
  • XM XT C XM CXT XM
    f(XT)XT
  • Where M and T refer to measured and true values
  • Human error
  • Misreading scale
  • Reading F instead of C
  • Measuring mV instead of µV
  • Not properly zeroing or using a wrong offset
  • Not taking note of atmospheric fluctuations

26
Systematic errors (cont.)
  • When measurement device alters what is to be
    measured
  • e.g. thermocouple alters temperature of bath
  • When measuring device is affected by other things
    that what is to be measured.
  • e.g. metal ruler used inside and outside,
    humidity variations

27
Systematic errors (cont.)
  • Not obvious to experimenter
  • Compare measured values to theoretical
    predictions
  • Compare measured values to values measured in
    another lab
  • Minimize by
  • Taking careful measurements - eliminate human
    factors
  • Take time to calibrate the instruments

28
Example of systematic error
  • Calibration test, 10 measurements using digital
    voltmeter of a 6.11V battery
  • Readings 5.98, 6.05, 6.10, 6.06, 5.99, 5.96,
    6.02, 6.09, 6.03, 5.99
  • Determine average 6.03V
  • Systematic error average - reported -0.08V
  • Thus, the battery is really 6.03 V

29
Random errors
  • All experiments will have random error.
  • Affects the precision of a result, not its
    accuracy. Caused by lack of repeatability in the
    output
  • Random errors are the major focus of your error
    analysis
  • Decrease uncertainty by repeated measurements
  • Minimize by
  • Eliminate uncontrolled variables
  • Shield, ground equipment from electrical noise
    and temperature variations

30
Errors of a measuring system
  • Precision of a measuring system
  • Given as tolerance or
  • e.g. measuring device has a tolerance of 1.5 for
    a range of -100 to 100 V
  • Systematic uncertainty B 1.5 V
  • e.g. most resistors have a tolerance of 5
  • 40 ? resistor is written as 40 2 ?
  • Reading error
  • Take the error to be 1/2 of the finest scale you
    can read
  • For a digital thermocouple
  • We can read this number to be 12.80 0.05
  • For a 0.3 m ruler the finest division is 1mm
  • Estimate you can read the ruler to 1/2 of the
    minimum scale, or 0.5 mm

31
Statistical analysis - general definitions
  • Population
  • Comprises entire collection of objects,
    observations under consideration
  • Examples batch of light bulbs produced in a
    certain period
  • Sample (this is what you have)
  • Representative subset of a population
  • Example 10 light bulbs selected out of
    population of 1000 produced

32
Measurement of central tendency
  • Most common is the mean of the sample
  • Median
  • Exact value at center of data set
  • Mode
  • Most frequently occurring value

33
Measures of dispersion - spread or variability of
data
  • Deviation
  • Average deviation
  • For a Gaussian distribution, 68 of the data
    falls within
  • Sample standard deviation

34
Example
  • 60 temperature measurements

Mean 1x(10891092)2x (10941115)3x11124x(109
51110)/60 1103C Median 1104C Mode
1104C Standard deviation S 6C
35
Normal (Gaussian) distributionthe 68 - 99.7
rule
68 of the observations fall within 1s of the
mean between m-s and ms 95 of the
observations fall within 2s of the mean between
m-2s and m?2s 99.7 of the observations fall
within 3s of the mean between m-2s and m??s
µ population mean ? standard deviation of the
population mean
36
Correlation of experimental data
  • Correlation coefficient, rxy, used to determine
    if there is a functional relationship between two
    measured variables, x and y

37
Least-squares fit
  • Systematic approach to finding a linear
    relationship
  • n pairs of data (xi,yi)
  • xi assumed to be error free
  • Seek to fit Y ax b
  • Each xi has error ei
  • ei Yi-yi

38
Least-squares fit
  • Can solve for Y ax b
  • Resulting equation is the least-squares best fit
  • Measure of adequacy of fit
  • Coefficient of determination, r2 (should be close
    to 1)

39
Propagation of errors
  • Following technique used to determine how error
    propagates through an experiment. Combines
    uncertainty of each step
  • M result of calculation
  • X, Y, Z
  • Numbers used for calculation
  • SM
  • standard deviation of result
  • SX, SY, SZ
  • Standard deviation of numbers used in calculation

40
Propagation of errors
  • Addition and subtraction
  • M X Y- Z
  • Multiplication and division
  • M XY/(Z), M XYZ
  • Logarithm
  • M log X
  • M ln X

41
Example
  • To calculate the power consumption in a resistive
    electric circuit, P IV
  • V 100 2 V
  • I 10 0.2 A
  • P 1000 W
  • What is the error in the calculated power?
  • SM 1000(2/100)2 (0.2/10)21/2 28.3 W
  • Then P 1000 28.3 W

42
Reporting measurements significant figures
  • A piece of data should be reported with no more
    significant figures than are known
  • Your calculator is happy to carry along lots of
    points after the decimal place!
  • The last significant figure in any stated answer
    is typically of the same order of magnitude as
    the uncertainty
  • Several extra digits may be carried through
    calculations, but rounding should happen with the
    final answer
  • The final answer may have no more precision than
    the least precise component of the calculation!

43
Significant figures
Always use units when recording and
reporting data Always record data to the proper
number of significant figures Zeros leading
zeros--never significant e.g. 0.0000000001
captive zeros--always significant e.g.
1.0000000001 trailing zeros--significant
only if the number contains a decimal
point 1000000000 (?)
1.0000000000 x 109 (11 sig. figs.)

1.0000 x 109 (5 sig. figs.)
1.0
x 109 (2 sig. figs.)
44
Significant figures
When numbers are multiplied or divided, the
number of significant figures in the product or
quotient cannot exceed that of the least precise
number used in the calculation
e.g. 1.0034 cm x 2.0 cm 2.0068 cm2
2.0 cm2
(calculation)
(report) In addition and subtraction, the sum or
the difference cannot be stated to more places
after the decimal than the term with the least
number of places after the decimal.
e.g. 1.0
liter 0.001 liter 1.0 liter
45
Significant figures
  • Be aware of the limitations imposed on the number
    of significant in your result by the magnitude of
    your error.
  • Only one of these reported values for a weight
    uses the correct format. Which one?
  • 20.15 gms 20.2 2 gms
  • 20.2 1.5 gms

46
Reporting error in an experiment
  • For single data points, estimate each source of
    error as well as you can, state the likely error
    sources if possible
  • For data where replicate measurements are
    possible, typically an error estimate is given by
    2S, where S is the standard deviation in the
    measurement
  • Why? This is the 95 confidence interval
  • Add to this any separate estimates of error that
    may not be evenly distributed around the best
    estimate of the measured value

REPORT M 2SM
47
Expectations for reporting measurements
  • We expect that you will state error estimates for
    all of the data in your reports, including in the
    report and HOW you estimated the error
  • Any reports submitted without a discussion of
    error will be NOT ACCEPTED!

48
Laboratory Report Writing
Please read Chapter 12 (sec. 12.2.7)Introduction
to Engineering ExperimentationWheeler and Ganji
49
Key concepts in writing
  • Concepts related to readers and writers
  • Purpose
  • Why are you writing this document?
  • Goals
  • to persuade, inform, document?
  • Academic purpose
  • Display of knowledge
  • Audience
  • Who is reading your document?
  • Consider multiple readers and readers' purposes
    and background knowledge, etc.
  • Concepts related to texts
  • Features of content, organization, language and
    format are determined by your audience and your
    purpose
  • Content
  • The information contained in your document
  • Main goal is to communicate to an audience

50
Important points about your laboratory report
  • Your audience is well known
  • To make sure that you understand the material and
    ideas
  • The report should be clear and coherent
  • The report should be typed on a computer
  • Details of the logical process

51
Writing as part of a team
  • If different people are writing different
    sections, one person should edit the final draft
  • Team writing needs careful planning
  • Groups should agree on the outline of the report
    before drafting starts
  • All of the authors should read and approve the
    final version

52
Structure of your lab report
  • 4 page maximum of body of report
  • Including text, figures and tables
  • 1 inch margins around each page
  • Use 11 point Times or Times New Roman font or 10
    point Ariel or Georgia font
  • Do NOT use a double-column page format (use
    single column)
  • Appendix to include raw data

53
Structurechoosing the main headings
  • Main choice of headings
  • Title page separate page
  • Abstract separate page
  • Introduction
  • Theory
  • Methods and procedures
  • Results 4 pages maximum
  • Discussion
  • Conclusions
  • Error analysis (can be in Discussion)
  • Tables and figures
  • Appendices
  • Raw data, lengthy procedures, graphs that are too
    long for the body of the report

54
Outline of the report
  • Write each heading at the top of a sheet of paper
  • Write the main points you can think of under each
    heading
  • Find all your notes, figures and tables from the
    experiment
  • Remember it is very important to write every
    detail of your experiment

55
You must keep careful records
56
Important points
  • Decide which figures you need
  • Make lines and curves clear, label and
    differentiate them clearly
  • Label axes simply and clearly
  • Mark scale calibrations clearly
  • Number and identify the figures in the text

57
Title page
  • The title answers the question
  • What is this report about?
  • The title page should be
  • Concise
  • Informative
  • accurate

58
Title page example
Laboratory 1 Dynamic Behavior of Electrical
Networks
Department of Mechanical and Aerospace
Engineering University of California, San
Diego MAE 170 Names of group members Day and
time Group number Date submitted
59
Abstract
  • The abstract is an abbreviated, accurate
    representation of the content of the report
  • It should be
  • Informative
  • Quantative
  • Short
  • Typically one paragraph
  • Do not refer to anything not in the main body
  • Write complete sentences that follow each other
    logically
  • Use the third person (as with the rest of the
    report)

60
An example
61
Introduction
  • The main questions to be answered
  • Why did you do the work?
  • What is the purpose?
  • Deal with these questions interestingly and as
    simple as possible
  • Tell your readers briefly what you examined
  • Indicate your experimental approach
  • Cite the published work, lab hand outs, etc.

62
Example
Good way of citing someone else work
63
Theory
Good way of numbering equations
64
Experimental procedure
  • Motives
  • Apparatus/experimental set-up
  • Procedure
  • Step by step organization
  • Organization
  • Paragraph unity
  • Informative headings
  • Language issues
  • Past tense
  • Passive and impersonal subjects

65
Example
Use past tense
Please reference it if you are using material
from other sources
66
Data and results
  • You are answering the question
  • What did you find and observe?
  • Emphasize results that answer the question you
    are examining
  • Put secondary results after the most important
    ones
  • Don't suppress valid results that appear to
    contradict your hypothesis
  • Suppressing such results is unethical
  • Explain why they are anomalous

67
More on Results
  • Don't repeat in the text all the numbers that are
    presented in tables and figures
  • Don't repeat the table title and figure caption
    in the text

68
Example
Note no error bars
Caption is not clear
Use Fig. instead of graph
No Y-axis title
This is a good discussion point
69
Discussion
  • You are answering the general question
  • What do your findings mean?
  • The discussion is where you answer specific
    question(s) you stated in the introduction
  • Discuss any possible errors in your method and
    assumptions
  • Do not refer to every detail of your work again
  • A useful way to open the discussion is to use the
    end of the introduction as a starting point
  • Mention the applications of the experiment at the
    end

70
Good
This belongs in the experimental procedures
section
  • There is no point in writing a long discussion if
    you are just repeating text from previous
    sections

71
Conclusions
  • Distinguish between results and conclusions
  • Introduce your conclusions by using a strong verb
    such as 'show' or 'indicate
  • Identify speculation by using 'might' with the
    verb

72
Example
73
Error analysis
Narrative describing sources of error
Then include your quantitative analysis
74
Acknowledgements
  • Acknowledge briefly any substantial help
  • This section can be placed before the
    introduction
  • Example

75
References
76
Appendix
  • Lengthy material related to your report
  • If you cite published work in the appendix, add
    the reference to your list of references

77
Revising the first draft
  • Examine the text for logical necessity, order,
    accuracy and consistency
  • Check that the tables and figures are necessary
  • Check the accuracy of citations
  • Check spelling and grammar
  • Make sure figures and tables are listed
    chronologically and that each table and figures
    is referred to in the text.

78
This week objectives
  • Determine the resolution of the DAC
  • Investigate the importance of sampling rate
  • Demonstrate that your LabView is working
  • Please don't forget to write your pre-lab

79
Experiment 2sample quiz questions
  • To capture 150 kHz, theoretically what is the
    lowest sampling frequency?
  • 100 Hz signal sampled at 10, 90 and 110 Hz
    results in _____, ______, ______
  • Representing (by connecting the dots) a 100 Hz
    sine wave when sampling at 100, 200 and 2000
    samples/sec.

80
Experiment 2sample quiz questions
  • For a -5 to 5 volt range, what is the resolution
    for a N-bit converter where N 10, 12 and 16?
  • Remember as the resolution becomes larger, the
    measurements become more coarse
  • As the DAC resolution gets smaller, measurements
    become more accurate

81
Next week
  • Kirchoff's laws
  • Filters
  • High pass filter
  • Low pass filter
  • RLC circuits
Write a Comment
User Comments (0)
About PowerShow.com