Vehicle Talks to IoT for Better Driving Experience

Internet of vehicles (IoV), or vehicles to everything (V2X), is a relatively new concept for all vehicles connected to the internet. In this paper, we propose a solution to the problems of traffic congestion. Road traffic congestion has continued to be a major problem in many developed countries. This concept shows the place or location traffic congestion occurs at the time of rainfall, the position of the data based on GPS, and the sensors in the vehicle. The sensors in vehicles are used to collect information for the purpose of evaluating traffic congestion through cloud server via protocols such as CoAP and MQTT. At the beginning of the study, the authors introduced the problems and then proposed a solution.


Introduction
Internet of Things (IoT) have many benefits and features in technology.It creates a major change in the behavior of people's daily lives.IoT is able to save time, money and effort as well.It creates new opportunities for development, innovation, and knowledge.Also, IoT is able to solve challenges smart cities are facing by providing and collecting information.When IoT technology intervenes in the field of vehicles, it creates a new concept.The concept of Internet of Vehicles (IoV) is a future for smart transport.Smart sensors in vehicles are used to collect information from cloud server by using protocols such as CoAP and MQTT.This requires robust sensors which are able to deliver reliable information to the systems, such as vehicle status, position, energy usage profile, and driving profile.They interact with external systems (traffic control systems, parking management, electric vehicle charging).The idea is that an IoT can be assigned an IP address and provided with the ability to transfer data to a network.Vehicle fuel sensor is capable of alerting the driver when the tank is empty and shows the energy status of the vehicle.The IoT protocols will allow monitoring and controlling remotely over an existing network, resulting in improvement based on accuracy, efficiency, and security.In the past years, the new advantages implemented by the vehicle (automobile) manufacturers, became increasingly software driven and dependant at the same time.The auto industry has a longer and richer track record than any other sector by offering a series of improvements aimed at safer driving or self-driving in order to avoid a collision.However, this can be done by studying how IoV can eliminate the needs to be in the close connection with a vehicle to perform diagnostics.Through surveillance, all the aspects of the vehicles are easier to reveal any trouble in advance by sending all sensor readings to a certified center where the service of the vehicles company will be able to find and predict check failures of key systems integrated into the vehicle.In addition to the check part, this management system will help drivers to keep track of the yearly maintenance, programming service appointments or in analyzing the fuel consumption as well as giving advice for a friendlier driving style.In a difficult (extreme) situation such as in the case of an accident, a system would be able to inform the emergency rescue service when the driver is helpless, finding the chances for the wounded to live by reducing the overall time of the rescue mission.

Problem Statement
Safety in the vehicle is one of the main issues.In order to ensure the safety of driver and passengers, it is of very important that all the information provided by the embedded sensor is more reliable.Large number of applications needs to be integrated in order to receive data from several sensors inside the car, especially important application that determines the position of the car.The second problem is the traffic congestion at the time of rain.This will be a major threat to the driver causing a risk of an accident or a potential accident.The safety of the road is the second main factor in order to ensure the safety of the driver and passengers.Most of the vehicles have navigation connected to GPS that has alarm function providing the safety data including weather or traffic congestion.Mobile phone apps also have these functions.Thus, these methods could alleviate congestion and increase driving safety by providing this data to the drivers.However, in case of rain or snow, the vehicles need to slow down and this causes traffic congestions.This kind of congestion has more effect on the safety than normal congestion caused by traffic or vehicle accidents.In case of congestion caused by rain or snow, drivers are facing higher risk of accidents to occur.Time of rain or snow cause the risk of vehicle direction deviation, and lack of vision among drivers is considered a challenge in driving safety.To increase safety in case of congestion caused by rain or snow, drivers need to have data about weather and the kind of traffic in narrow range.This data in narrow range and the reason for exact congestion could not be provided to the drivers through current mobile weather alarm and vehicle GPS, which can only provide data in the wide range that might be insufficient to the driver.In case of autonomous vehicles, this data becomes more essential to have in order to increase driver safety in time of unstable weather.In the near future, vehicles will be self-driving on roads in several states in the world like California, Texas, and Arizona.There won't be reliance on another device, like mobile phone, to know the vehicle data or any data that is useful to the drivers.The total reliance on IoT technology will be in the vehicle for the purpose of collecting data.The drivers can obtain a weather alarms easily via mobile app, although the data will not be accurate.Also, drivers with a smartphone could know the area where there is traffic congestion through GPS.However, in this system, accurate information about the rain level is shown and detected in sub-module which is implemented as rain level detection algorithm by reading real-time sensor information from the database, checking for wipers speeds in the vehicle, and then preparing data to make the needed IoV path way.In addition, vehicle should be able to organize themselves in order to avoid traffic congestion and to optimize drive energy usage.In the field of vehicles, vehicles today are provided with a rapid and strong development, and will rely on themselves to provide data and make decision based on this data.However, this may be done in coordination and cooperation with the infrastructure of a smart city traffic congestion control and management system.

