Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
22 views59 pages

Chapter 5 - Analysis

The document discusses measurement systems and measurement chains. It covers topics like conditioning circuits, noise reduction, acquisition, data analysis, modeling, and the attributes of error such as systematic and random errors. Examples are provided around systematic error, estimating central tendency and dispersion, and estimating error probabilities.

Uploaded by

cesarinigillas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views59 pages

Chapter 5 - Analysis

The document discusses measurement systems and measurement chains. It covers topics like conditioning circuits, noise reduction, acquisition, data analysis, modeling, and the attributes of error such as systematic and random errors. Examples are provided around systematic error, estimating central tendency and dispersion, and estimating error probabilities.

Uploaded by

cesarinigillas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

Measurement systems

Lecturer: Andras Kis


Chapter 5: Data Analysis
Measurement chain
Data analysis (recording, averaging, etc.)

U0
Rload
Conditioning
Uout
Rsensor
0V

U0=5 V
Noise reduction Sensor
Modeling

Uout
Acquisition
(Analog – digital conversion)
Arduino UNO board Conditioning circuit 4
Measurement chain

Chapter 1 Chapter 3
Chapter 4
Noise
Sensor Conditioning reduction Acquisition Action
and signal
processing

Data analysis
Modeling
Comparison

Chapter 2 Chapters 5 and 6

5
The attributes of error
• Let x0 be the real value and x the measured value
• Error:
- Absolute

x − xo
- Relative ∆r x =
x0

• Nature of the error


- Systematic – known origin, is repeatable, can be corrected
- Random – stochastic phenomena (noise), cannot be corrected

• Magnitude of the error


- Maximal error – absolute limits
- Probable error – limits associated with a given probability 6
Systematic error - example

• Voltage measurement:
Rin
- Rs – internal resistance of the
= um = us
voltage source (sensor) Rin + Rs
- Rinput – input resistance of the 1MΩ
= = 0.91× us
instrument (voltmeter) 100kΩ + 1MΩ

7
Systematic error - example
Measured Values
• Offset
um
um = u + ε ε
u

ε: systematic error

u
Actual Values

• Non-linearity Actual response


Idealised response
- Known and can be
corrected

8
Examples of random error
• Electronic noise
• Interference: EM fields, ground loops
• Temperature changes, motion of conductors
• Drift Example: temperature in the room

• Hysteresis
• Repeatability
22
20
18

10 20 30 40 50 60 70 80 90 100
Measurement no.

9
Error estimate
• Reporting a measurement result
x Central tendency (usually
x= x ± ∆x ( p = po ) average, mean value)
∆x Incertitude
p probability that the value x is in the range x − ∆x, x + ∆x

How to estimate the error:


10 - Collect samples
x, m/s2

- Estimate the central tendency


- Estimate the dispersion interval
- Estimate the incertitude and its
probability
9.5
0 30 50 30 40 50 60 70 80 90 100

Measurement N
10
Estimating the central tendency
• Average (arithmetic mean)

1
x=
N
∑x
i
i

10

1
a, m/s2
a=
N
∑ i
a
i
= 9 . 8 m / s 2
9.8

9.5
0 30 50 30 40 50 60 70 80 90 100

11
Other estimates of the central tendency
• Geometric mean 1
 N  N
- Sensitive to extreme values mg =  ∏ xi 
 i =1 
• Harmonic mean N
- Sensitive to extreme values mh = N
1

i =1 xi
• Median
- Less sensitive to extreme values
xN /2 + xN /2+1
Sort xi (measurement results) Median = N even
2
from lowest to highest
Median = xN /2 N odd
Example:
Average (2,2,3,4,3,10,10)=4.9
Median (2,2,3,4,3,10,10)= Median (2,2,3,3,4,10,10) = 3 12
Example
• http://www.lohnrechner.bfs.admin.ch/Pages/SalariumWizard.aspx?lang=fr

13
14
Distribution of measurements
• Central tendency
- No information on the distribution
• Histogram
- Graphical representation of the distribution of measurement
results:

Number of samples
- Central, peak value
- Range of values
- Dispersion
- Presence of extreme values
- Distribution profile
Same average

15
Histogram - example
• 400 samples with a resistance of 100 Ω are measured using an
ohm-meter
- The range of results is divided in k classes: x axis
- Number of results in each class: y axis
- Number of samples: N
- Good choice for the number of classes k = N
Frequency
20 Width of a
histogramme
class

10

Lower limit Upper limit


Central
99,6 99,8 100 100,2 100,4 100,6 R, Ω value
16
Examples of histograms

Symmetric: walking speed of young people

Nonsymmetric: duration of walking periods


during the day

Symmetric: walking speed of young people


and seniors

17
Estimate of dispersion
1 N

∑ ( xi − x )
2
• Variance Var ( x)
=
N i =1

1 N
• Standard deviation
= σ Var ( x)
= ∑ i
N i=1
( x − x ) 2

• For N<30 or a limited number of measurements


1 N
=σ ∑
N − 1 i=1
( xi − x ) 2

• Other estimates of dispersion:


x−x
- z score z =
σ
- Range: xmax - xmin
19
Error estimate (repeated)
• Reporting a measurement result
x Central tendency (usually
x= x ± ∆x ( p = po ) average, mean value)
∆x Incertitude
p probability that the value x is in the range x − ∆x, x + ∆x

How to estimate the error:


10 - Collect samples
x, m/s2

- Estimate the central tendency


- Estimate the dispersion interval
- Estimate the incertitude and its
probability
9.5
0 30 50 30 40 50 60 70 80 90 100

Measurement N
20
Model for dispersion
• Normal distribution (Gaussian distribution)
2
1  x− x 
1 −  
frequency f ( x) = e
2 σx 

σ x 2π
x

12 a, m/s2

histogram
8
0 50 100
20

10

Frequency Measurement N

21
Measuring dispersion
a, m/s2

12

±σx = ± 0.9m/s2

x = 9.8m / s 2 9.8

0 50 100
20

10

Measurement N

1 N
σ 2
x ∑
N − 1 i=1
( xi − x ) 2 0.9m / s 2
=

22
Source: wikipedia

23
Error Probability
20
• Frequency 2
Frequency N samples
1  x− x 
1 − 
2 σx 

