Keywords

1 Introduction

A vehicle tracking is a basic prerequisite in almost all of the organizations today ranging from academic institutions like schools and colleges to government organizations like the military. It provides the benefit of safety and assurance for both the travelers and the people concerned about them. Two of the essential components of vehicle tracking systems are Global Positioning System (GPS) and Global System for Mobile Communication (GSM).

Vehicle tracking systems are imperative in the current generation of increased transportation as the technology is growing at a fast pace resulting in the automated vehicle tracking system being used in a variety of ways to track and display vehicle locations in real-time. This paper proposes a vehicle tracking system using GPS/GSM/GPRS technology with a smartphone application to provide comprehensive service and cost effective solution for users.

The world is experiencing exponential growth in smartphone ownership. As smartphones become more familiar with finding use in the day-to-day lives of people, their influence on society continues to grow. The key force for this growth in smartphone usage is the scope of a large variety of applications to meet the needs of a variety of users. In our work, we develop a smartphone application along with the vehicle-tracking device. The two parts work together to offer the most convenience to the users as they become handy to track vehicle locations in real-time.

In vehicle tracking systems, the vehicle location is one of the most important components. The designed vehicle device works using GPS and GSM/General Packet Radio Service (GPRS) technology installed in a vehicle whose position is to be determined and tracked in real-time The time and location data anywhere on Earth is fetched using GPS technology. For wireless data transmission, GSM and Short Message Service (SMS) technologies are used. A microcontroller is used to control the GPS and GSM/GPRS modules.

The proposed customizable vehicle tracking system uses a smartphone application to monitor the vehicle location fetched from the tracking device powered by a microcontroller powered by GSM. The vehicle tracking system uses the GPS module to get geographic coordinates at regular time intervals. The GSM/GPRS module is used to transmit and update the vehicle location to a vehicle database. A smartphone application is developed for continuously monitoring the vehicle location along with a provision for setting the alarm on reaching the desired destination to make the user aware of his arrival at the destination. The Google Maps Application Programming Interface (API) displays the vehicle on the map, with the route to the destination in the smartphone application using the values in the database. The vehicle location is automatically placed on Google maps, which makes it easier for tracking a vehicle and provides users with more accurate vehicle location information. An alarm is set based on one’s preference like the distance remaining to the destination to prevent them from missing their stop under any circumstances. In addition to all this, if one could not catch the vehicle because of any unfavorable circumstances, the system is designed to dynamically find the new vehicle adopting the proposed system within a range in Kms (specified by the user) which has a stop in that range to accompany that person. By customization, here we mean the ability to modify the system. Eg: Setting an alarm when the destination is 5 km away. Here the user can change the number of kilometers left. It also refers the ability to extend this system for a specific cause like averting any accidents, monitoring fuel in a vehicle etc.

To summarize in few points, we carry on the following

  • Extraction of a vehicle’s geographic coordinates (regarding latitude and longitude) from the GPS satellite in real time.

  • Conveyance of a vehicle’s location information and a vehicle’s ID to a web server equipped with the database at a time interval using the wireless GSM module.

  • The database is scalable and is designed to store and retrieve vehicle’s location information.

  • On a request of vehicle’s location by a user, it can be accessed from the database and displayed on Google maps in real-time using the smartphone application

  • Alarm triggers at the request of the user based on his/her preference. Say “An alarm before 2 km of my destination.”

  • In the case of user failing to catch the vehicle, the application finds another vehicle that has a stop near user’s location. The nearness is quantified using a threshold (in Km/miles).

  • The data collected over a period is used effectively to predict the estimated arrival time of the vehicle.

The paper is as follows. Section 2 compares the various other works on vehicle tracking system and intelligent arrival time prediction system with that of ours. Section 3 details the architecture and functionalities of our proposed customizable vehicle tracking system while Sect. 4 gives the implementation of our work and the results.

2 Related Works

