PH15010 - More Data Handling

Download Report

Transcript PH15010 - More Data Handling

PH15720
Laboratory Techniques An Introduction to MATHCAD
Introduction
•
•
•
•
•
Review of Last Week
Arrays, Vectors and Matrices
Simple matrix & vector maths
Statistics
Plotting & analysing data with vectors
Review of Last Week
•
•
•
•
•
Entering data with the Input Table
Extracting columns from a matrix
Creating simple X-Y graphs
Formatting graphs
Slope & Intercept
Resistor Example from Lecture
4 #1
Readings
0
0
1
2
3
4
1
0
1
2
3
4
 0 
Readings
V
 1 
IMeasured Readings
mA
VApplied
0
1.23
2.45
3.7
4.92
Input table as
before
Extract Voltage
to vector & apply
units
Same for current
Resistor Example from Lecture
4 #2
• Check on values of vectors
0
1
VApplied  2 V
0
1.23  10
3
IMeasured  2.45  10
3
3
3.7  10
4
4.92  10
3
3
A
Resistor Example from Lecture
4 - Plotting
 03
4 .9 21
0 .0 06
0 .0 04
IMeasu red
0 .0 02
0
0
0
0
1
2
VApp lied
3
4
4
Error Bars #1
• Add to graph to show uncertainty in y
values.
• Create vector of ‘High’ values
• Create vector of ‘Low’ values
• Add as traces to y-axis
• Add extra x-axis variables
• Format as error bars
Error Bars #2
• Use vector maths to get ‘high’ and ‘low’
vectors
Error
10 %
IHi
(1
Error) IMeasured
ILo
(1
Error) IMeasured
Huge error for
illustration only
Error Bars #3
• Add to graph
 03
6 .1 551
0 .0 08
0 .0 06
IMeasu red
IHi
0 .0 04
ILo
ITh eory ( v v )
0 .0 02
0
0
0
0
1
2
3
VApp lied VApp lied VApp lied v v
4
5
5
Error Bars #4
• Format traces as Error
Error type
Hide Arguments
&
Show Legend
Error Bars – Completed Graph
Pre-Processing Data
• Use vector maths to pre-process data
before graphing
• Use knowledge of physics to get data into
a straight line format
Photoelectric Effect #1
• Photoelectrons emitted from metal surface
under illumination
• Illuminate metal with light of different
wavelength
• Measure energy of emitted electrons
(Stopping Potential)
• Keller, Gettys & Skove p976
The Photoelectric effect
hv
e-
VStop
A
Photoelectric Effect #2
• Equation given in terms of frequency
• Experimental data given in wavelength 
convert
Stopping
Potential
Electronic
Charge e
h
Vs
(
q
Planck’s constant
0 )
Applied
Frequency
Threshold
Frequency
Converting Wavelength to
Frequency

c
l
- =frequency (Hz)
- c= velocity of light (3x108m/s)
- l= wavelength (m)
- Valid for all electromagnetic radiation
Photoelectric effect #2
• Use resource centre for physical constants
• Watch for confusion of e & q
• Useful functions (look-up in help system)
– slope(vx,vy)  slope of line
– intercept(vx,vy)  intercept with axis
Stopping Potential Equation
Vs
•
•
•
•
•
h
q
(
0 )
Vs  Stopping Potential
  Frequency of radiation
0  Threshold frequency
h  Planck’s constant
q  Electron Charge
Photoelectric Effect #3
z
3
1
Curves for two
different metals
shown
0
Stopping Potential (V)
2 .5
2
1 .5
Slope of lines =
h/q
1
0 .5
0
0
14
2 1 0
14
14
4 1 0
6 1 0
Freq uency (Hz)
14
8 1 0
15
1 1 0
Intercept with x-axis (Vs=0) at Threshold
Frequency (Different for each metal)
Power Law
• Systems in the form:
Y=AeBx
• Examples:
– Cooling
– Radioactive Decay
– Compound Interest
• B is time constant or rate constant
Power Law
• Take logs of Y values
 straight line
B x

ln A e
expand x
• intercept gives ln(A)
• slope gives B
ln( A)
B x
Power Law Example #1
Data
0
0
1
2
3
4
5
XVal
 0
Data
YVal
 1
Data
1
0
1
2
3
4
5
4.56
91.59
1840
36950
7.42·10 5
1.49·10 7
• Data in input table as
before
• Extract Columns
Power Law Example #2
- Normal Plot
 07
1 .4 911
7
1 .5 1 0
7
1 1 0
YVal
6
5 1 0
4 .5 6
0
0
0
1
2
3
4
XVal
Useless – No Information
5
5
Power Law Example #3
- Format y scale log
 07
1 .4 911
8
1 1 0
7
1 1 0
6
1 1 0
5
1 1 0
YVal 1  1 04
3
1 1 0
1 00
10
4 .5 6
1
0
0
1
2
3
4
XVal
• Straight line => power law
• Need to get slope & intercept
5
5
Power Law Example #4
logYVal
ln( YVal)
B
slope ( XVal logYVal)
A
e
intercep t( XVal log YVal)
A  4.56
• Display A&B
• Create model
B 3
model( x)
• Take log of y data
• Calculate slope &
intercept
B x
A e
Power Law Example #5
Compare model vs data
 05
2 .1 421
6
1 1 0
5
1 1 0
4
1 1 0
YVal
mo d el( x)
3
1 1 0
1 00
10
4 .5 6
1
0
0
1
2
3
XVal x
4
5
5
Review of Data Handling
#1
•
•
•
•
•
Use of Input Table
Column Extract Operator M<>
Add units if needed
Plot vector vs vector
Add Error bars
Review of Data Handling
#2
• Extract Information from data
– slope()
– intercept()
• Pre-processing
• Handling power law data
• Create model & compare with data