f ( x) = e 10
σ x 2π
• Cumulative frequency
x 0 7.5 8 8.5 9 9.5 10 10.5 11 11.5 12 12.5
100%
F ( x) = ∫
−∞
f ( x' )dx' Cumulative frequency

F(a)
50%
• Probability
a
7.5 8 8.5 9 9.5 10 10.5 11 11.5 12 12.5
x

a
P(b ≤ x ≤ a ) = ∫ f ( x)dx = F (a ) − F (b)
b
Standard normal distribution
x−x
=z , σz 1
=
1  x− x 
2 σx
1 −   1 − 12 z 2
( x) p=
f= ( x) e
2 σx 
( z ) p=
f= ( z) e
σ x 2π 2π
0.4
P(− z ) = 1 − P( z )
68%

Example P(-1<z<1)=0.84-0.16=0.68
0.2
P(1) = 0.84
P(−1) = 0.16

0
6
x
µ x−x
−3σ −2σ -σ σ 2σ 3σ z=
σx 25
-3 -2 -1 0 1 2 3
Interactive Example
• http://www.mathsisfun.com/data/standard-normal-
distribution-table.html

26
TE, Ph.Robert

Systèmes de mesure Chapitre 4-27


Error and its probability
a, m/s2
68% of samples 10

x = 9.8m / s 2
±σx 9.8
±2σx

95% of samples
9.5 10 20 30 40 50 60 70 80 90 100
±3σx : 99.7% of samples
20

15
25

10

0
N samples
σx: 0.11m/s2

Incertitude = σ with a confidence level of 68 %


Incertitude = 2 σ with a confidence level of 95 %
Incertitude = 3 σ with a confidence level of 99 %
Systèmes de mesure Chapitre 4-29
Precision and accuracy
• Precision (also reproducibility, repeatability) – degree to which
repeated measurements under unchanged conditions show
the same results
• Accuracy – closeness of the measurement result to the true
value
Neither precise, nor accurate Not accurate, precise

Measured value
True value

accurate, not precise accurate and precise


Estimation of systematic and random error
• Systematic error:
- estimate the central tendency: average, median
- compare to a reference system
- hypothesis test (more on this in chapter 6)

• Random error:
- Estimation of the dispersion: standard deviation
- Estimation of the probability of the error

31
Example: temperature measurement in a room
T in degrees

x = Taverage=27oC

1 N
29
=σx ∑
N i=1
( x
=i − x ) 2

±σx 27 = 0.9 oC
25 T in the room µ= 25oC
(known)

10 20 30 40 50 60 70 80 90 100
N Measurement
Systematic error: 2oC
Random error: ± σx = ± 0.9oC (p=0.68) standard
± 2σx = ± 1.8oC (p=0.95)
± 3σx = ± 2.7oC (p=0.99)
Example
Un Let us consider Johnson noise
1mV from a 20 MΩ resistor at
t
room temperature measured
in a bandwidth of 10 MHz.
What is the probability of
measuring a voltage above
___
2
u = 4k BTR Power spectral density of 1mV at any given time at
n voltage variance
room temperature?
___
U = 4k BTR ⋅ B= 3.23 × 10−5 V 2
2
n

___ ∼29%
=U 1.79
= mV σ
2
n

x − µ 1mV − 0
z = = 0.56 z = 0.56
σ 1.79mV 33
Error estimate - repeated
• Reporting a measurement result
x Central tendency (usually
x= x ± ∆x ( p = po ) average, mean value)
∆x Incertitude
p probability that the value x is in the range x − ∆x, x + ∆x

How to estimate the error:


10 - Collect samples
x, m/s2

- Estimate the central tendency


- Estimate the dispersion interval
- Estimate the incertitude and its
probability
9.5
0 30 50 30 40 50 60 70 80 90 100

Measurement N
35
Estimate of dispersion - repeated
1 N

∑ ( xi − x )
2
• Variance Var ( x)
=
N i =1

1 N
• Standard deviation
= σ Var ( x)
= ∑ i
N i=1
( x − x ) 2

• For N<30 or a limited number of measurements


1 N
=σ ∑
N − 1 i=1
( xi − x ) 2

• Other estimates of dispersion:


x−x
- z score z =
σ
- Range: xmax - xmin
36
Model for dispersion - repeated
• Normal distribution (Gaussian distribution)
2
1  x− x 
1 −  
frequency f ( x) = e
2 σx 

σ x 2π
x

12 a, m/s2

histogram
8
0 50 100
20

10

Frequency Measurement N

37
Error and its probability - repeated
a, m/s2
68% of samples 10

x = 9.8m / s 2
±σx 9.8
±2σx

95% of samples
9.5 10 20 30 40 50 60 70 80 90 100
±3σx : 99.7% of samples
20

15
25

10

0
N samples
σx: 0.11m/s2

Incertitude = σ with a confidence level of 68 %


Incertitude = 2 σ with a confidence level of 95 %
Incertitude = 3 σ with a confidence level of 99 %
Increasing the precision
Example: measurement of gravity
using an accelerometer

First approach:
- Acquire 500 points
- Calculate average and s.dev.:
Individual measurement:
a= a ± σ a (p= 0.68)

Error for an individual measurement


1 N
σa
N
∑ i
( a
=
i =1
− a ) 2
0.1m / s 2

a = 9.81 m / s 2 ± 0.1m / s 2 (p = 0.68) 0 100 200 300 400 500

39
Increasing the precision
Example: measurement of gravity
using an accelerometer
Second approach:
- Take those same 500 points
- During acquisition or analysis,
bunch the points in groups of C C
V V
for example 40 points C C
- Calculate the averages ______
V V
for every group separately -> aN =40
- Calculate the average of group
averages ___
_____

aN = a
σ 0.1
σ ____= = = 0.016m / s 2
aN N 40 0 100 200 300 400 500

_____
Error of the «local» average
____ ___
σa
aN = aN ± σ ____ = a ± «Local» average
aN N 40
Estimation of the local average
• Calculating the local average allows us to reduce the random
error and increase the precision of the measurement
• Compare Var ( x) and Var ( x )
• N – number of points in a subset, M - number of subsets,
N×M – total number of points
1 M
1 N ⋅M
( x j − x ) , =x M ⋅ N ∑ x=k x
2
Var ( x=
)
M

j 1= k 1
2 2 2
1 M 1 N  1 1   1 1  
Var ( x )
= ∑  N ∑
M j 1=
=
=
i 1
x ji − x 

∑ ∑ ji
M N 2 j  i
x
= − Nx 

∑ ∑ ( ji ) 
M N 2 j  i
x − x

 =0, because the samples are independent


 
1 1  (x − x) + 1 1  2
( ji ) ( jl )  M N 2 ∑ ∑ ( ji ) 

2
∑ ∑ ji
M N2 j  i
∑i ≠l
x =
− x ⋅ x − x
j  i
x − x

 
1 1 1 1 Var ( x)
∑( ) M N 2
2
x =
− x M ⋅ N ⋅ Var
= ( x )
M N2 k N
41
Precision of the average

Increasing N -> increasing precision (decreasing dispersion)

σ
σx =
N

43
Question

In practice, you would not take 1000 points but you would have a
sensor that gives a single reading with an error σ with probability
of 68% (this is usually specified by the manufacturer).

How many readings N do we need in order to estimate the


average value with error δ and associated probability p?

45
Frequency
Gaussian distribution
Population
s. dev: σ
single reading
(Population average)
µ
Estimated average x=
∑x i

N
s dev of the single reading σ
(Population s.dev) σ Estimated s.dev σx =
N
σx

δ
α
–σ µ +σ x
Population
average
• For a normal distribution 68% of the points are between ± σ
• standard deviation of the average < standard deviation of the population (single
measurement)
• Error of the estimation = standard deviation of the average
• α - probability that the difference between population average (single reading ) and the
estimated average is not more than δ 46
Confidence interval of the average
 σ σ 
1⋅σ x confidence level of 68% CI 68% x −
= , x+ 
 N N 
 σ σ 
2 ⋅σ x confidence level of 95% CI 95% x − 2
= , x +2 
 N N 

z ⋅σ x confidence level of p(z) (see in the table)


 σ σ 
CI p % =
 x − zα , x + zα 
 N N
x−µ
z= α=(1-p)/2
σx

z
47
TE, Ph.Robert

Systèmes de mesure Chapitre 4-48


Example: error of a gyroscope
• In order to estimate the error of a gyroscope reading, we carry
out 36 identical tests. They consist of turning the gyroscope by
360°, taking the angular velocity readings while the gyroscope
is turning and then integrating the velocity (which should give
us the total angle or 360°)
• We= get x 359.8deg;
= σ 2.4deg

• Calculate the 95% confidence interval for this test (the interval
in which the value of the next test with 36 readings would be
with a 95% probability)

49
95% α=2.5%
2.5%

-∞ -z z

σ 2.4
x ± z2.5% 359.8 ± 1.96
= 359.8 ± 0.8deg
=
N 36

There is a probability of 95% of getting the next average


between 359.0 and 360.6 deg (358.8 ± 0.8)

50
Normal distribution of the average
• If the standard deviation of an individual measurement is
known and if the total number of measurements N > 30, we
use the normal distribution

σ σ
• Confidence interval: x − zα < µ < x + zα
N N

α=(1-p)/2
α Confidence α
p: probability
interval

σ σ 1 − 12 z 2
x − zα x + zα with p ( z ) = e
N N 2π
Student distribution of the average
• Proposed William Sealy Gosset in 1908
• If the standard deviation of an individual measurement is
estimated or if the total number of measurements N < 30, we
use the Student distribution
• Confidence interval

σ σ
x − tα < µ < x + tα
N N
Student distribution of the average
probability [For normal distribution,
we had p(z)]
ν > 30

ν=5

ν=1

+∞

y −1 − x
Γ( y ) = x e dx
0

ν : number of degrees of freedom = N – 1 where N is the number


of measurements
Sample size – normal distribution
• How many points should we acquire for estimating the average with
an error δ and probability p?

• Case 1: we know σ (the sdev. of a single measurement). We


therefore use the normal distribution
1− p σ
α= x = µ ± δ = µ ± zα
2 N

σ
1. Define the error: δ= x − µ= zα
N
2. Find z from α (table)
2
σ
3. Number of points N is then: N = zα2  
δ
Example
• Two sensors have noisy outputs with U1 = 9.8 V (σ1 = 1V) and
U2 = 9.35 V (σ2 = 1.32 V). Calculate the smallest number of
samples so that values of U1 and U2 are within 1% of the actual
value with a confidence of 90% and 99%?
2
σ
2 z5% = 1.65; z0.5% = 2.58;
N=z  
α
δ δ1 = 0.098V, δ2 = 0.0935V

90%:
N1=1.652(12/0.0982)=283 N2=1.652(1.322/0.09352)=543

99%:
N1=2.582(12/0.0982)=693 N2=2.582(1.322/0.09352)=1327
57
Sample size – Student distribution
• How many points should we acquire for estimating the average with
an error δ with probability p?
• Case 2: we don’t know σ (the s. dev. of a single measurement or in
other words we don’t know the specs of the sensor)
1− p
α=
2
1. Choose an initial sample size N’ by performing N’ measurements
2. Estimate x and σ
3. Find tα from the table with ν=N’-1
4. Optional: calculate error δ’(the error for this set of measurements):
σ
δ′ =tα
N
5. Calculate desired sample size N: 2
2σ
N = tα  
δ
Example
• Based on 6 measurements, the average melting temperature
of tin is estimated to be 232.26 °C with a standard deviation of
0.14°C. If we use this value as the real melting temperature,
calculate the maximum error with a confidence level of 98%.
How many measurements should we make to have an error of
0.05 °C?
N = 6, σ = 0.14, t0.01 = 3.365 (for ν = N - 1=5)

 σ   0.14 
δ t0.01
=   3.365
=   0.19 
C Error = 0.19oC (p=98%)
 N  6 

2
 0.14 
2
N = 3.365   = 89
 0.05 
59
ν=n-1
Precision of digital instruments
ua = a ⋅ um + b
Displayed ua + ∆ua = (a + ∆a )um + b + ∆b
values: ua

Measured
values: um

∆ua = ∆a ⋅ um + ∆b
Error: ±(%reading+n digit)

Error on the gain Error on the offset


Systèmes de mesure 62
Precision of digital instruments
• Error: ± (% reading + n digit) -
- for example BBC M2030: ± (0.1%reading+1d)

For displayed value of 4.00 V:


1d : 0.01V
0.1%reading = 0.1%×4V = 4mV
Error = ±(4mV + 0.01V) = ±0.014V
Relative error = ±0.014/4 = 0.35%

63
Precision of digital instruments
• Error: ± (%reading + %FS)
- for example Philips 2514 voltmeter: ± (0.1%reading+0.02%FS)

For displayed value of 4.000 V:


0.02%FS (=10V) = 0.002 V
Error: ±(0.1% × 4V + 0.002V) = ±0.006V

Relative error: ±0.006V/4V = 0.15%

64
Key points
• Determining the precision of a measurement and its
probability from the systematic and random errors
• Estimation of the systematic error from the central tendency
and the random error from the dispersion
• Using normal and Student distributions for modelling the
dispersion
• Calculating the error on the average
• Estimating the confidence interval for an average
• Estimating the sample size

65

You might also like