GPS-based highway toll collection system: Novel design and operation

: The requirement for vehicles to halt for toll fee payment results in traffic congestion and reduces fuel efficiency. In this paper, hardware and software designs were involved to develop a GPS-based highway toll collection system. The system utilised the Raspberry Pi 2 as the microcontroller. Additional electronic modules such as GPS module, LCD module, speaker, wireless Wi-Fi router modem and wireless Wi-Fi adapter were included to perform specific tasks. The system utilised GPS coordinates to track vehicle and toll fees were incurred at predefined points. The travel summary was recorded in the online database. Furthermore, an automatic delay time adjustment system was studied and was implemented to reduce the power consumption of the system without compromising the accuracy. A personal cloud server was configured to allow online access of travel logs. The developed system promises motorists a smooth travel journey and eliminates the construction of expensive toll booths.


Introduction
Road pricing or tolling can be defined as the practice of fee collection from motorists who use roadway facilities (U.S. Department of Transportation Federal Highway Administration, n.d.). The collected toll fees are often used for expansion, operational and maintenance purposes. Traditionally, toll fee was manually collected via cash or card transactions at dedicated toll booths. However, this ABOUT THE AUTHORS The research group focuses on systems and machines intelligence which includes intelligent sensing and detection, microcontroller-based applications, infrared sensing applications and optical sensor technologies. The researchers are also interested in the application of artificial intelligence in decision making and classification for systems monitoring and control. There are a few ongoing projects such as those related to intelligent transformer insulating oil monitoring, developing portable surveillance system with intrusion alert notification, face recognition system, intelligent sensing for undersea power cables and developing software for electricity theft detection.

PUBLIC INTEREST STATEMENT
The practice of road pricing or tolling has constantly posed challenges from the perspectives of road user experience and system implementation. Manual toll collections cause peak hour congestions, whereas modern electronic toll collections are often associated with high construction and maintenance costs. This paper aims to seek a viable solution by proposing road pricing based on the Global Positioning System (GPS). A GPS-based highway toll collection system was developed by equipping a microcontroller with third-generation (3G) and GPS connectivity. The constant acquisition of GPS coordinates acted as the basis to track travelling vehicle and to perform all necessary toll collections. With additional works to improve the overall system accuracy and reliability, the proposed system can easily be commercialised as a future toll collection technology. system was often criticised as motorists were required to stop to pay the fees. The stopping of vehicles results in traffic congestion at the toll booths during peak hours and have been proven to result in fuel inefficiency.
To effectively address the complications from manual toll collection, electronic toll collection (ETC) was proposed. The idea was originated from the Nobel Economics Prize winner, William Vickrey, who suggested to equip all cars with an electronic identifier (Library Economics Liberty, n.d.). The electronic identifier refers to a transponder that allows personalized signal to be delivered to a central computer from specific road sections for bill calculation (Kelly, 2006). This idea was first adopted at toll booths in Norway in the year 1986. By 1991, Trondheim in Norway became the world's first city that implemented the unaided full-speed electronic tolling (ONE-ITS, n.d.). This system is advantageous as it significantly reduced time delay due to toll payment. As popularity grew with this concept, gantries gradually replaced the traditional toll booths, allowing sensors to be installed for easier detection.
Unfortunately, from here, additional issues were raised in response to gantry usage. First, gantry constructions are expensive. Next, gantry breakdown may disrupt toll collection and regular maintenance is thus necessary. A possible solution to these issues is to implement road pricing based on the Global Positioning System (GPS). The earliest project on GPS-based road pricing was accompanied with a field test in Hong Kong in 1997 (Catling, 2000). In 1998, the European Union published a report that proposed the usage of Global Navigation Satellite System (GNSS) to charge vehicles by distance (Brussels, 1998). These early works gave rise to more concepts and variations of GPS-based road pricing. Lee, Jeng, Tseng, and Wang (2004) and Xu (2005) both provided comprehensive investigations and reviews on the architecture of GPS-based toll collection system as well as addressing possible design issues. Srinivasan, Cheu, and Tan (2003) proposed a GPS-based road pricing system using map matching method. Moreover, Ren and Xu (2010) proposed another system rooted upon node matching. Not least, Dias, Matos, and Oliveira (2014) came up with the concept of a smartphone-based toll collection system which was interoperable between traditional ETC and new GNSS tolling. Interesting as these concepts may seem, their implementations, however, require sophisticated algorithms and complex system setup, resulting in commercialisation challenges. Hence, through this research, we demonstrate for the first time that a GPS-based highway toll collection system which can be easily commercialised can be developed using a microcontroller with thirdgeneration (3G) and GPS connectivity.
In this paper, details of the experimental setup will be provided. Next, the results of the developed GPS-based highway toll collection system will be discussed, enlisting the general operation of the system. Further experiments and analysis were carried out using the developed prototype in order to incorporate additional features that produced a more robust and highly efficient system.

