Report Raw
Report Raw
On
By
Sayanhodeep Banerjee
Institute of Radio Physics and Electronics, University of Calcutta
(Univ. Roll: T91/ECE/204071 Reg No: D01-1111-0076-20)
Page 1 of 19
CONTENTS
Page No.
• Objective 3
• Theory 3-4
• Hardware Requirement 4
➢ Block Diagram 9
• Results 12-18
• Discussions 19
• Conclusions 19
• Bibliography 19
Page 2 of 19
Objective:
• The current project aims to detect an object by using a radar system in the identification of moving object,
capturing the distance, direction and radar pulse duration simultaneously.
• Then a special algorithm will be implemented to capture the exact location and path of the object.
Theory:
The concept of radio detection and ranging (radar) is originated in the 19th century during the 2nd World War.
Initially, it was developed to the detect aircrafts. Generally, there are two kinds of radar: practical radar, which uses
electromagnetic waves; and ultrasonic radar, which uses use sound waves.
• To determine object distance, direction and velocity, electromagnetic wave is impeded by opposition, which
is then reflected back to the source.
• Fig. 1 shows the outfit of ultrasonic sensor as well as how an ultrasonic sensor works as an object detector
and transmits and receives sound waves. The difference of ultrasonic radar and practical radar is the
transmitted signal and the range.
• An ultrasonic sensor is an electronic device that works with sound pulses. The transmitter of an ultrasonic
sensor transmits sound waves and if they get reflected by an object, the signal is picked up by the receiver
end. The time between transmission and reception is calculated to determine the distance.
Another system uses an ultrasonic sensor attached to a microcontroller. The idea of distance measurement by using
such sound waves was first done experimentally. Subsequent research strongly agree that ultrasonic sensor is the
cheapest way to determine the distance of an object and that the suitable microcontroller is P89C51RD2, which is
a family of 80C51 microcontrollers. This experiment was constructed with a transmitter module, a receiver module
and a sensor module. The results obtained from the experiment showed us, how the date obtained from each sensor
are changing while the object is moving and also, we can observe that smaller the distance between the sensor and
the object, the smaller the error.
The major limitation of ultrasonic radar is the detection of a moving object. This project aims to solve that limitation.
If the object is moving towards or away from the radar, the system will detect the object. Detecting an object’s
movement accurately is not easy. Here our aim is to calculate the proper location by solving this problem using an
algorithm to evaluate the precise value by using the ultrasonic-measured distance.
In the early development of indirect distance measurement, James Watt used light but light cannot travel along
distance (only up to 40 cm), unlike sound. Radar could be an alternative because of its extended range, cheap price,
a variety of object selection, and accurate measurement when used as an ultrasonic sensor. The range of ultrasonic
radar is not interrupted like IR sensor. High-impact application of ultrasonic radar includes tracking of heartbeats
and evaluation of group velocity, tracking a large area and wireless distance measuring, and obstacle detection in
robotics.
The objective of this work is in the moving object detection with ultrasonic sensors and detection of its location. In
addition, there is increased efficiency and cost minimization. Detailed explanation of the working principle is
described in the methodology section with a flow chart and a block diagram. Distance values are recorded within a
Page 3 of 19
fixed time along with the calculation of the exact position. The findings are also presented as a visual representation
depicting the accuracy.
Hardware Requirement
In this study, ultrasonic sensor was the major component. These were connected with and controlled by a Raspberry
Pi. Ultrasonic sensor transmits ultra sound. The Raspberry Pi consists of USB connector, microcontroller, USB
storage, USB to MIDI converters, and virtually any other device/component with USB capabilities, depending on
the installed device drivers in the underlying operating system (many of which are included by default), Various
pins, TX RX LEDs. It functions as a controller and provides a coding environment so it requires direct or indirect
connection to a computer.
• HC-SR04 ultrasonic sensor is used in this study as it transmits the sound wave of high frequency near about
40 kHz to 70 kHz. Humans cannot hear it. If the wave gets reflected by an obstacle, then the reflected sound
will be picked up by the receiver. Sonar is used to identify the object.
• The four pins of the sensor are: VCC=5V DC, trig pin=trigger pin/input pin, echo pin=output pin and GND
or ground pin. A 10us trigger pulse is generated with the help of trig pin and to produce sound wave of 8
cycles.
• Normally echo pin stays in a low state (0V) but when it receives the sound wave it goes to a high state of
5V. The total high state (5V) of echo pulse is counted as the travelling time of the sound wave.
• For the implementation of the components, the trig pin and the echo pin of the ultrasonic sensor (HC-SR04)
are connected to the GPIO SPI pins of Raspberry Pi. The Raspberry Pi power is supplied by the external
power supply. The code that has been uploaded onto the Raspberry Pi software will run through the data
generate results.
To locate an object that is in the field a system was created that uses radio frequency signals. The strength of the
radio frequency signal is measured between the tagged object and the readers that are stationed in the field. Once
the signal strength is gathered, it can be converted into a distance using the distance formula which will be explained
in further detail later in this report. When the distances have been calculated they are plugged into a system on
quadratic equations called trilateration. Using trilateration makes it is possible to find the tagged object on the XY
plane and it will also allow us to find the z axis of the object as well. There are two types of trilateration, the first
one is 2-D trilateration, which only allows you to find a tagged object on the XY plane and then there is 3D
trilateration. 3D trilateration allows you to find a tagged object on the X, Y, and Z coordinate system.
Trilateration in 2D[3]
For the indoor location system 2D trilateration is used to find a tagged object that is located on a surface, which will
be on an XY plane. The location of three readers has to be known along with the distances between the readers and
the unknown tagged object for 2D trilateration to work correctly. One can visualize this by looking at figure (x1),
where the red dot in the centre has an unknown location. The red dot will represent the location of the object that is
being searched for. The reference nodes, also known as the readers, are labelled A1, A2, and A3, the distances
between the reference nodes and the tagged node are labelled d1, d2 and d3. The intersection between all three nodes
is the location of our unknown tag.
Each tag and reader will consist of a transceiver and an antenna. The tag transmits a signal and the signal strength,
also known as RSSI (Received Signal Strength Indication) is measured between the tag and the stationed readers.
The signal strength can be converted into distance, which gives us the three known distances that are needed for
trilateration. The downside for using signal strength is that the calculated distance will not always have the exact
distance between the reader and the tagged object. The reason for this is because the signal strength coming from
the tag could be interfered with other signal frequencies, room temperature, humidity, construction within a building
and metal interference. The equation converting signal strength to distance can be tuned for some of the parameters
Page 4 of 19
listed below, but there are some things that cannot be controlled, therefore with every distance that is calculated
there will be a small error.
Once the distance is calculated, trilateration will be used to find the position of the tagged object. The way 2D
trilateration works is shown below. In the following equations Xi and Yi represent the position of Ai (readers), where
i = 1,2,3 .
To simplify this system of quadratic equations, equation 3 will be substituted into equations 1 and 2, which will
leave two linear equations.
The X and Y coordinates are found by solving equation 4 and equation 5 using Cramer’s rule.
Page 5 of 19
Trilateration in 3D[3]
Originally, the indoor positioning system was supposed to find an object within a warehouse. With this in mind, it
was taken into consideration that there are items elevated in high placed that can’t be seen or reached. To do this, a
3D system is needed that will have a Z component along with the X and Y components. As you can see in figure 9,
there is a fourth reader. This fourth reader gives us an extra component; therefore, linear algebra can be used to find
the height of the tagged object. The 3D trilateration quadratic equations are similar to the 2D trilateration quadratic
equations. Also, because of the quadratic equations every reader can be at a different height. The equations for 3D
trilateration are as follows:
Now, the X,Y and Z components are found by solving equations 11,12, and 13 using Cramer’s rule.
Both 2D and 3D trilateration have its pros and cons. Adding an extra reader to the system will increase the accuracy
of the location of the tagged object in 2D. However, in 3D trilateration, the fourth reader is needed for the extra
unknown z-component. 3D trilateration will also be less accurate and more complex than 2D trilateration. The more
complex the system is; the longer the computational time will be, which is another advantage that 2D trilateration
has over 3D trilateration.
Page 6 of 19
By using the trilateration method, we can easily calculate the exact position of the object in 2D or 3D plane. For
that, we need the distance of the object from the ultrasonic sensors. To measure the distances, we use the following
algorithm.
Page 7 of 19
Flow-Chart of the Process:
Fig- 3 shows us the flow chart for the distance measurement algorithm
Page 8 of 19
Block diagram
As shown in Fig 4, Raspberry Pi receives power supply from the external source. Then microcontroller
sends signals to the other component: the ultrasonic sensors. The feedback from these components is sent
back to the microcontroller. The ultrasonic sensor has a transmitter to send out the ultrasound and a
receiver to catch the reflected sound waves. The total travelling time of this sound wave is the distance.
.
The above figure-3 shows how an ultrasonic sensor can be interfaced with a Raspberry Pi. The input
voltage here is 5 Volts but for Proper functioning of ECHO pin, the voltage requirement is 3.3 Volts.
Therefore, here we have used a voltage divider circuit. Same circuit designing has been implemented for
all four sensors.
Page 9 of 19
Experimental Set-up:
Here in Fig-6, the four sensors have been mounted for measurement of the distance
Now, the following image (Fig-7) shows us the connection from the Raspberry Pi
Page 10 of 19
Fig-8 : Simplified view of the ultrasonic sensor—type 600-series of SensComp (formerly known as Polaroid).[4]
Fig-9 Typical characteristic of a horizontal section of the measuring beam for a 600-series Polaroid sensor [4]
(Power-radiation pattern)
Page 11 of 19
Results:
During the implementation of the experiment, the serial monitors continuously produced data. Those data sets were
collected for evaluation and validation checking, as shown in Table 1. The result shows the distance from each
sensor
Table-1
Table-2[1]
RANGE DETECTION OF PROPOSED RADAR SYSTEM AT DIFFERENT ENVIRONMENT
Range criteria for Ultrasonic sensor (HC-SR04) Environment Range
Maximum range Inside the room: 366 cm
Minimum range Inside the room: 2 cm
Maximum range Outside the room: 251 cm
Minimum range Outside the room: 2 cm
Table 2 shows the range detection capacity in changed environments. For the same setup, it showed different values
when it was inside the room and when it was outside the room. It is important to explore maximum and minimum
range of proposed radar system in different environments.
Page 12 of 19
Fig-10
Typical ultrasonic sensor object detection can be done within this black region shown in
Fig-10[2]
Sensor-1
Page 13 of 19
Sensor-2 Sensor-3
Sensor- 4
Here, in Fig-12, X-axis indicates the number of samples and Y-axis indicates the value of the measured
distances for the object. The graph shows the difference between the ultrasonic value and the actual value.
It indicates that initially ultrasonic distances (blue bar) and actual measured value (orange bar) is quite
closer. The error is around 5-10% which falls under tolerable range.
Page 14 of 19
Fig-13: Simulated Position of Object
In Fig-13 the red dots show the position of 3 sensors and the black dot shows the location of the object
measured by the simulation.
In Fig-14 the red dots show the position of 3 sensors and the black portion shows the region where the
object is found.
Page 15 of 19
Fig- 15-a (Sensor data) Fig-15-b (Sensor data)
Fig-15(a,b,c) show the distance measured by each sensor. The measured distance has been represented
by the Y-axis and X-axis represents the number of samples.
Page 16 of 19
Fig-16: Propagation path of Object in 2-D plane
In Fig-16 the red dots show the position of 3 sensors and the black points show the locations of the object
during the propagation. The blue line shows the propagation of that object in 2-D plane. We have merged
the data received from previous 3 sensors in this diagram.
In Fig-17 the red dots show the position of 3 sensors and the black points show the locations of the object
during the propagation. The blue line shows the propagation of that object in 3-D plane with respect to
origin. Here the scale has been changed from the 2-D representation
Page 17 of 19
Fig-18: 3-D simulation
In Fig- 20 the red dots show the position of 4 sensors and the yellow point shows the exact location of
the object in 3-D plane. It is the simulated result.
This figure shows actual position of the object in 3-D plane, which is measured by the experimental
radar system developed in the lab
Page 18 of 19
Discussions:
• In Fig- 13, the location of the object can be accurately measured by using the Radar System.
• In Fig- 14 the region in which the object can be found has been denoted.
• In Fig- 15(a,b,c), the distance vs samples curves have been shown. Here we have seen that for the
two terminal sensors, the measured value is increasing and decreasing. For the middle sensor, the
measured value is first decreasing and then increasing. This is equivalent to actual movement of
that object.
• In Fig-16,17, the profile of object movement has been shown in 2-D and 3-D space.
• In Fig- 19, the location of the object can be measured by using the Radar System in 3-D space
using four number of sensors.
Conclusions:
• Radar is a remarkable invention from various perspective, including measuring velocity and
calculating distance.
• The proposed radar system had only small error when calculating distances and can predict the
location accurately.
• Overall, the system can provide 90% efficiency unless of the distance is less than one-two
centimetres and the size is extremely small or the object placed outside the angle of vision of the
sensors. If an object is moving out of the vision of a sensor, the accuracy might decrease up to
70%.
• However, it important to note that the experiment was done in a constant environment. To avoid
the back reflection of the sound, we have used a spongy material in our experimental set-up.
• The sensors should be mounted at least 5 feet above the ground. We know that earth surface is a
good reflector of Electromagnetic Waves. So, there might be a chance of Back-Reflection of waves
and the measurement might get erroneous.
Bibliography:
1. Moving Object Detection Using Ultrasonic Radar with Proper Distance, Direction, and Object Shape
Analysis by Angona Biswas, Sabrina Abedin, Md. Ahasan Kabir
2. Automatic control of structural parts main parameters during mechanical testing of aircraft by V L Simonov,
D Yu Eliseeva, O L Mnatsakanyan and T V Karyagina
3. Indoor Positioning System by Robert Jarvis, Arthur Mason, Kevin Thornhill and Bobby Zhang
4. Distance Estimation With a Long-Range Ultrasonic Sensor System by Jarosław Majchrzak, Mateusz
Michalski, and Grzegorz Wiczyn´ski
Page 19 of 19