0% found this document useful (0 votes)
31 views18 pages

Error PDF

1) Round off error occurs when representing a number approximately and can lead to inaccuracies, as seen with the Patriot missile system clock. 2) Regression analysis in Excel can be used to model thermal expansion data and predict values within experimental error. 3) Truncation error results from approximating integrals or derivatives using a finite number of terms or intervals and can be estimated.
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)
31 views18 pages

Error PDF

1) Round off error occurs when representing a number approximately and can lead to inaccuracies, as seen with the Patriot missile system clock. 2) Regression analysis in Excel can be used to model thermal expansion data and predict values within experimental error. 3) Truncation error results from approximating integrals or derivatives using a finite number of terms or intervals and can be estimated.
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/ 18

Approximations and Error

Engineering and Numerical Analysis

Department of Electrical Power

Dr. Hayder Yaqoob


2020-2021
1
Round off Error

• Caused by representing a number approximately

1
 0.333333
3
2  1.4142...

2
Problem with Patriot missile
• Clock cycle of 1/10 seconds was
represented in 24-bit fixed point
register created an error of 9.5 x 10-8
seconds.
• The battery was on for 100
consecutive hours, thus causing an
inaccuracy of

8 s 3600s
 9.5  10  100hr 
0.1s 1hr
 0.342s
3
Problem (cont.)

• The shift calculated in the ranging system of the missile was 687
meters.
• The target was considered to be out of range at a distance greater
than 137 meters.

4
Find the contraction in the
diameter
Tc

D  D   (T )dT
Ta

Ta=80oF; Tc=-108oF; D=12.363”

α = a0+ a1T + a2T2


5
Thermal Expansion Coefficient vs
Temperature
T(oF) α (μin/in/oF)
-340 2.45
-300 3.07
-220 4.08
-160 4.72
D  D  T
-80 5.43
0 6.00
40 6.24
80 6.47

6
Regressing Data in Excel
(general format)

Alpha ( in/in/ F)
8.00

o 4.00

0.00
-400 -200 0 200

T ( o F)

α = -1E-05T2 + 0.0062T + 6.0234


7
Observed and Predicted Values

α = -1E-05T2 + 0.0062T + 6.0234


T(oF) α (μin/in/oF) α (μin/in/oF)
Given Predicted
-340 2.45 2.76
-300 3.07 3.26
-220 4.08 4.18
-160 4.72 4.78
-80 5.43 5.46
0 6.00 6.02
40 6.24 6.26
80 6.47 6.46
8
Regressing Data in Excel
(scientific format)

Alpha ( in/in/ F)
8.00

o 4.00

0.00
-400 -200 0 200

T ( o F)

α = -1.2360E-05T2 + 6.2714E-03T + 6.0234


9
Observed and Predicted Values

α = -1.2360E-05T2 + 6.2714E-03T + 6.0234


T(oF) α (μin/in/oF) α (μin/in/oF)
Given Predicted
-340 2.45 2.46
-300 3.07 3.03
-220 4.08 4.05
-160 4.72 4.70
-80 5.43 5.44
0 6.00 6.02
40 6.24 6.25
80 6.47 6.45
10
Observed and Predicted Values
α = -1.2360E-05T2 + 6.2714E-03T + 6.0234
α = -1E-05T2 + 0.0062T + 6.0234
T(oF) α (μin/in/oF) α (μin/in/oF) α (μin/in/oF)
Given Predicted Predicted
-340 2.45 2.46 2.76
-300 3.07 3.03 3.26
-220 4.08 4.05 4.18
-160 4.72 4.70 4.78
-80 5.43 5.44 5.46
0 6.00 6.02 6.02
40 6.24 6.25 6.26
80 6.47 6.45 6.46
11
Truncation error
• Error caused by truncating or approximating a mathematical
procedure.

Taking only a few terms of a Maclaurin series to


x
approximate e 2 3
x x
e  1  x    ....................
x

2! 3!
If only 3 terms are used,
 x 2

Truncation Error  e  1  x  
x

 2! 

12
Another Example of Truncation Error

Using a finite x to approximate f (x)


f ( x  x)  f ( x)
f ( x) 
x

secant line
P

tangent line

Figure 1. Approximate derivative using finite Δx

13
Another Example of Truncation Error

Using finite rectangles to approximate an


integral.
y

90

2
y=x
60

30

0 x
0 1.5 3 4.5 6 7.5 9 10.5 12

14
Example 1 —Maclaurin series

1 .2
Calculate the value of e with an absolute
relative approximate error of less than 1%.
1.2 2 1.2 3
e 1.2
 1  1 .2    ...................
2! 3!
n
e 1 .2
Ea a %
1 1 __ ___
2 2.2 1.2 54.545
3 2.92 0.72 24.658
4 3.208 0.288 8.9776
5 3.2944 0.0864 2.6226
6 3.3151 0.020736 0.62550

6 terms are required. How many are required to get


at least 1 significant digit correct in your answer?15
Example 2 —Differentiation

f ( x)  x 2 f ( x  x)  f ( x)
Find f (3)
for using f ( x) 
x
and x  0.2
f (3  0.2)  f (3)
f ' (3) 
0 .2
f (3.2)  f (3) 3.2 2  32 10.24  9 1.24
 x  0.1    6.2
0 .2 0.2 0 .2 0. 2

The actual value is


f ' ( x )  2 x, f ' (3)  2  3  6

Truncation error is then, 6  6.2  0.2


Can you find the truncation error with 16
Example 3 — Integration

Use two rectangles of equal width to


approximate the area under the curve for
f ( x)  x 2 over the interval [3,9]
y
9
90
x
2
dx
3
2
y=x
60

30

0 x
0 3 6 9 12

17
Integration example (cont.)

Choosing a width of 3, we have


9

  (6  3)  ( x 2 ) (9  6)
2 2
x dx ( x )
x 3 x 6
3
 (3 2 )3  (6 2 )3
 27  108  135
Actual value is given by
9 9
 x 3   93  33 
3 x dx   3    3   234
2

 3  
Truncation error is then
234  135  99
Can you find the truncation error with 4 rectangles?
18

You might also like