IoV (Internet of Vehicle)
IoT is able to organize the vehicles in order to avoid traffic congestion and to improve drive energy use.This may be done in coordination and cooperation with the infrastructure of a smart city's traffic control and management system.More mutual communications between the vehicles and the infrastructure makes it possible to employ new methods to achieve traffic safety, and then take part in the reduction of the number of traffic accidents.
The connection of internet to vehicles enables information sharing and collection of information on vehicles and infrastructure.Moreover, it enables the processing, computing, sharing, and creating of security path to the information on the information platforms.Based on this data, the system can effectively guide and supervise vehicles, making transportation easier and safer.Smart sensors in the vehicles and in infrastructure produce a lot of information about the state of vehicles and roads.This information provided by sensors is collected and sent through protocols to a cloud server to be analyzed and is then sent again in the form of realistic results to vehicles [2].

Related Studies
In the study paper titled "Road Traffic Congestion in the Developing World," authors Vipin J, Alshlesh S, Lakshminarayanan S [3] illustrated that the goal is to design mechanisms to detect the state of traffic congestion in and around critical congestion areas, and also to design simple preventive mechanisms to prevent critical congestion areas from hitting congestion collapse algorithm based on the analysis of traffic images from live traffic.The image processing algorithm is aimed at estimating traffic density at a hotspot by using CCTV camera feeds.There are several metrics that defines traffic characteristics in this paper such as speed, flow, and density of a link.The detection mechanism is divided into two parts, daytime and a nighttime estimation methodology.Both mechanisms are different due to the high environmental differences, which results into two different image processing techniques.Apart from the environmental differences, vehicle's headlight and billboard illumination add considerable noise to the image making vehicle which counts difficult.The hardest part of the problem of determining the traffic congestion is in the nighttime.Nighttime congestion detection is a harder problem because of multiple extraneous factors.Also, the absence of light eliminates typical vehicle feature estimation techniques.The next contender for vehicle identification becomes headlight counting, which suffers from light reflection and alternate light sources such as billboards and traffic signal lamps.In this case, light from multiple vehicles becomes difficult to distinguish and provide correct information in this system [3].In another study titled "Effect of Rain on Travel Demand and Traffic Accidents," authors Edward Chung, Osamu Ohtani, Hiroshi Warita, Masao Kuwahara and H. Morita [4] illustrated that in the relationship between the weather and the performance of traffic, and the traffic road deteriorated with poor weather, there is no detailed information to the driver.Therefore, this study is addressed using mesoscale weather data and numbers of trips and accidents recorded on the Tokyo Metropolitan Expressway.It also uses ITS speed limit and warning messages displayed on VMS which is only applied under wet conditions based on meteorological stations, to reduce the number and severity of accidents [4].In addition, this study shows the number of accidents during rain in several ways as shown in Table 1 and Figure 2.However, none of these studies based on the aforementioned solutions present a way to deploy the monitoring system easily, nor do they mention the use of a highly distributed system, which is a key component of IoV traffic congestion.Most importantly, the related papers did not thoroughly test their IoV systems to prove that their solutions are reliable on a large scale.

Figure 2. Percentage of accidents occurred during rain
After using this IoV system, the traffic accidents will decrease during the rainy season in a large percent.This is accomplished by using MQTT Mosquitto broker to transfer data from wipers sensors from the vehicle to cloud server, to help drivers to avoid the traffic congestion.Real time provision of the correct information can be a solution to the traffic congestion, but vehicles must be connected to the IoT all the time.

Proposed Solution
In this proposal, we are focusing on a solution to the problem of traffic congestion when it is raining and the vehicle slows down, and when there is traffic.Also, we can measure the amount of rain by using the sensor to calculate the amount of falling rain on the windshield wipers.The sensor uses wipers movement speed and vehicle location.The windshield wiper is a device used to remove rain or snow from the windshield.A wiper usually consists of a metal arm, pivoting at one end with a long rubber blade attached to the other.A motor powers the arm; the blade swings back and forth over the windshield and pushes water from the windshield.Most new vehicles have sensors wipers that are able to remove rain or snow from the windshield automatically.On the other vehicles, the driver can change the wiper speed depending on the amount of rain on the windshield.Therefore, these two cases have different kinds of solution method.

Manual Wiper Case
The wiper has several continuous speeds with basically two or more settings.Most vehicles use one or two of the wiper arms.In wiper speed control levels, there are three movements.The first is an IN Intermittent wiper, second is LO-Low wiper speed, and the third is HI-High wiper speed, which is selected by the driver.Depending on the sensor of the wiper speed, the amount of rainfall can be determined.That means the rain amount will be calculated by the wiper speed as shown in Figure 3

