Applied Numerical Methods (SME 3023) : Ua Uaha Deaha Deaha Ayhay
Applied Numerical Methods (SME 3023) : Ua Uaha Deaha Deaha Ayhay
(SME 3023)
PROJECT 1
01 September 2010(MONEDAY)
(Signature)
____________________________________
DR.KAHAR OSMAN
1
SME 3023 Project 1
An accelerometer measures acceleration and then data can be used to obtain velocity
and displacement. Suppose a vehicle starts from rest at time t = 0 and its measured
acceleration is given in the following table:
Time(s) 0 1 2 3 4 5 6 7 8 9 10
Acceleration 0 2 4 7 11 17 24 32 41 48 51
(m/s2)
You can integrate the data to obtain velocities and displacements. Choose a suitable
numerical method and justify your choice. Then:
a) estimate the velocity at times t = 1, 2, 3, ...10 s.
b) Estimate the distance travelled by the vehicle at 10 s.
c) estimate the distance at times t = 1, 2, 3, ... 10 s.
d) Estimate the acceleration at 0.5, 1.5, 5.5 and 8.5 s. You can use computer program to
aid your work.
Once you have completed this part, do the followings:
a) From the displacements data, find its derivatives to obtain velocities and second
derivatives to obtain accelerations. Choose a suitable numerical method and justify your
choice.
b) Compare your answers to part one. Comments on the accuracy and reliability of your
answers.
Hand in a short report containing title page, table of contents, results, discussions and
conclusions. Detail explanation is needed if you use any software/program. Please
submit the softcopy as well or show the samples of calculations. Please organize your
data properly.
2
TABLE OF CONENTS
TITLE-------------------------------------------------------------------------Page. No
1.1 Results---------------------------------------------------------------------------------4
1.8 Errors---------------------------------------------------------------------------------22
1.7.1 Acceleration -------------------------------------------------------------------------22
1.7.2 Velocity------------------------------------------------------------------------------22
1.7.3 Distance------------------------------------------------------------------------------23
2.0 DISCUSSION-----------------------------------------------------------------------24
3
1. RESULTS
1.1 Acceleration equation.
i. Numerical Method
- Polynomial regression method to find an equation for the acceleration based on the given
data.
- polynomial regression method
time(sec) acceleration
(m/ )
0 0
1 2
2 4
3 7
4 11
5 17
6 24
7 32
8 41
9 48
10 51
n 11 m 2
5 21.54545
55 237
385 8665
3025 1798
25333 14726
220825 126196
1978405 1114874
18080425
167731333
4
-Solving usingHGauss-Jordan Method
1 0 0 36 648 -1.05595
0 1 0 -57.2 -894 2.064568
0 0 1 15 175 0.350816
0 0 0 6177.6 123552 -380.4
0 0 0 123552 2512224 -8340
1 0 0 0 -72 1.160833
0 1 0 0 250 -1.45765
0 0 1 0 -125 1.274476
0 0 0 1 20 -0.06158
0 0 0 0 41184 -732
1 0 0 0 0 -0.11889
0 1 0 0 0 2.985823
0 0 1 0 0 -0.94726
0 0 0 1 0 0.293898
0 0 0 0 1 -0.01777
5
x(sec)
0 0 464.2066 0.014132454
1 2 422.1157 0.038341948
2 4 382.0248 0.01705845
3 7 343.9339 0.036405785
4 11 307.843 0.005071719 0.277941
5 17 273.7521 0.057554409 0.999802
6 24 241.6612 0.021719685 0.999901
7 32 211.5702 0.258463442
8 41 183.4793 0.027412763
9 48 157.3884 0.095914709
10 51 133.2975 0.045933062
∑ 237 3121.273 0.618008427
So the polynomial equation of the acceleration would be:
a(t) = -0.01777t4 + 0.2939t3 - 0.94726t2 + 2.98582t - 0.11888
time(sec) acceleration
(m/ )
0 -0.11888
1 2.19581
2 4.1306
3 6.80917
4 10.92872
5 16.75997
6 24.14716
7 32.50805
8 40.83392
9 47.68957
10 51.21332
6
0 0
1 1.128191
2 4.269681
3 9.64181
4 18.37215
5 32.07194
6 52.4095
7 80.68364
8 117.3971
9 161.8301
10 211.6134
0 0 0
1 2 1
2 4 4
3 7 9.5
4 11 18.5
5 17 32.5
6 24 53
7 32 81
8 41 117.5
9 48 162
10 51 211.5
- Sample calculation
- apply trapezoidal Rule to the acceleration data , we find the area at each time
which will represents the velocity travelled at that time
At t=1
At t=2
At t=3
- Polynomial regression method to find an equation for the velocity based on the
integration of the acceleration equation.
7
0 0
1 1
2 4
3 9.5
4 18.5
5 32.5
6 53
7 81
8 117.5
9 162
10 211.5
n 11 m 2
5 62.77273
55 690.5
385 95658.25
3025 5672
25333 48880
220825 434525
1978405 3948214
18080425
167731333
8
1 0 -15 -189 -1977 -38.1136
0 1 10 92.8 856 20.17727
0 0 858 12870 150150 2517.5
0 0 12870 199227.6 2375802 38667.9
0 0 150150 2375802 28788474 458100.5
1 0 0 36 648 5.898601
0 1 0 -57.2 -894 -9.16422
0 0 1 15 175 2.934149
0 0 0 6177.6 123552 905.4
0 0 0 123552 2512224 17538
1 0 0 0 -72 0.622378
0 1 0 0 250 -0.78089
0 0 1 0 -125 0.735723
0 0 0 1 20 0.146562
0 0 0 0 41184 -570
1 0 0 0 0 -0.37413
0 1 0 0 0 2.679196
0 0 1 0 0 -0.99432
0 0 0 1 0 0.423368
0 0 0 0 1 -0.01384
x(sec)
0 0 3940.415 0.139973
1 1 3815.87 0.518795
2 4 3693.324 0.029751
3 9.5 3572.779 0.226125
4 18.5 3454.233 0.264149 0.60399
5 32.5 3337.688 0.004245 0.999921
6 53 3223.143 0.173367 0.99996
7 81 3110.597 0.414666
8 117.5 3000.052 1.6E-06
9 162 2891.506 0.941393
10 211.5 2784.961 0.205962
∑ 690.5 36824.57 2.918427
9
So the polynomial equation of the velocity would be:
v(t) = t4+ t3 t2 +2.679196t -0.37413
0 -0.37413
1 1.720274
2 4.172486
3 9.024474
4 17.98605
5 32.43485
6 53.41637
7 81.64395
8 117.4987
9 161.0297
10 211.9538
0 0
1 0.737102
2 3.563508
3 9.88569
4 22.98601
5 47.69055
6 90.03697
7 156.9423
8 255.871
9 394.5022
10 580.3985
10
1.3.2 Numerical Method
0 0 0
1 1 0.5
2 4 3
3 9.5 9.75
4 18.5 23.75
5 32.5 49.25
6 53 92
7 81 159
8 117.5 258.25
9 162 398
10 211.5 584.75
- Sample calculation
- apply trapezoidal Rule to the acceleration data , we find the area at each time
which will represents the velocity travelled at that time
At t=1
At t=2
At t=3
- Polynomial regression method to find an equation for the distance based on the
integration of the velocity equation.
0 0
1 0.5
2 3
3 9.75
4 23.75
5 49.25
6 92
7 159
8 258.25
9 398
10 584.75
n 11 m 2
5 143.4773
55 1578.25
385 603868.6
11
3025 13537.5
25333 120055.5
220825 1089489
1978405 10055261
18080425
167731333
1 0 0 36 648 32.88287
0 1 0 -57.2 -894 -46.0393
0 0 1 15 175 9.736888
0 0 0 6177.6 123552 6184.5
0 0 0 123552 2512224 125367
1 0 0 0 -72 -3.15734
0 1 0 0 250 11.22455
0 0 1 0 -125 -5.27987
0 0 0 1 20 1.001117
0 0 0 0 41184 1677
12
1 0 0 0 0 -0.22552
0 1 0 0 0 1.044629
0 0 1 0 0 -0.1899
0 0 0 1 0 0.186723
0 0 0 0 1 0.04072
x(sec)
0 0 20585.73 0.050859
1 0.5 20299.77 0.127201
2 3 20015.82 0.062221
3 9.75 19733.86 0.044475
4 23.75 19453.91 0.212348 0.502328
5 49.25 19175.96 0.04389 0.99999
6 92 18900 0.096809 0.999995
7 159 18626.05 0.355803
8 258.25 18354.09 0.014211
9 398 18084.14 0.847821
10 584.75 17816.18 0.16303
∑ 1578.25 211045.5 2.018669
So the polynomial equation of the distance would be:
0 -0.22552
1 0.856652
2 3.249442
3 9.539108
4 23.28919
5 49.0405
6 92.31114
7 159.5965
8 258.3692
9 397.0792
10 585.1538
13
a) estimate the velocity at times t = 1, 2, 3, ...10 s.
v(t) = t4 + t3 t2 +2.679196t -0.37413
t(s) v(m/s)
0 -0.37413
1 1.720274
2 4.172486
3 9.024474
4 17.98605
5 32.43485
6 53.41637
7 81.64395
8 117.4987
9 161.0297
10 211.9538
Sample calculation
- v(0) = -0.01384 (0)4+0.423368(0)3-0.99432 (0)2 + 2.679196(0) -0.37413=-0.37413
- v(10) = -0.01384 (10)4+0.423368(10)3-0.99432 (10)2 + 2.679196(10) -0.37413=211.9538
583.766m
Or
s(t) = t4 + t3 x2 + t -0.22552
s(10) = 104+ 103 2
10 + 10 -0.22552=585.15377 m
14
d) estimate the acceleration at 0.5, 1.5, 5.5 and 8.5 s.
- a(t) = -0.01777t4 + 0.2939t3 - 0.94726t2 + 2.98582t - 0.11888
t(sec) a(m/ )
0.5 1.172841875
1.5 3.130466875
5.5 20.28546688
8.5 44.55188188
Sample calculation
- a(0.5)= -0.01777(0.5)4 + 0.2939(0.5)3 - 0.94726(0.5)2 + 2.98582(0.5)- 0.11888=1.172841875
- a(8.5)= -0.01777(8.5)4 + 0.2939(8.5)3 - 0.94726(8.5)2 + 2.98582(8.5)- 0.11888=44.55188188
0 1.044629
1 1.387878
2 3.828745
3 9.34451
4 18.912453
5 33.509854
6 54.113993
7 81.70215
8 117.25161
9 161.73964
10 216.14353
15
1.5.2 Numerical Method differentiation
0 -0.22552 0
1 0.856652 1.737481
2 3.249442 4.341228
3 9.539108 10.01987
4 23.28919 19.7507
5 49.0405 34.51098
6 92.31114 55.278
7 159.5965 83.02903
8 258.3692 118.7414
9 397.0792 163.3923
10 585.1538 208.0432
- Sample calculation
- Using centered finite-divided-difference formula of firs derivative to find the velocity
based on the distance data.
At t=1
At t=2 (0 to 2)
At t=3
- Polynomial regression method to find an equation for the velocity based on the derivative of the
distance equation.
0 0
1 1.737481
2 4.341228
3 10.01987
4 19.7507
5 34.51098
6 55.278
7 83.02903
8 118.7414
9 163.3923
10 208.0432
n 11 m 2
5 63.53128991
55 698.844189
16
385 95731.37473
3025 5705.802357
25333 48985.04329
220825 434255.7099
1978405 3937314.992
18080425
167731333
1 0 0 36 648 5.13218
0 1 0 -57.2 -894 -7.97959
0 0 1 15 175 2.808488
0 0 0 6177.6 123552 693.5645
0 0 0 123552 2512224 13068.69
1 0 0 0 -72 1.090428
0 1 0 0 250 -1.5577
0 0 1 0 -125 1.124425
0 0 0 1 20 0.112271
0 0 0 0 41184 -802.602
17
1 0 0 0 0 -0.31272
0 1 0 0 0 3.314349
0 0 1 0 0 -1.3116
0 0 0 1 0 0.502035
0 0 0 0 1 -0.01949
x(sec)
0 0 4036.225 0.188547008
1 1.737481 3910.162 1.087012675
2 4.341228 3786.1 1.321575562
3 10.01987 3664.037 0.083136496
4 19.7507 3543.974 0.20161896 1.036942
5 34.51098 3425.912 0.26110056 0.999772
6 55.278 3309.849 0.012811976 0.999886
7 83.02903 3195.787 0.798388713
8 118.7414 3083.724 0.576512193
9 163.3923 2973.662 3.61326874
10 208.0432 2865.599 0.458017633
∑ 698.84419 37795.03 8.601990515
So the polynomial equation of the velocity would be:
v(t) = -0.01949t4+0.502035t3-1.3116t2+3.314349t-0.31272
time(sec) veolcity (m/sec)
0 -0.31272
1 2.172574
2 4.774018
3 9.802182
4 19.099876
5 34.04215
6 55.536294
7 84.021838
8 119.470552
9 161.386446
10 208.80577
18
0 3.314349
1 2.119294
2 3.468689
3 6.894774
4 11.92979
5 18.10597
6 24.95557
7 32.01081
8 38.80395
9 44.86721
10 49.73285
0 -0.22552 0
1 0.856652 1.310618
2 3.249442 3.896876
3 9.539108 7.460414
4 23.28919 12.00123
5 49.0405 17.51933
6 92.31114 24.01471
7 159.5965 31.48737
8 258.3692 39.9373
9 397.0792 49.36452
10 585.1538 48.95927
- Sample calculation
- Using centered finite-divided-difference formula of second derivative to find the velocity
based on the distance data.
At t=1
At t=2
At t=3
- Polynomial regression method to find an equation for the accleration based on the derivative of
the velocity equation.
-
19
0 0
1 1.310618
2 3.896876
3 7.460414
4 12.00123
5 17.51933
6 24.01471
7 31.48737
8 39.9373
9 49.36452
10 48.95927
n 11 m 2
5 21.45014865
55 235.9516352
385 8520.531961
3025 1784.958784
25333 14571.89551
220825 124573.1569
1978405 1098470.558
18080425
167731333
235.9516352
1784.958784
14571.89551
124573.1569
1098470.558
11 55 385 3025 25333 235.9516
55 385 3025 25333 220825 1784.959
385 3025 25333 220825 1978405 14571.9
3025 25333 220825 1978405 18080425 124573.2
25333 220825 1978405 18080425 1.68E+08 1098471
20
1 0 0 36 648 -1.48585
0 1 0 -57.2 -894 2.45308
0 0 1 15 175 0.304874
0 0 0 6177.6 123552 -399.892
0 0 0 123552 2512224 -8754.66
1 0 0 0 -72 0.844519
0 1 0 0 250 -1.24962
0 0 1 0 -125 1.275863
0 0 0 1 20 -0.06473
0 0 0 0 41184 -756.82
1 0 0 0 0 -0.47859
0 1 0 0 0 3.344513
0 0 1 0 0 -1.02121
0 0 0 1 0 0.302798
0 0 0 0 1 -0.01838
x(sec)
0 0 460.1089 0.229048388
1 1.310618 418.2086 0.669963531
2 3.896876 378.3083 0.127466137
3 7.460414 340.408 0.167763149
4 12.00123 304.5077 0.588804537 Sy/x 1.122824
5 17.51933 270.6074 0.196563656 R^2 0.996732
6 24.01471 238.7071 0.155319539 R 0.998365
7 31.48737 208.8068 1.289757706
8 39.9373 180.9065 0.534170957
9 49.36452 155.0062 5.345071187
10 48.95927 131.1059 0.781938385
∑ 235.9516 3086.681 10.08586717
So the polynomial equation of the acceleration would be:
a(t) = -0.01838 t4+0.302798 t3-1.02121 t2+3.344513 t-0.47859
0 -0.47859
1 2.129131
2 4.2539
3 7.050825
4 11.23389
5 17.07598
6 24.40882
7 32.62305
8 40.66817
9 47.05258
10 49.84354
21
1.7 Errors
1.7.1 Acceleration
time(sec) a((m/ ) a((m/ ) a((m/ ) E% E%
Analytical Integration Differentiation Integration Differentiation
0 0 -0.11888 -0.47859 - -
1 2 2.19581 2.129131 9.7905 6.45655
2 4 4.1306 4.2539 3.265 6.3475
3 7 6.80917 7.050825 2.726143 0.726071
4 11 10.92872 11.23389 0.648 2.126273
5 17 16.75997 17.07598 1.411941 0.446941
6 24 24.14716 24.40882 0.613167 1.703417
7 32 32.50805 32.62305 1.587656 1.947031
8 41 40.83392 40.66817 0.405073 0.809341
9 48 47.68957 47.05258 0.646729 1.973792
10 51 51.21332 49.84354 0.418275 2.267569
60
50
40
30
20
10
0
0 2 4 6 8 10 12
-10
1.7.2 Velocity
time(sec) v((m/ ) v((m/ ) v((m/ ) E% E%
Analytical Integration Differentiation Integration Differentiation
0 0 -0.37413 -0.31272 - -
1 1.128191 1.720274 2.172574 52.48074 92.57147
2 4.269681 4.172486 4.774018 2.2764 11.81205
3 9.64181 9.024474 9.802182 6.402698 1.663298
4 18.37215 17.98605 19.09988 2.10155 3.961028
5 32.07194 32.43485 34.04215 1.13155 6.143096
6 52.4095 53.41637 55.53629 1.921159 5.966082
7 80.68364 81.64395 84.02184 1.190217 4.137391
8 117.3971 117.4987 119.4706 0.086544 1.766187
9 161.8301 161.0297 161.3864 0.494593 0.274148
10 211.6134 211.9538 208.8058 0.160859 1.326773
22
Series1 Series2 Series3
250
200
150
100
50
0
0 2 4 6 8 10 12
-50
1.7.3 Distance
time(sec) s((m) s((m) E%
Analytical Integration Integration
0 0 -0.22552 -
1 0.737102 0.856652 16.21892
2 3.563508 3.249442 8.813394
3 9.88569 9.539108 3.505896
4 22.98601 23.28919 1.318976
5 47.69055 49.0405 2.830645
6 90.03697 92.31114 2.525818
7 156.9423 159.5965 1.691195
8 255.871 258.3692 0.976351
9 394.5022 397.0792 0.653228
10 580.3985 585.1538 0.819316
Series1 Series2
700
600
500
400
300
200
100
0
0 2 4 6 8 10 12
-100
23
2.0 DISCUSSION
Based on the acceleration measured by the accelerometer, the velocity and the distance
were evaluated by using different numerical methods and analytical methods to confirm the
accuracy of the result. Based on The tabulated data for the acceleration, velocity, and distance was
fitted to the fourth-order polynomial regression to find the equations; and Trapezoidal Rule was
used to derive velocity and distance from the acceleration data. Then centered finite-divided-
difference first and second order derivative are used to derive the velocity and acceleration from
the distance data.
As shown in the tabulated acceleration data (see section 1.7) the numerical data and the
analytical data are accurate results for both the integration and differentiation however there is
little percentage errors range which can be numerically eliminated by using different or larger
segments. And the numerically and analytically derived velocity and distance data are almost
precise and accurate however there are slightly larger percentage errors in differentiated part two
compare to the integrated data in part one which could be due to error propagation in which we
derive the data from previous uncertain or inexact data so it was expected to have different results
from the integration part.
The numerical methods were chosen to represents the true data in precision; despite the
fact that the final results were accurate and close to the analytical data ,these method are little
reliable in terms of time and efficiency . and there was some difficulties in using Trapezoidal Rule
and centered finite-divided-difference in the first and the last data (at 0,10 seconds) due to they
require two data upper and lower values but using these method is to come up with data then find
their equation using different numerical method. The equations derived from the numerically
calculated data are satisfactory because they represent each of the acceleration, velocity, and
distance with high correlation factor ( ).
3.0 CONLUSSION
Several numerical methods such as Trapezoidal Rule, centered finite-divided-difference,
and polynomial regression were careful chosen to successfully evaluate and analyses the
acceleration, velocity, and distance at times from 0 to 10 seconds; and all the methods proofed an
accurate result if compare to the analytical data, however there are errors which can be minimized
by using different method or increasing the number of segment such as using 20 segment instead
of 10 to numerically integrate and differentiate, so that we will have more accurate data.
The analysis is still imperfect as there are little uncertainties that do not consider in our
calculation such as the error propagation for example the distance was estimated based on the
integrated velocity data which has also errors; and also the data at 0s and 10s for trapezoidal rule
and finite-divided-difference was estimated based on the analytical data because require upper
and lower value so these methods is not reliable to evaluate the values at each time.
24