Traffic Avoidance System for High Priority Vehicles

India and most of the developing countries have unplanned cities in which roads are narrow and unkempt. Due to increasing vehicular density, repair of roads and traffic rules violation, traffic congestion is increasing at an alarming rate. Delay in arrival of High Priority Vehicles (HPV) like ambulances and fire engines cause severe loss to life and property. Although most HPVs are equipped with sirens, it is not efficient to guarantee a clear road to HPVs due to its audibility range. Hence, we propose a system by which the vehicles near the traffic junction will be alerted about the oncoming of HPV much in advance of its arrival so that they can make way for the HPV. In this system, every HPV is provided with an active RFID tag. Few kilometers before the main signal, an active RFID reader would be placed which would detect the vehicle and send this information to the display screen placed near the traffic junction signal via LoRa wirelessly, starting to make way for the HPV. Therefore, this project proposes to streamline the traffic and allow HPV to pass easily.


Introduction
With increasing vehicular density day by day on our roads, traffic jams have become a very common problem in metropolitan cities. Traffic congestion has always been a hindrance in everybody's normal life routine. However, efficiently synchronizing traffic at multiple junctions is complex. Conventional control systems do not handle the dynamic flow of traffic which results in chaos. Vehicles lie stagnant on the road for hours and for High Priority Vehicles (HPV) such as ambulances and fire engines, it is nearly impossible to pass through the traffic congestion. Delay in the arrival of HPVs causes a lot of damage to properties and loss of human life. Most of the 'declared dead' and 'died on road' scenarios happen where there is a time lag in moving the critical patients from one place to another due to traffic congestion. Even though the siren of HPV alerts the drivers in a traffic jam, they can't do much as less space is there for them to give way. This project develops a system that will recognize a HPV by detecting the active RFID tag allotted to it by the active RFID reader placed a few kilometers before the main traffic signal. Reader then sends the information of oncoming HPV to the traffic signal at a junction via LoRa transceiver modules. The information that the HPV is on its way will be displayed on the display screen at the junction well in advance before the HPV reaches the junction thereby alerting all the other vehicle drivers which will make it easier for them to give way by eventually streamlining the flow of traffic.
Section 2 discusses about all the literature survey that was done in the pre planning stage of the system. Section 3 discusses the functional block diagram of the system. Section 4 elaborates on the hardware modules used in the project, while section 5 gives details about the software. The implementation is discussed in section 6. Section 7 contains the results and lastly, section 8 concludes the paper and gives future scope.