Experimental setup and details
The developed GPS-based highway toll collection system acquired GPS coordinates constantly to pinpoint the position of the travelling vehicles. Toll fee would be charged whenever a specified toll collection point was reached. The travel details will subsequently be recorded. To achieve all the tasks specified above, a system as shown in the block diagram of Figure 1 was planned and designed.
In terms of hardware, Raspberry Pi 2 was used as the microcontroller for the system. A GPS module was integrated for GPS coordinate acquisition. Moreover, a LCD module and a speaker were included for notification purposes. A wireless Wi-Fi router modem and a wireless Wi-Fi adapter were used to set up a cloud server which allowed remote database access. Meanwhile, in terms of software development, Python was selected as the main programming language. The functions and purposes of each module are summarised in Table 1.

System configuration
Raspberry Pi 2 was the microcontroller chosen for this project upon considering factors such as processing speed, capability as mini server and communication methods. This microcontroller ran on Raspbian, a Debian-based operating system (OS) optimised for Raspberry Pi hardware. The Raspbian OS was chosen since it contains a large numbers of mature packages and pre-compiled software which can perform various tasks (Raspbian, n.d.). The Raspbian image was first flashed into a 32 GB micro-SD card. The micro-SD card was then inserted into the microcontroller to be loaded.
The GPS module utilised in this project was the Adafruit Ultimate GPS Hat module (Adafruit, n.d.). Several microcontroller boot options were modified before the GPS module could be utilised (Pi GPS Setup, n.d.). These modifications were done to the cmdline.txt and inittab files which enabled access to the Rx and Tx pins of the microcontroller for GPS data receiving.
Furthermore, an additional Global Positioning System Daemon (GPSD) package was installed. This package was used to translate the raw serial data from the GPS module into a system of variables which was easier for programming purposes (Use 'gpsd', n.d.).
Moreover, a 16 × 2 character LCD module was included in the GPS-based highway toll collection system to provide notification on toll location and pricing information. The LCD module was interfaced with the Raspberry Pi 2 microcontroller via GPIO pins using the Inter-Integrated Circuit (I2C) protocol. In order to access the LCD module, the I2C kernel has to be installed in the microcontroller (Setting up your Pi for I2C, n.d.). Upon installation of the I2C kernel, the I2C settings on the microcontroller were configured and the secondary I2C pins of the microcontroller were enabled (Setting up your Pi for I2C, n.d.).
In addition, a speaker was included for user alert purposes. The speaker was connected to the AUX jack of the microcontroller. The notification audio files stored in the /home/pi/tonido/ folder of the  Not least, several structured query language (SQL) databases were established for the highway toll collection system. These databases aimed to store the information of all toll destinations and record the travel history of users. Usage of SQL databases was made possible by installing the SQLite application in the microcontroller (Riley, n.d.).
Three databases were created using a windows-based software called the DB Browser for SQLite (n.d.). The databases were (1) database.sqlite This database contained general information of predefined toll destinations such as location name, coordinate and toll pricing.
(2) sql.sqlite This database logged the travel of users by recording the toll destinations passed through, time of travel and payment incurred.
(3) speed.sqlite This database recorded the time of travel, coordinate and speed of vehicle when speed limit was exceeded.
The created database files were stored in the /home/pi/tonido/ folder of the microcontroller.
Lastly, a cloud server was established to provide remote access to the travel logs stored in the SQL database. The set-up of the cloud server required a wireless Wi-Fi router modem and a wireless Wi-Fi adapter. The D-LINK DWR-710 wireless Wi-Fi router modem (D-Link, n.d.) was inserted with a SIM card to establish a wireless 3G connection. Meanwhile, the Edimax EW-7811Un wireless Wi-Fi adapter (Edimax, n.d.) was attached to the microcontroller to allow access to the established 3G network.
The cloud server software adopted was the Tonido Cloud Server application (Tonido, n.d.). Upon installation, account setup was done at the Tonido website through the URL http://<RaspberryPi IP Address>:10001. The Tonido Cloud Server application was configured to run automatically on microcontroller boot by installing the Tonido init.d script in the /etc./init.d folder of the microcontroller.

