ISSN (Print): 2278-8948, Volume-1, Issue-2, 2012
57
Efficient Error Reduction In Ultrasonic Distance Measurement Using Temperature Compensation
Rahul Kumar Rastogi & Rajesh Mehra E.C.E.Department, N.I.T.T.T.R. Chandigarh, India E-mail : [email protected],[email protected]
Abstract - This paper contains ultrasonic method with temperature compensation to reduce the error in measurement of distance using sensors. Ultrasonic waves are influenced by various factors like air temperature, air pressure, and relative humidity. Also roughness of target material surface, sensor frequency, Alignment effect or object positioning with sensor and distance between transmitter & receiver in sensor have effects on distance measurement. In this paper only the temperature of surrounding air is trying to compensate so that error in locating the object with temperature variation can be minimized. As input device for receiving the data, hardware contains Ultrasonic sensor, Temperature sensor and a signal processing unit. Signal processing unit contains PIC microcontroller which is used for interfacing between different sensors and computer. Received data form serial input/output port is then temperature compensated using MATLAB for better result and less error.
Keywords - Human machine interface, MATLAB, Signal Processing unit, Temperature compensation, Ultrasonic sensor.
I. INTRODUCTION
There are various techniques to locate a moving target in real-time. These can be IR based, Ultrasonic based or RFID based technology. In [1] an obstacle detection system using ultrasonic sensors and USB camera based visual navigation was considered, identification of human presence is based on face detection and cloth texture analysis. In [2] a survey was done on portable/ wearable obstacle detection/
avoidance system, survey classify them in categories based on various features and performance parameters.
In [3] the author developed a navigational/ orientation system that uses RFID technology, GPS and computer vision. In [4] IR detectors with signal processing was used highlighting their role in orientation and mobility tasks. In [5] a smart phone based ultrasonic wireless
ranging and collision warning system was proposed. It uses Bluetooth technology and a smart phone along with Text to Speech Feature. In [6] RFID based walking stick was proposed which assist blind person during walking on a sidewalk. In [7] a bus detection mechanism for the blind in travelling from one place to other using RFID system was developed. In [8] IR sensors with microcontroller and vibrating motor Alarm was developed and nine types of material were tested to examine the performance. In [9] author focuses on the implementation and limitations of ultrasonic sensors during development of Electronic Travel aid. In [10] the device contains a sonar module and an IR sensor with microcontroller architecture and 5 LED based attention system was developed. In [11] the author proposed a stereo vision based wearable device consist of a computing device, camera and earphone modeled in a helmet. In [12] the author explained security and safety issues for helping the visually impaired by preventing accidents while moving around in public places. In [13]
a method was developed for position estimation of surfaces with IR sensors without the need to determine the surface properties. In [14] the author explains the influence of temperature, pressure and humidity on ultrasonic velocity and absorption. In [15] a point to point distance measurement using ultrasonic sensor was developed and result was tested on six types of obstacles. In [16] a new mobility sensor strategy aimed to assist blind people in performing mobility tasks was proposed. In [17] the author summarized the required features in electronic sensory system for the visually impaired. In [18] a guide stick was developed consist of an ultrasonic displacement sensor, two DC motors and a microcontroller. It contains wheel revolution control board and path planning. So the best way to locate a target is by ultrasonic and it can be temperature compensated for better results. If a fixed obstacle produces an echo after a certain time delay than the
ISSN (Print): 2278-8948, Volume-1, Issue-2, 2012
58 same object at same distance to the same sensor produces the echo with slower speed in low temperature environment and with higher speed in high temperature environment. Speed of the sound decreases with temperature.
II. SOUND PROPAGATION EFFECTS
Due to the physical properties of sound propagation in the air, dependencies arise with regard to air temperature; air pressure, and relative humidity. The velocity of sound in air is 331.46 m/s at 0° C and standard pressure; and is directly proportional to air temperature as shown in Figure 1. As the ambient air temperature increases, the speed of sound also increases.
This will cause variation in the reported distance. So that the distance measured will be large in cold weather and less in hot weather. The following objects are well- suited for detection
a) All smooth and solid objects that are aligned at a right angle to the sound cone.
Fig. 1: Ultrasonic speed variation with air temperature and pressure [5]
b) All solid objects with degrees of surface roughness that cause a diffuse reflection and which are to a large extent independent of their alignment. c) The surfaces of liquids, insofar as these are not angled more than 3°
from the axis of the sound cone [5]. The absorption at low frequencies from 50 to 500 KHz is more complicated, as maximum values depends on temperature. At high frequencies the absorption of ultrasonic waves in air substantially increases at high temperatures. At 1MHz frequencies the absorption increases uniformly versus temperature [14]. Speed of ultrasonic wave propagation depends on temperature and angle of the transmitting sensor and receiving sensor to the x-axis and receiver. The method is repeated for different values of distance from obstacle to the stick and results are compared for six different types of obstacles [15]. Other effects are alignment effects i.e.
objects positioning with respect to sensor, space between transmitter and receiver and target material
properties also affected the distance measurement. The sensor can accurately measure the distance to an object within range.
III. SIGNAL PROCESSING
The setup consists of different sensors like ultrasonic sensor and the temperature sensor as the input units. Ultrasonic sensor device measure the PWM which is directly proportional to round trip delay time &
distance measured and environment temperature. The processing unit provides power to other devices and the main function is to provide and interface between sensors and computer. The function of the signal processing unit is analog signal filtering, signal amplification and digitizing. The microcontroller triggers the ultrasonic sensor and receive echo and also communicate with the temperature sensor. To convert the measured signal to meaningful data, assess the data from different sensors and send the output signal (analog signal to digital signals) to computer. Block diagram of the setup for taking input for processing is shown in figure 2.
Fig. 2: Block diagram of the setup
PIC 16F877 microcontroller is used which works on the TTL signal. The microcontroller will gather the information from the ultrasonic sensors as signal directly proportional to the distance of the nearest obstacle and measure the width of transmitted pulses using program burn in it. the computer receive serial data RS-232 interface so MAX-232 IC converts TTL to the RS-232 signal. The serial data should be displayed on Computer so human machine interface is required because the data has to be compatible with the Com
``puter. The data can be displayed using serial communication softwares which are Mikro c PRO for PIC or Terminal as shown in figure 3. Then the received data is analyzed using MAT LAB. Create log of the data. Firstly create a text file in the required space, open Micro C, give the path to the destination file, connect kit and then start logging. When logging completed then
ISSN (Print): 2278-8948, Volume-1, Issue-2, 2012
59 stop logging and power off the supply of the kit. Either graph can be drawn for one temperature but the data will be very high and the no. of graphs are more for each temperature so that a common data is sorted with varying temperature and PWM which is directly proportional to the distance measured. Log sorting is necessary because the data saved in the log is abrupt in nature. The flow chart of the above process is shown in figure 4.
Fig. 3: Display of serial data (PWM, Temperature & Humidity) on computer
Fig.4 : Flow chart of the process
Log should be either continuously increasing or decreasing so the data shorting is done manually.
IV. MATLAB BASED TEMPERATURE COMPENSATION The speed of sound at 00c is 331.46m/s i.e. 33146 cm/s. and it is observed that the speed increases by 0.607 m/s for increases of 10c in air temperature and also decrease for decrease in temperature. The reported distance will be comparably less in hot weather and large in cold weather.
D= 𝐶. 𝑡 2 (1) D= distance of sensor to the target C=speed of sound in air
t=round trip delay of ultrasonic pulse
The parameter measured are PWM in micro sec., distance in cm and temperature in oC so the speed should be in cm/sec. distance are of three types
1- Distance actual D (cm) which is taken manually 2- Distance without temperature compensation D1(cm)
which is taken serially from serial RS-232 cable.
𝐷1 𝑐𝑚 = 𝐶 𝑐𝑚 𝑠 𝑡 10−6 2
= 33146 𝑡 10−6 2 (2) 3- Distance with temperature compensation D2 (cm)
which will calculated using MATLAB 𝐷2 𝑐𝑚 = 𝐶 𝑐𝑚 𝑠 + 60.7 𝑇 𝑡 10−6
2
= 33146 + 60.7 𝑇 𝑡 10−6 2 (3) Error is calculated as described below
1- Error is measurement without temp compensation E1 (%)
𝐸1= 𝐷 − 𝐷1
100 𝐷 (4) 2- Error is measurement with temp compensation
E2 (%)
𝐸2= 𝐷 − 𝐷2
100 𝐷 (5) The equations given above are coded using MATLAB and arrays of input datas are processed and output datas are generated shown in Table 1 & Table 2 respectively.
The serial data are PWM & Temperature. and distance(D) is taken manually using scale. These data
ISSN (Print): 2278-8948, Volume-1, Issue-2, 2012
60 has been feed into arrays of the MATLAB program and equations explained above are implemented the PWM received are scaled by a factor so that it is comparable to round trip delay and all input PWM are scaled. The output data generated are distance & error with and withput temperature compensation.
Table 1: Input serial data to MAT LAB INPUT DATA
S.N .
Distance Taken Manually
D (cm)
PWM (Round Trip delay) (µ sec)
Temperature T (0C)
1 7 0030 34.0
2 15 0062 28.0
3 22 0085 22.0
4 26 0106 34.0
5 29 0117 21.0
6 49 0192 24.0
7 53 0214 32.0
8 69 0272 32.0
9 77 0302 27.0
10 82 0324 23.0
11 87 0344 33.0
12 95 0378 25.0
13 110 0447 41.0
14 120 0476 43.0
15 134 0534 34.0
16 145 0569 29.0
17 152 0604 38.0
18 170 0675 27.0
19 183 0721 25.0
20 190 0734 26.0
21 193 0764 34.0
22 203 0807 21.0
23 218 0854 33.0
24 227 0905 32.0
25 238 0951 23.0
26 258 0983 18.0
27 260 1033 25.0
28 278 1055 17.0
29 273 1084 43.0
30 287 1142 34.0
31 297 1182 38.0
32 318 1263 27.0
Fig. 5: Data processing using MATLAB for Temperature compensation
Table 2: Output data received from Mat lab after Temperature compensation
OUTPUT DATA
S.N .
Distance Without
T.C.
D1(cm)
Distance with T.C.
D2(cm)
Error Without
T.C.
E1(%)
Error With T.C.
E2(%) 1 8.2034 7.6926 17.1912 9.8942 2 16.9537 16.0843 13.0245 7.2288 3 23.2429 22.3065 5.6497 1.3931 4 28.9853 27.1805 11.4819 4.5404 5 31.9932 30.7628 10.3214 6.0786 6 52.5017 50.1941 7.1463 2.4370 7 58.5175 55.0882 10.4104 3.9400 8 74.3774 70.0186 7.7933 1.4763 9 82.5808 78.4974 7.2477 1.9447 10 88.5966 84.8648 8.0446 3.4937 11 94.0655 88.3807 8.1213 1.5870 12 103.3627 98.6304 8.8028 3.8214 13 122.2305 113.0528 11.1186 2.7752 14 130.1604 119.9106 8.4670 -0.0745 15 146.0203 136.9282 8.9704 2.1852 16 155.5909 147.3276 7.3041 1.6053 17 165.1615 153.6677 8.6589 1.0972
ISSN (Print): 2278-8948, Volume-1, Issue-2, 2012
61 18 184.5762 175.4496 8.5742 3.2056 19 197.1547 188.1283 7.7348 2.8023 20 200.7095 191.1528 5.6366 0.6067 21 208.9129 195.9048 8.2450 1.5051 22 220.6711 212.1845 8.7050 4.5244 23 233.5231 219.4103 7.1207 0.6469 24 247.4689 232.9664 9.0171 2.6284 25 260.0474 249.0939 9.2636 4.6613 26 268.7977 259.9370 4.1851 0.7508 27 282.4700 269.5375 8.6423 3.6683 28 288.4858 279.5044 3.7719 0.5411 29 296.4157 273.0736 8.5772 0.0270 30 312.2756 292.8315 8.8068 2.0319 31 323.2135 300.7207 8.8261 1.2527 32 345.3626 328.2857 8.6046 3.2345 then graph of results are generated. These graphs are PWM Vs D, speed Vs D and (E1 & E2) Vs D. Graph (1) shows the change in PWM with change in distance without Temperature compensation. Graph (2) shows the change in speed of ultrasonic with change in distance.Graph (3) shows the change in percentage of error with and without temperature compensation with change in distance. The error is reduced which is calculated by E1-E2 shown in table 3.
error reduction = 𝐸1− 𝐸2 (6) and after that average of error reduction is calculated.
Graph 1: Plot between D versus PWM Values
Graph 2: Plot between D. versus ultrasonic velocities
Graph 3:Plot between D versus [E1% (R) & E2% (B)]
V. COMPARISION OF RESULT
Table 3: Error reduced after error compensation
S.N.
Error Without
T.C.
E1(%)
Error With T.C.
E2(%)
Error reduction
E (%)
1 17.1912 9.8942 7.297
2 13.0245 7.2288 5.7956
3 5.6497 1.3931 4.2566
4 11.4819 4.5404 6.9415
5 10.3214 6.0786 4.2428
6 7.1463 2.4370 4.7093
ISSN (Print): 2278-8948, Volume-1, Issue-2, 2012
62 S.N.
Error Without
T.C.
E1(%)
Error With T.C.
E2(%)
Error reduction
E (%)
7 10.4104 3.9400 6.4704
8 7.7933 1.4763 6.317
9 7.2477 1.9447 5.303
10 8.0446 3.4937 4.5509
11 8.1213 1.5870 6.5343
12 8.8028 3.8214 4.9814
13 11.1186 2.7752 8.3434
14 8.4670 -0.0745 8.5416
15 8.9704 2.1852 6.7851
16 7.3041 1.6053 5.6988
17 8.6589 1.0972 7.5617
18 8.5742 3.2056 5.3686
19 7.7348 2.8023 4.9325
20 5.6366 0.6067 5.0299
21 8.2450 1.5051 6.74
22 8.7050 4.5244 4.1806
23 7.1207 0.6469 6.4738
24 9.0171 2.6284 6.3887
25 9.2636 4.6613 4.6023
26 4.1851 0.7508 3.4344
27 8.6423 3.6683 4.974
28 3.7719 0.5411 3.2307
29 8.5772 0.0270 8.5502
30 8.8068 2.0319 6.7749
31 8.8261 1.2527 7.5733
32 8.6046 3.2345 5.3701
The table 3 shows individual measurement percentage error and the average of the all 32 measurements for without and with temperature compensation are calculated. These are 8.6082 for without temperature compensation and 2.7347 for with temperature compensation so it is clearly observed that how much error is reduced. It shows that 72.82% error is reduced and only 27.18% error is remaining which can be due to all other effects like humidity, alignment effects, material properties, etc.
VI. CONCLUSION
Result shows that the errors due to temperature variation in ultrasonic distance measurement are reduced and better results are found. The other effects explained above can be analyzed and can be included.
The results can be implemented to build a blind stick which will be more accurate. also a voice processor can be added with microphone to give alerts to the blind person. The analysis can be done for different Materials so that effect of all material and their errors with temperature compensation can be analyzed. Other factors are humidity and pressure can be included so that the combined compensation can reduce more error.
REFERENCES
[1] Amit Kumar, Rusha Patra, M. Manjunatha, J.
Mukhopadhyay and A. K. Majumdar ,IIT, Kharagpur
“An Electronic Travel Aid for Navigation of Visually Impaired Persons” International Conference on Communication Systems and Networks (COMSNETS), PP-1-5, IEEE 2011.
[2] Dimitrios Dakopoulos and Nikolaos G. Bourbakis,
“Wearable Obstacle Avoidance Electronic Travel Aids for Blind: A Survey”, Transactions on Systems, Man, and Cybernetics, Vol. 40, Issue no. 1, IEEE 2010.
[3] Faria J, Lopes S, Fernandes H,Martins P, Barroso J,
“Electronic white cane for blind people navigation assistance” ,World Automation Congress (WAC), PP- 1-7, sept 2010.
[4] Bruno Ando, and Salvatore Graziani, “Multisensor Strategies to Assist Blind People : A Clear-Path Indicator”, Transactions on Instrumentation and Measurement, Vol. 58, Issue no. 8, PP- 2488-2494, IEEE 2009.
[5] A. A. Tahat “A Wireless Ranging System for the Blind Long-Cane Utilizing a Smart-Phone” 10th International Conference on Telecommunications (ConTEL), PP- 111-117, IEEE 2009.
[6] Mohammad Farid Saaid, Ismarani Ismail, Mohd Zikrul Hakim Noor , “Radio Frequency Identification Walking Stick (RFIWS): A Device for the Blind”, 5th International Colloquium on Signal Processing & Its Applications (CSPA), PP-250-253, IEEE 2009.
[7] Mohd Zikrul Hakim Noor, Ismarani Ismail and Mohammad Farid Saaid, “Bus Detection Device for the Blind Using RFID Application” 5th International Colloquim on Signal Processing and Its Applications, PP-247-249, IEEE 2009.
[8] S. Innet , N. Ritnoom “An Application of Infrared Sensors for Electronic White Stick” International Symposium on Intelligent Signal Processing and Communication Systems (ISPACS), PP-1-4, IEEE 2009.
[9] C. Gearhart, A. Herold, B. Self, C. Birdsong, L.
Slivovsky, "Use of ultrasonic sensors in the development of an Electronic Travel Aid," Sensorsbui Applications Symposium, (SAS), PP-275-280, IEEE 2009.
[10] B. Ando, “A Smart Multisensor Approach to Assist Blind People in Specific Urban navigation tasks”,
ISSN (Print): 2278-8948, Volume-1, Issue-2, 2012
63
Transaction on Neural Systems and Rehabilitation Engineering, Vol. 16, Issue no. 6, PP- 592-594, IEEE 2008.
[11] G. Balakrishnan, G. Sainarayanan, R. Nagarajan and S. Yaacob,“Wearable Real-Time Stereo Vision for the Visually Impaired,”Engineering Letters, Vol. 14, no. 2, IEEE 2006.
[12] B. Ando, “Sensors that provide security for people with depressed receptors,” Instrumentation and Measurement Magazine, Vol. 9, no. 2, PP-58–63, IEEE 2006.
[13] Yuzbasioglu, C., and Barshan, B., A new method for range estimation using simple infrared sensors”, International Conference on Intelligent Robots and Systems, PP-1066-1071, IEEE 2005.
[14] A. Vladisauskas, and L. Jakevicius, “Absorption of ultrasonic waves in air,” Ultragarsas (Ultrasound) Journal, Ultrasound Institute, Vol. 50, PP- 46-49, March 2004.
[15] R. Palee, S. Innet, K. Chamnongthai, and C.
Eurviriyanukul,“Point to point Distance Measurement Using Ultrasonic for Excellent Stick” International Technical Conference On Circuits/System, Computers and Communications, (ITC-CSCC 2004),July 2004 [16] B. Ando, S. Graziani, C. O. Lombardo, and N. Pitrone,
“Development of a smart clear path indicator,”
Proceeding of Instrumentation and Measurement Technology Conference (IMTC), Vol. 1, PP-492–497, IEEE 2004.
[17] B. Ando, “Electronic sensory systems for the visually impaired,” Instrumentation and Measurement Magazine, Vol. 6, Issue no. 2, PP-62–67, IEEE 2003.
[18] Sung Jae Kang , Young Ho, Kim , In Hyuk Moon,
“Development of an Intelligent Guide-Stick for the Blind” International Conference on Robotics and Automation, Vol-4, PP-3208-3213, IEEE 2001.