There is a myriad of research works on automated vehicle tracking, and each has its unique methods and features. One of the earliest research work on vehicle tracking was proposed by Eliezer et al. [1]. This system did not rely on the usage of Geographical Positioning System, instead depended on various sensors installed on the vehicle and monitored by cellular transmitter sites. The position of the vehicle is found using the signal strength received on these sites from the various sensors of the vehicle. This system had clearly lacked the accuracy in vehicle’s position as the location is rounded off based on the cellular transmitter sites location. Hence the need of GPS for tracking a vehicle became mandatory. One of the earliest in using GPS to locate the vehicle’s location, in which CPU’s were used to monitor the change in location logs and used to update them periodically using alarm was [2]. These two works were two among the earliest in attempting vehicle tracking system with and without the use of GPS.

Suleyman Eken et al. proposed work that deals with the automated vehicle tracking system by creating smart bus stops installed with Quick Response (QR) codes for the display of the location of the vehicle in [3]. Users registered with that smartphone application can decode that QR code to know about their concerned vehicle’s location. This type of systems does not solve the purpose of vehicle tracking completely as the user has to be at the bus stop to know about their bus rather viewing at their convenience (by staying wherever they are). A fully automated vehicle tracking system with a smartphone application is proposed to check the location of the vehicle periodically is achieved in [4]. This system is highly correlated to our work in the way that it also uses smartphone application as the interface to the vehicle tracking system and has all the features intact such as real-time display of vehicle using GPS and vehicle statistics. We add one of the key features of suggesting an alternate vehicle with the attached vehicle tracking system when a user fails to catch one’s vehicle.

A sophisticated bus tracking system with not only tracking the vehicle but also predicts the number of minutes remaining for the vehicle to arrive at the user’s destination is performed in [5]. Though that system is sophisticated with a lot of features, the arrival time prediction is too trivial with just using mean trip times. A vehicle tracking system can be used for a variety of applications. An another perspective in vehicle tracking by monitoring the speed, the location of the vehicle along with the fuel left to make it easy for the owner of vehicles to monitor is done in [6]. A fully automated vehicle tracking system using GPRS, GSM and a smartphone application with Google Maps API to monitor vehicles real time is conceptualized in [7]. This work is vastly similar to that of [4] on the implementational basis, but the interface comprising lacks the provision to show the case where a user misses one’s vehicle and the alternate vehicle is shown on the smartphone screen.

Zhou et al. propose an intuitive methodology to track vehicles without the use of GPS. It involves the cooperative participation of users by updating their location for other users to know. In this way, a database is built consisting various users and locations. Though this approach avoids the use of GPS, this system still requires updating of location by users in [8]. Our system has far more accuracy than this due to the fetching of exact location using GPS. The usage of vehicle tracking system as a purpose to prevent robbery and accident occurrences is done in [9]. The detection of such occurrences is evident by the trigger caused from the airbag circuitry or through a voluntary press of a panic button by the driver. Apart from preventing these unfortunate incidents, and another work goes to the next level by automatically sending updates to hospitals, police stations and civil defense about any mishappenings is implemented in [10]. These are many such applications one can think of using an automated vehicle tracking system like preventing robbery, controlling vehicle speeds to avoid overspeeding etc. These are derived solutions and our system can be easily extended to support these cases.

Though the above papers were mainly concerned about the tracking of the vehicle and the applications of automated vehicle tracking system to prevent unfortunate incidents, predicting the arrival time using the historical and live data is the need for the hour as the data collected over time can be highly beneficial. Predicting the arrival time in advance using the historical data and the live data is done in [11], where the model uses statistical concepts such as moving average that takes into account both the dynamics of traffic of live data and previous history of data. Those these models seem to predict the arrival times of the vehicles, they are statistical methods that cannot imbibe the dynamics of the vehicle (due to the computational structure of ANN) like ANN can. The data models and the various machine learning prediction models were compared and contrasted for predicting the arrival time of any vehicle which favors the use of Artificial Neural Network (ANN) for its increased accuracy over other models in [12]. It is evident that historical model and even other machine learning algorithms like Regression does not perform as well as ANN [12]. Mehmet et al. provide a comprehensive analysis of various arrival time prediction models such as average time and speed model based on historical data and statistical models like time series and Regression. Finally, an analysis of machine learning models such as ANN and Support Vector Machines (SVM) on GPS data is made in [13]. The analysis favors machine learning models for its accuracy when large datasets are available.