Literature survey
In [1], R.Want discusses RFID and its applications and the challenges faced while deploying this technology. He further discusses Active and Passive tags and different design approaches that exist for transferring power from the reader to the tag. The tag antenna captures the energy and transfers it to the tag's ID. The tag's integrity and the antenna remains protected due to encapsulation from environmental conditions or reagents. The near-and farfield based signals also transmit and receive data by various modulation techniques An effective application of RFID technology can be seen in [2], where students in a classroom are provided with RFID tags attached to their ID cards which makes the process of taking attendance more secure and faster as compared to existing conventional methods. The passive RFID reader generates radio frequency which is transmitted to the surrounding using the antenna of the reader. If there is an RFID tag near the reader, a small power will be induced from the radio wave to the tag and allow a modulated electromagnetic wave to be sent back to the reader which uniquely detects the tag. The performance of RFID based attendance systems has been evaluated on different tag positions and distance.
In [3], the authors have mentioned the application of RFID in healthcare. This technology can be applied to collecting sensor derived data and doing computation by extending the chip's interface capability to a sensor. In hospitals, temperature sensing makes it very convenient to track tainted blood to aid in protecting a hospital's blood supply, chemical sensing can support advanced medical monitoring. It can also be used for retrieving patient information and patient location in hospitals to increase the accuracy of patient identification. Asset and equipment tracking is yet another field where this technology is widely used.
The authors in [4] discuss the security-related aspect of RFID technology. Here in this paper, there are various attacks mentioned on the RFID tag and reader. One of them in which cloning of the tag takes place where information received can be used for further attacks. Eavesdropping is one of the most widely deployed threats due to the wireless nature of RFID In eavesdropping, unauthorized individuals use an antenna to communicate between legitimate RFID tags and readers. This attack can take place both ways: tag to reader and reader to tag. Various algorithms are devised on securing communication between tag and reader.
Emerging transmission technologies dedicated to IoT networks are explained by Umber Noreen and Ahcene Bounceur in [5].The performance of LoRa is based on three basic parameters: Code Rate, Spreading Factor, and Bandwidth. LoRa becomes resistant to channel noise, long term relative frequency, Doppler effects, and fading due to usage of the wider band. Here in this paper, the performance of LoRa based on three basic parameters: Code Rate, Spreading Factor, and Bandwidth are analyzed. A decrease in data rate is due to the increase in the value of the code rate and the spreading factor which causes an increase in time for LoRa to reach its destination. The choice of bandwidth also influences data rate and time on the air of a packet.
An investigation is carried out in [6] between LoRa and IEEE 802.15.4g networks to measure the interference between them.CSS(Chirp Spread Spectrum) modulation is used by LoRa in contrast to GFSK(Gaussian Shift Keying) used by IEEE 802.15.4g. GFSK concentrates the energy on two-shift frequencies making 802.15.4g more sensitive to narrowband interference while CSS spreads the energy of the symbol across the whole bandwidth. LoRa is much more tolerant than IEEE 802.15.4g under interference and LoRa's radio configuration is important to the degree of tolerance. LoRa can tolerate interference power that is 6 dB higher for a high data rate setting, than the actual LoRa receiving power and for the low data rate, it can tolerate up to 16 dB.
In [7], the signal propagation measurement of LoRa devices that was observed in an indoor environment is depicted. The measurements were performed in the building of a university with 12 floors. To measure signal propagation in the indoor environment, a LoRa gateway is set up at the rooftop of the building and the end nodes are placed at six different locations of each floor. After processing the signals that are collected from the end node, the gateway will provide useful information such as Received Signal Strength Indicator (RSSI), Signal Noise Ratio (SNR), Received Frequency. From these data, the ability to communicate in an indoor environment where there are many obstacles can be confirmed.  The detailed step by step working of the system is explained as follows:

RFID detection
The reader is placed on a lamp post which will be at some distance above the ground. The RFID reader will be kept at a distance of 2 kilometers from the main traffic junction.
All the HPVs will be given an active RFID tag which has a unique ID linked to it. As soon as an HPV comes within the reading range of the reader, the tag is detected within a few milliseconds.

Authentication of the tag values
The Arduino has a database of all the RFID tag values allotted to the HPVs stored in its internal memory. When the tag value of the HPV matches with any of the tag values in the database, the data pin of the Arduino is enabled and passes signal to LoRa receiver, placed at the main traffic junction, which is connected to another Arduino.

Activation of LoRa -transmitting side
LoRa used in this project is of 433MHz frequency. The LoRa module is interfaced to Arduino and is placed with the RFID reader. When the LoRa is on, it starts to transmit tag value through its antenna. Both the transmitting and the receiving antenna are kept in Line of Sight.

Activation of LoRa -receiving side
LoRa receiver, which is placed at the main traffic junction, is connected to another Arduino. When the message packets are received, it is displayed on the LCD screen.

LCD screen display
The LCD is placed in such a way that it is visible to all the automobile drivers. It displays a message stating "HPV on its way, move to your right" which will alert the drivers and they can make way for the HPV much in advance by moving to their right leaving the left lane empty for HPV to pass. If the tag value doesn't match the database, the input is ignored and the reader waits for another valid tag.

Hardware used
The hardware used in this system consists of SAAT-F520 Active RFID reader, active RFID tags, SX1278 LoRa transceiver modules, Arduino Uno board for interface, and a 16x2 Liquid Crystal Display (LCD). The antenna used for LoRa is a 433 MHz with IPEX connector.

