Reference no: EM133170939
SEMM1013 Programming For Engineers - University of Technology Malaysia
Project
An experiment to measure the moment in Nm about a point A produced by the gravitational force was conducted for the following robotic arm in the vertical plane shown below.
The following table shows some values of the data obtained from the measurements and the complete data set was saved in the file ‘moment2.txt'. The file contains the values of the moment for 0 < θ1 < 90 and -90 < θ2 < 90. The first row indicates the value of θ1 and the first column indicates the value of θ2.
T2\T1
|
0.0
|
10.0
|
20.0
|
30.0
|
40.0
|
50.0
|
60.0
|
70.0
|
80.0
|
90.0
|
-90.0
|
0.22
|
3.03
|
7.49
|
10.09
|
13.8
|
16.24
|
18.28
|
19.99
|
21.75
|
20.87
|
-80.0
|
0.83
|
4.32
|
8.09
|
11.19
|
14.43
|
17.26
|
19.82
|
20.55
|
21.11
|
22.1
|
-70.0
|
1.95
|
4.72
|
9.59
|
13.06
|
15.2
|
17.77
|
20.78
|
22.49
|
23.85
|
23.15
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
|
|
|
...
|
|
|
|
|
80.0
|
1.55
|
5.15
|
8.57
|
12.12
|
14.97
|
18.02
|
18.92
|
20.77
|
21.32
|
21.28
|
90.0
|
-0.84
|
4.38
|
6.93
|
10.53
|
14.45
|
15.69
|
19.07
|
20.22
|
21.65
|
21.17
|
Write a C program that reads the above data from the file ‘moment2.txt' and for < θ1 < and < θ2 < write the following output to an output file ‘result.txt':
a) The reprint of the data from the experiment.
b) The corresponding theoretical values of the moment.
c) The error of each measurement compared to the theoretical value.
d) The maximum error, the minimum error, the average error, the average of the absolute error, and the absolute percentage of error of the measurements.
e) The values of θ1 and θ2 for the minimum and maximum errors.
Write a brief report about this project and submit the C source code and the results printed from the output file. Your report should include Background of Project, Methodology (Algorithm and/or flow chart), and Discussion and Conclusion.