To summarize there are various methods [1,2,3,4, 6] for designing a vehicle tracking system and one of the cost effective methods is the use of microcontrollers. There are also many works in using the vehicle tracking system as an application to prevent mishappenings [7, 9, 10]. While there is also research works, that deals with the designing a vehicle tracking system and using the data to predict the estimated arrival time using statistical and machine learning models [5, 8, 11,12,13]. We are focused on the design of cost-effective customizable vehicle tracking system and in suggesting alternate routes for a user and analyzing the data gathered to create an efficient prediction model using Artificial Neural Network making a comprehensive system.

3 System Design

3.1 Physical Layer

The Physical Layer consists of all the hardware module necessary for the functioning of the vehicle tracking device such as GPS, GSM, Microcontroller (Arduino in this case), Modem and Antennas (Fig. 1).

Fig. 1.
figure 1

Proposed vehicle tracking system architecture (three layered).

GPS module.

The Global Positioning System in vehicle tracking systems are commonly used to provide users with information such as the location coordinates, speed, time, and so on, anywhere on the Earth. GPS module has the GPS receiver with an antenna. The antenna receives the location coordinates from the satellite through a receiver module.

GSM module.

GSM module is responsible for establishing connections wirelessly for passing data. Here, it transmits data acquired from the GPS to a remote server for transmitting the vehicle’s location information, using Transmission Control Protocol/Internet Protocol (TCP/IP) connection through the GSM network.

Arduino microcontroller.

The Arduino UNO microcontroller acts as the brain behind this entire tracking system. Arduino coordinates and controls the GSM and GPS. The code responsible for collecting vehicle’s location and the transmission of location coordinates to the server is compiled and saved in the microcontroller’s flash memory. Upon execution, the program interacts with the GPS module to get the location coordinates and updates the data in the Vehicle Location Database.

3.2 Data Layer

The Data Layer consists of the various databases responsible for the analysis and execution of the prediction model and the tracking system. It consists of the Vehicle Location Database for storing the updated information about all vehicles that have installed the tracking system, a User Detail Database for storing credentials of the user and a Web Server for processing and retrieving vehicle’s location.

Vehicle Location Database.

The Vehicle Location Database consists of the location regarding latitude and longitude and the timestamp of the recent location update of various vehicles in which the proposed system is adopted. This database is the central repository using which the map is displayed in real time on the smartphone application. This is the basis for the training of the prediction model, which is used to predict the estimated arrival time

User Detail Database.

The User Detail Database is used for validation of the various users subscribing the system. When a user subscribes, the credentials of that user such as username, password, and associated vehicle ID is stored in this database. This data is used for validating when the user tries to sign in to the smartphone application.

AWS Web Server.

The Amazon Web Server (AWS) manages both the Vehicle Location Database and User Detail Database. A Java servlet, responsible for retrieving the associated vehicle location when the respective user requests. The Java Servlet also handles alternate bus route requests where it computes the nearby bus stops that are possible for the user to reach to another bus.

3.3 Application Layer

The Application Layer details the various features offered to the end user through the smartphone application and the prediction model that is responsible for predicting the arrival time of a vehicle in advance.

Smartphone Application.

The smartphone application (app) acts as the central module that coordinates all the other modules and displays the information needed for the user intuitively. The app has a Maps Activity that displays the position of the vehicle in real-time graphically using the coordinates (latitude and longitude) from the database through Google Maps API. A feature for setting the alarm based on preferences of a user such as the distance and time remaining to reach the destination. In the case of failing to catch one’s vehicle, a feature to find an alternate vehicle which has a stop within the threshold radius (as specified by the user). The path for the new vehicle is also shown on the smartphone application.