Automatic Wiper Vehicles Case and Autonomous Driving Vehicles
New vehicles have a rain sensor system.This approach could apply to autonomous vehicles.Vehicle's rain sensors posses the ability to measure how many raindrops are on the windshield by detecting the light reflected internally by the windshield glass.Therefore, if there are more rain drops on the windshield glass, the reflected backlight will be more-less.Based on this approach, sensor can detect the amount of rain and tell the appropriate speed for the controller.

System Configuration
This proposal is based on IoT technology.IoT must consist of three main elements which are transmission device, sensor, and wiper.The reason for using network and cloud data server is to guide drivers and analyze sensor data by using optimization algorithms and giving drivers a safety route.Technically, this system has the capability to provide maps based on gathering the wipers sensor data and vehicle GPS for confirming the route if there is a traffic jam or not.Also, data based on the level of rain can provide drivers another way by showing them IoV path that has less level of rain.This system measures the velocity of wipers, and will rely on the reading sensor.To measure this speed, the sensor will be connected to the wiper switch cable with wiper motor.Another section to the sensor senses the output of the transmission, whereas the opposite side of the sensor is connected to wipers, which generates a voltage that is then transmitted to a software controller.The software controller then calculates the speed and shows it with real numbers.The sensor will depend on the wipers speed part of a second; then the wipers speed sensor generates a magnetic pulse in the form of a wave.When the wipers are moving at any speed, the sensor wipers will generate a frequency signal depending on the wipers speed that is directly proportional to. Figure 4 shows the system.The Rain level detection sub-module implements the rain level detection algorithm by reading real-time sensor information from the database, checking for wipers speeds in vehicle, and then preparing data to make the needed IoV path way.The IoV path way sub-module receives collision information from the collision detection sub-module, which performs the path way adjustments and sends the updated path way to the IoV management module where it can be deployed to the IoV.The Rain alerting sub-module reports detected rain level and adjusted path way data to the driver management module, where it can then be displayed to the driver, as shown in Figure 5.

Data Acquisition and Recommended Route
After receiving location and data sensors from a vehicle, it is published via MQTT protocol to cloud server.Drivers have another option which is receiving recommended route based on their location in the area so as to avoid bad weather conditions.Sensor data and positioning data will be stored and analyzed on the cloud server.Then the system can generate the best route that can include main roads as well as side and alternative roads.Also, there will be an alert message generated via the Android application.The alert message generated is published on MQTT broker with a specific topic name.Thereafter, that route will be assigned as a recommended safe route when the administrator, through the analysis of data sensors and location, has confirmed it.

Timeline Evaluation
The Timeline of providing data evaluates the system execution.The optimal time has to be in few minutes' range.The following Equation and Figure 6 show the Timeline of providing the data in this system.

IoT Protocol
For this purpose, we will be using MQTT because The MQTT protocol is a lightweight message queuing and transport protocol.Also, MQTT is suited for the transport of telemetry data from sensor.MQTT is very lightweight and thus suited for M2M, WSN in the end IoT where sensor and actor nodes communicate with applications through the MQTT message broker.The protocol, however, publishes and subscribes in disparity to HTTP with it, which is a request and response model.Publish and subscribe is sensor output and they enable messages to be pushed to drivers.The important communication point is the MQTT broker.Broker is in charge of dispatching the whole messages between the senders and the right receivers.Every driver sends message to the broker, with a subject into the message.
The most relevant MQTT parts for this proposal division of publisher and subscriber can be featured in the following points:

Mosquitto MQTT Driver
The MQTT driver is used fundamentally as a publisher for information received from the MCU device.All information collected from sensors are sent to the broker over the network.All information in the cloud server are real-time and they are analyzed and made instantly available to drivers.The MQTT broker is considered to be appropriate to keep the processing power needed for the system.It uses real-time location through GPS service in the system for more

MQTT Broker
Driver Driver Driver Driver Driver accurate measurements.The Mosquitto MQTT server is used to send and receive information between the publishers and subscriber and to manage information collector as shown in Figure 8.In the future, a powerful platform with many users will be made.Hence, the focus here will be on the communication vehicle to anything (V2X) with the cloud server, more precisely to send diagnostic information by IoT protocols.

Conclusion
In this proposal, a scenario for IoT connected vehicle is illustrated by using MQTT Mosquitto broker to transfer data from sensors in the vehicle to cloud server in order to avoid traffic congestion and to reduce the number and severity of accidents during rainy condition.IoT integrated solution will provide correct information in order to avoid similar scenarios.Driver is presented with real information at real time.Therefore, the following are the most important points to connect IoT to the vehicle: § IoV enhances the driving experience by sending information to the cloud for more analysis.§ Protocols like MQTT are lightweight and they send data of the sensors effectively.§ Many IoT data means a lot of information about the driver and vehicle.§ Difficult driving conditions like driving in the rain need to be analyzed individually.

Sensor
Sensor Sensor

Figure 1 .
Figure 1.Vehicle connected to the internet below.

Figure 3 .
Figure 3. Connect the wipers speed with Rain level

TFigure 6 .
Figure 6.Timeline of Providing the Data