SAAT-F520 RFID reader
RFID is a form of wireless communication that uses electromagnetic coupling for uniquely identifying a tag. There is an internal battery that enables the tag to have extremely long read ranges [8]. The operating frequency of active RFID is 2.45 GHz. It supports RS-232,10/100M Adaptive Ethernet and also supports active and passive reading, multi-reading, timing trigger, command trigger, external trigger and other modes, to meet users' various integration needs [9].

SX 1278 LoRa module
LoRa is a wireless network technology that offers long range, low power and secure data transmission. LoRa stands for Long Range devices. It uses unlicensed frequency bands of 433MHz, 868MHz and 916MHz. LoRa SX1278 is an ultra-low power long range Wireless Transceiver. It supports FSK, GFSK, MSK, GMSK, LoRa and OOK modulations. SX1278 has a programmable rate up to 300kbps. It supports half-duplex SPI (Serial Peripheral Interface) communication. The operating voltage of LoRa SX1278 is 1.8v -3.7v. The Line of Sight (LOS) range of LoRa is 20 kilometers and Non Line of Sight (NLOS) range is 3kms.
The antennas used for LoRa are Omni directional antennas. These antennas can transmit electromagnetic waves in all directions equally. IPEX connectors are used to connect the antenna to the ground (antenna pin) of the LoRa module. It has a frequency range of 433MHz and maximum range of 2.9dB [10].

Arduino UNO
Arduino is the microcontroller board used in this project because of its ease to use. It has 16 MHz quartz crystal, USB connection, 6 analog inputs and 6 PWM outputs, reset button and its operating voltage is 5V. It reads input and shows output by turning on LED [11].

LCD screen
The LCD (Liquid Crystal Display) used in this project is a 16x2 size display. 16 characters per line can be displayed in this LCD and there are 2 such lines. In this LCD each character is displayed in a 5x7 pixel matrix [12].

Software used
The RFID reader uses a software SAAT-520 series to read the tag values. The reader is interfaced with a pc using RS-232. Since Active tags are used, once the COM port is selected, the carrier is opened and the reader is set up to read the tags. A text file is generated with the tag value and the time of the detection of the ambulance. This text file is then read by the Arduino which detects the tag value and compares it to the database. Fig. 3. shows the GUI of SAAT-520.exe application file. It has options to select COM port, the transport layer protocols, and also required language. It can be used for both passive as well as active tag detection. It also displays a list of tag values read along with the read time and number of repetitions.

LoRa transmission
The project started with interfacing the Lora SX1278 with the Arduino. The Arduino database consists of tag values of all HPVs. Once the tag value detected matches with the database, it initializes the counter for the packets to be sent. The baud rate is set at 9600bps. The LoRa library installed checks if the frequency is equal to 433 MHz and will start the transmission of packets only if it matches. Fig. 4 shows the steps of LoRa transmission through the Arduino.

LoRa reception
The receiver LoRa is also set at the same baud rate and frequency as that of the sender. It waits for the message packets to arrive. Once the message is received, it is displayed on the LCD. The steps for reception of LoRa are explained in fig. 5.    The LCD screen will display the message received as shown in fig. 9.   The LoRa range testing was carried out outdoors at the distances mentioned in Table 2. One LoRa module was kept stationary and the other was moved in both LOS and NLOS directions. It was placed at specific marked distances to measure the reading range. The packets were transmitted and received efficiently without any loss observed. The loss was observed only after 100 meters for LOS and after 60 meters for NLOS.

Conclusion and future scope
The proposed system for High Priority Vehicles to avoid the traffic has been successfully developed. The aim of this project was to reduce the road time of the HPV. This system compared to the conventional methods in use has several advantages. It will act like an efficient alert system and thus save lives.
The drawback is that the theoretical range of LoRa is given to be 20 km LOS, and practically it was found that it doesn't cover a long range when configured with Arduino Uno. Hence in real time implementation, the number of LoRa modules will increase. As an alternative either LoRa gateways can be configured or microprocessors with higher output power can be used to increase the communication range of the network. In the future, the system is still to be tested in real time scenarios. The proposed system works with RFID and LoRa being put in Active mode always hence, increases power. If the microprocessors like Raspberry Pi are used, then LoRa can be put into sleep mode which gets activated only when required.