Google Maps API.

Google Maps API for Android is used to display a vehicle location on a smartphone application using Google Maps real-time using a Hypertext Transfer Protocol (HTTP) request. The Google Maps API automatically handles access to the Google Maps servers, displays map, and responds to user gestures such as drags and clicks. The API can also be used to suggest paths to the destination through markers and lines. The API is modified for our convenience to display not only the location of the vehicle but also suggest other vehicle paths a user can take in the case of failing to catch one’s vehicle.

Alert Service.

After a user successfully signs up for the tracking system and once the system starts tracking the bus, the user need not constantly look into their phones, as the application gives timely notification updates and warnings when the bus nears the user’s bus stop. The significance of our system is to avoid the constant use of the application by the user while driving on the road.

Subscription Service.

When using the application for the first time, the credentials of the user are requested and added to the User Detail Database. By this way, the user chooses to subscribe the system using the smartphone application. These credentials are used every time to validate the authenticity of the user on signing in to the application.

Prediction Model.

Using the data collected from the vehicle tracking device comprising of GPS and GSM powered by the microcontroller, a predictive analysis methodology is adopted when the system fails to have access to the Internet. The data collected over a period when the user used the smartphone application is recorded and structured. The data is personalized to the type of vehicle a user had used for enabling a better prediction rather having a generic prediction. The data enables a prediction of the arrival time of the next stops or the user’s destination stop in seconds with a better accuracy than a generic prediction model.

The data is modeled with features as various stops to reach the destination a particular user passes by every day. The pattern within the data is analyzed with the help of ANN and extracted to produce meaningful output in some minutes/seconds left for the destination.

Graphical User Interface.

The Graphical User Interface (GUI) is the core through which the user interacts with the tracking system. The GUI can show the current location of the vehicle, enable a marker for setting the alarm at the desired location, and show alternate vehicles in case of failing to catch one’s vehicle, respond with an alarm on reaching the desired destination.

4 Implementation and Results

This section deals with the implementation of various services discussed in Sect. 3

The User Detail Database stores the user’s credentials such as username, password, and the associated Vehicle IDs respective to the user. Table 1 is used for validation and displaying particular user’s vehicle on Map in the smartphone.

Table 1. User detail database.

Table 1 stores fields such as Username and corresponding vehicle IDs. Table 2 is of prime importance for displaying the vehicle on a smartphone in real time.

Table 2. Vehicle location database.

The Graphical User Interface consists of the following. Figure 2 describes the provision to set the alarm by pinching the location on the smartphone screen, Fig. 3 shows the shortest traversable path by the vehicle between the current location of the vehicle to the location where the alarm is set.

Fig. 2.
figure 2

Setting an alarm for a desired location.

Fig. 3.
figure 3

Shortest traversable route from Alarm location to current location of vehicle.

Figure 4 gives the other vehicles currently inside the radius defined by the user while Fig. 5 signifies the vehicles that have a stop in the radius with a green mark and the vehicles that don’t have a stop with a red mark.

Fig. 4.
figure 4

Other vehicles within threshold at time ‘t’.

Fig. 5.
figure 5

Vehicles with stop within threshold radius (indicated in green). (Color figure online)

Table 3 shows a sample data collected for a vehicle over a period of ‘n’ days for the different stops it traveled. The data is in seconds to maintain the accuracy of prediction in seconds.

Table 3. Vehicle data

Table 3 shows the Vehicle Data, where each row gives the seconds elapsed on arrival for various stops, while each column gives the various stops. The data was collected for 200 days (n = 200). The data collected is efficiently analyzed and can be used to predict the arrival time of the vehicle when the application is not connected to the Internet. All the dynamics of the vehicle is covered such as delays, traffics that is evident from the data collected. The data is mapped to the ANN model where the input neurons are the various bus stops reached in seconds. The input is centered and normalized between 0 and 1. The output neurons in the output layer give the current time in seconds to reach various stops.

