Download PH15010 - More Data Handling

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Utility frequency wikipedia , lookup

Multidimensional empirical mode decomposition wikipedia , lookup

Fault tolerance wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Transcript
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
VApplied Readings  V
 1
IMeas ured Readings  mA
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
IMeas ured 2.45  10
3
3
3.7  10
4
4.92  10
3
3
A
Resistor Example from Lecture
4 - Plotting
3
4.92 10
0.006
0.004
IMeasured
0.002
0
0
0
0
1
2
VApplied
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
3
6.15510
0.008
0.006
IMeasured
IHi
0.004
ILo
ITheory ( vv )
0.002
0
0
0
0
1
2
3
VApplied  VApplied  VApplied  vv
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 10
14
14
4 10
6 10
Frequency (Hz)
14
8 10
15
1 10
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·105
1.49·107
• Data in input table as
before
• Extract Columns
Power Law Example #2
- Normal Plot
7
1.491 10
7
1.5  10
7
1  10
YVal
6
5  10
4.56
0
0
0
1
2
3
4
XVal
Useless – No Information
5
5
Power Law Example #3
- Format y scale log
7
1.491 10
8
1  10
7
1  10
6
1  10
5
1  10
YVal 1  104
3
1  10
100
10
4.56
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
s lope( XVal  logYVal)
A
e
intercept ( XVal logYVal )
A  4.56
• Display A&B
• Create model
B 3
model( x)
• Take log of y data
• Calculate slope &
intercept
B x

Ae
Power Law Example #5
Compare model vs data
5
2.142 10
6
1  10
5
1  10
4
1  10
YVal
model ( x)
3
1  10
100
10
4.56
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