System program
The program flowcharts of the GPS-based highway toll collection system are illustrated in Figures 2  and 3. The entire program operation was performed through three Python scripts, namely: (1) parallel.py The main program script that governed auto-run and initiation of the two sub-scripts, internet-GPS.py and working2410.py.
(2) internetGPS.py This script was used to constantly check for internet connectivity.
(3) working2410.py This script performed the main task of GPS positioning for highway toll fee collection. Additional features of travel logging, speed detection and automatic delay time adjustment were implemented as well.

Improvement features
In order to improve the reliability of the GPS-based highway toll collection system, a feature of internet and GPS connection availability detection was implemented. Internet connectivity was checked by pinging www.google.com at a fixed interval using the internetGPS.py script. On the other hand, GPS connection availability detection was integrated within the working2410.py script. Prior to the acquisition of GPS coordinates, GPS signal availability was detected using the GPS module variable gpsd.fix.mode.

Figure 3. Flowchart for internet connection availability detection (internetGPS.py).
Moreover, a feature of automatic delay time adjustment was included to allow accurate location detection without consuming too much power from the microcontroller. An analysis was done along the South Klang Valley Expressway, Putrajaya, Malaysia, which allowed a maximum longitudinal displacement. GPS coordinates were acquired at no delay, 5 and 10 s delay while the vehicle travelled at speeds between 0 and 80 km/hr. The results were plotted and analysed to determine the optimum delay time relative to travel speed.

Availability of internet and GPS connection
The availability of internet and GPS connectivity was vital for the operation of the GPS-based highway toll collection system. Hence, internet and GPS connections were detected before system operation.
Internet connection was checked using the internetGPS.py script. The script functioned by pinging www.google.com at 15 s intervals. If a ping was not replied, the script concluded that no internet access was available and the user was warned. In case the condition retained for a minute, an alarm audio will then be played.
GPS connectivity was detected using the working2410.py script. The script utilised the gpsd.fix. mode variable of the GPS module to perform the detection. When the gpsd.fix.mode variable recorded a value of 1, it indicated that the GPS module did not receive sufficient data for coordinate pinpointing and the user was notified.
The unavailability of internet and GPS connectivity alerts users on possible faults in the highway toll collection system in cases where connectivity is not detected over a long travel distance. Moreover, data on signal availability can even aid road planners in assigning toll collection points since areas with poor internet and GPS signals can now be avoided.

GPS-based highway toll collection
The operation principle of the developed GPS-based highway toll collection system was easy to follow. The system tracked the travels of a moving vehicle from the acquired GPS coordinates. The acquired coordinates were constantly compared with the predefined coordinates of the toll collection points in the database.sqlite database. Whenever a match was detected, the toll collection for the matched destination was performed through debit transactions. User would be notified on the toll location and payment details through the LCD module as shown in Figure 4. History of all toll payments were then recorded in the sql.sqlite database as shown in Figure 5. Moreover, an additional feature of speed tracking was implemented. For instance, whenever the moving vehicle exceeded the presumed limit of 60 km/hr, the instantaneous time, location and speed will be recorded in the speed.sqlite database. The speed tracking feature can be utilised for speed limit enforcements and directly incurs a fine when a speed limit is exceeded. In addition, in case of the unavailability of debit transactions, these travel histories can be referred for a one-off periodic billing.