Figure 6 conveys the mapping of vehicle data parameters such as the various stops and time in seconds to ANN.

Fig. 6.
figure 6

Mapping vehicle data to ANN

The input values are the seconds taken for the arrival of each stop obtained from Table 3. The data of 200 such days are used. The hidden layer is responsible for establishing the connection between input and output layers where most of the computations take place. The number of hidden layers is 1 in the figure (sample). Weight matrix 1 and 2 are the weights in floating point numbers responsible for establishing a relation between input layer with the hidden layer and the hidden layer with the output layer. These weights are dynamic and tend to change as the data is loaded one by one. The ideal set of weights are obtained through Gradient Descent Optimization technique, and the errors are calculated using backpropagation.

The data consisting of the time ‘t’ of each stop of each day of a vehicle is randomly generated with constraints to simulate an actual vehicle’s dynamics in time when traveled over the same path multiple times. The vehicle is assumed to have six stops including the start and destination and hence a six input and six output Neural Network is created. The number of hidden layers is fixed after iteratively increasing the hidden layers. The number of hidden layers cannot be too high as the training data is prone to overfitting and the computation budget may conflict, while the number of hidden layers cannot be too low as the network cannot imbibe the data and extract the pattern efficiently. Here the number of hidden layers is fixed as five after balancing both the conditions specified and the dimensions of the seven layers are 6 × 8, 8 × 8, 8 × 16, 16 × 16, 16 × 8, 8 × 8, and 8 × 6. The data is the time ‘t’ in seconds for each of the six stops as given in Table 3 and the output is the deviation in arrival time of each stop from the ideal time in seconds. The training was carried on for 60000 iterations and the error (difference in actual time delay and the predicted time delay) is obtained.

Figure 7 plots Error of training vehicle data. The data collected is split into training and test on 80:20 ratio (ideal split ratio for training and test data) and the model is trained on training data. The model is then run on test data to analyze its efficiency in prediction. Thus, for a bus covering six stops daily, the data collected over a period can be modeled using a six input six output ANN with hidden layers in between. The Network is trained to reduce the prediction error using Gradient Descent Optimization. The data is trained in batches to prevent any pattern in the data affecting the outcome of the prediction, and the training error was recorded for each batch.

Fig. 7.
figure 7

Variation of error with Iterations

Table 4 shows the comparative result analysis of the features of our system with the other systems through a survey made through the works described in Sect. 2. As evident from Table 4, the proposed system is capable of working offline by using the data collected to predict arrival time using ANN and another key improvement made is the ability to find alternate vehicles that have a stop within the radius mentioned by the user as shown in Figs. 4 and 5.

Table 4. Comparative result analysis

Before concluding, we would like to brief the merits and demerits of the system. One of the key advantages of this system is its ability to work both online and offline using Intelligent Prediction. The other advantages include its features as tabulated in Table 4. Some of the challenges that we overcame include stale vehicle location in the database, Google API server call limits. On the downside, the system may fail to perform in finding alternate vehicles if the data connection is poor as this operation is server intensive. So in the case of poor data connection, the users cannot rely on our system heavily.

5 Conclusion

The results obtained for the predicted values of the arrival time of the vehicle is well consistent with the reality of the travel as all the dynamics such as traffic, bus delay is considered. The results presented can potentially support for the use of the real world intelligent vehicle tracking system. The ability to suggest alternate routes or vehicles can help many people who miss their buses frequently. Overall this system can be efficiently used for people to track their vehicle routes and alternate vehicles and for predicting the arrival time of the vehicle, even when not connected to the internet. In the future, we would like to extend this system across vehicles to support vehicle to vehicle communication to carry on tasks like routing, vehicle capacity and thereby benefitting humans by completely eliminating manual handling.