Automatic delay time adjustment
Since the GPS-based toll collection system is powered by the existing car battery, power efficiency and power management is crucial. It is energy inefficient to continuously acquire the GPS coordinates of the vehicle since this approach increases the overall power consumption of the system. However, due to the dependence of the system on GPS coordinates, an optimum time delay or interval between two GPS coordinate acquisitions needs to be determined.  This optimum time delay was governed by the automatic delay time adjustment scheme. The methodology for the analysis of the automatic delay time adjustment scheme was discussed in Section 2.3 and the results were presented in Figure 6. From the plotted data, it can be observed that an increase in acquisition time delay led to greater longitudinal differences. Hence, to accommodate for low power consumption and accurate positioning, a 5 s delay was appropriate. However, this delay incurred inaccuracies when vehicles were moving at high speeds. Extrapolation was done with the collected data to predict longitudinal differences in response to speed changes as seen in Figure 7. From this extrapolation, the automatic delay time adjustment scheme was proposed at a speed threshold of 100 km/h to maintain an acceptable longitudinal deviations. In short, at a speed below 100 km/h, a 5 s delay will be introduced for GPS coordinate acquisitions. Alternatively, at a speed above 100 km/h, no delay will be introduced for coordinate acquisitions.

Commercialisation values and considerations
The proposed GPS-based highway toll collection system exhibited great potential for commercialisation. The proposed toll collection system has low power requirements and operates at 5 V. This operating voltage allows easy integration into existing car electronic circuitry that runs on 12 V. Moreover, the hardware components adopted in this prototype are matured technologies and are at reasonable cost. This cost is anticipated to be even lower upon commercialisation due to economies of scale. Not least, the installation of the toll collection system will not affect the overall user driving experience. The miniature box design takes up minimum space and allows the system to be installed on the vehicle's dashboard, preserving the driver's line-of-sight and granting the best GPS signalling. Despite the simple system installation stated earlier, several possible limitations should be carefully addressed. Firstly, the developed GPS-based highway toll collection system may register inaccurate toll collection when roads overlap due to the presence of flyovers or parallel roads in a highway structure. The issue of road overlapping can be solved by strategically allocating toll collection points at locations that minimise the tendency of road overlapping. A hardware upgrade may be implemented as well by replacing the GPS module with a Differential Global Positioning System (DGPS) module of higher accuracy at the expense of higher cost. Furthermore, the presence of twoway traffic flow may result in complications during the implementation of the GPS-based highway toll collection system. It is highly recommended to assign equal toll fees for both traffic directions to avoid incorrect charges due to slight location deviations. The practice of referring to previous travel coordinates prior to toll collection can also aid in identifying vehicle travel direction and ensure accurate toll fee collection.
In addition, sudden breakdown of the GPS-based highway toll collection system which results in the failure to acquire internet and GPS signals should be taken into account. Future works may include a redundant distance measurement circuitry to ensure proper toll collection in case the main system fails. Lastly, the reliability of the established cloud server should be improved prior to product commercialisation. Based upon the small-scale cloud server in this paper, additional works should be done in expanding server capacity to support wide user pools. Apart from scaling, cloud server security should be tackled by introducing encryption measures which shield the server from hacking attempts and potential user information leaks. Adding to these, the establishment and maintenance of such a reliable cloud server should be ensured to be economically feasible.

Conclusion
The GPS-based highway toll collection system was developed from a combination of electronic components such as Raspberry Pi 2 microcontroller, GPS module, LCD module, Wi-Fi adapter, wireless router modem and speaker. GPS coordinates were used to trace vehicle travels and collect toll fees at predefined toll collection points. Toll-incurred travels were then recorded in the SQL database. The system was equipped with additional features of 3G internet and GPS connection availability detection as well as automatic delay time adjustment. Moreover, a personal cloud server was established to allow remote access to travel logs stored in the SQL database. An automatic time delay adjustment in GPS coordinate acquisition was successfully implemented by carrying out a comprehensive investigation on the time delay and the changes in GPS coordinate. This feature would reduce the power consumption of the system significantly. This developed system is beneficial as it eliminates travel delays and the construction of expensive gantries or toll booths. In addition, the system may be utilised as a unique digital identity for each vehicle, promoting expansion into the area of car security and ownership transfer.