Keywords

1 Introduction

Most people waste a large amount of their time searching for an empty parking spot on a daily basis. Based on [1] the average time spent looking for parking across the U.S. is 17 h a year. In [2] a research done by UCLA urban-planning professor Donald Shoup found the average time a driver spent looking for an empty parking spot was 3.3 min. Therefore, in a typical search for parking spot in urban areas a driver can spend on average anywhere between 3 to 14 min. To solve the problem of parking delays, different solutions for smart parking were proposed such as the ones in [3] and [4]. However, most smart parking solutions only considered metered parking, curb parking or cars with RFID tags. Today we live in a world with advanced technologies where most people have smart devices and/or new cars equipped with different kinds of sensors, GPS, wireless connectivity and many other features. We can make use of these advanced technologies to solve many problems such as the problem of delays in parking lots. The University of Central Oklahoma (UCO), as well as most of the colleges in the United States, shares the same problem when it comes to parking spots. The problem becomes even worse during special events such as homecoming, graduation and football games. In order for drivers to make quick decisions, they need to know which parking lots have available parking spots. If the drivers are able to receive information about the exact locations of available parking spots, the traffic congestion will be reduced and the traffic flaw will be smoother around campus.

This paper outlines the design of a smart parking system and shows the process of allocating free parking spots and navigating the users directly to them. The proposed smart parking system is a cloud-based system connected to the web and a cell phone application. The embedded system will be operated by a Microcontroller to send the serial information to a Wi-Fi Module. The Embedded system will be operated by a master board that will take readings and analyze them to make appropriate decisions. The system will use different kinds of sensors and a feedback mechanism to minimize the errors. The system will be operated in a low power which will minimize the battery power supply exchange up to roughly 3 years. The system is operated using C++, Java and android studio programs. The system is using the IoT intelligence network systems to analyze data and give a feedback through the user applications using the UBIODOTS platform cloud. In this paper, the IoT system is integrated with the smart real-time traffic congestion estimation and clustering technique described in [5]. The OpenStreetMap is used to reach the shortest path through active nodes. We applied a study on the smart parking guidance algorithm by adding some events and processing them through the platform to make different decisions similar to the method explained in the smart parking guidance system in [6]. The same concept was integrated by adding similar events with the available parking spots. To estimate the parking spot occupancy in [7], they used the spatial distribution, joint distribution and temporal distribution. In our paper, a spatial random process considering different factors that affect the probability and distribution of occupancy is used and we integrated the Fermi-Dirac distribution in our system to decide how occupancy is distributed through time and distance. In this paper, we are introducing a smart parking system designed at a low cost and low voltage compared to the systems available in the market.

2 Smart Parking System Description

The smart parking system contains three systems, two hardware systems acting as slaves and one software system acting as a master. The master system is responsible for communicating the data between the systems and the cloud. The first slave system is an operational system equipped with sensors to detect the parking slot occupancy when a vehicle is parked on campus in the parking lot. The second system is an embedded system that collect data and show traffic regulation status on an outdoor LCD screen. The LCD screen is located at the entrance of the parking lot and it displays the number of available free spots in the parking lot and the direction of their location.

2.1 Hardware System I

The first hardware system is equipped with two microcontrollers for a low power consumption solution. The system contains an ARDUINO Nano which is connected to a Wi-Fi Module Intel Edison and a magnetic sensor with a low power of 1.62 V and 0.14 A. The Arduino uses the interrupt mode to save power, it wakes up when interrupted to perform the required operations and then goes back to sleep. The magnetic sensor uses the interrupt method to wake up the device using the interrupt service as well.

The Wi-Fi Module start operating after the magnetic sensor detect a vehicle in the parking spot. The parking spot is equipped also with an IR sensor to take another reading and confirm there is a vehicle indeed in the parking spot. After the confirmation, the Wi-Fi Module sends a message to the server indicating the spot is occupied. The server then deliver the message to the cloud platform as shown in Fig. 1.

Fig. 1.
figure 1

Smart vehicle detection system.

2.2 Hardware System II

The second hardware system is the main data collection and analysis center. The center receives the data from the server, analyzes it and displays the information to the users on an LCD. The system contains an MKR1000 WI-FI module that receives data and connects it to an LCD screen as shown in Fig. 2. The system is enhanced with summing algorithms of the active nodes to calculate the number of free spots at every intersection in the parking lot and show it on the outdoor LCD. Therefore, a driver with no web connection is able to see the LCD and find out the available spots in the parking lot and their exact location, on the right, on the left or just straight forward as shown in Fig. 3.

Fig. 2.
figure 2

Parking status outdoor LCD

Fig. 3.
figure 3

Number of free spots displayed on the LCD

3 System Hardware and Algorithms

The system main purpose is to save the time of the driver and make it easier for him to find a parking spot. Once the point of interest is identified by the driver, the system will find all available parking spots around the point of interest and will give the driver the choice to pick an available spot. The system will then guide the driver to that spot using the shortest path. The system is designed to process three main events, point of interest, shortest path and spots availability as shown in Fig. 4. Once the data is processed, it goes to the cloud event which will decide on the navigation path for the user and send it to the cloud server then it goes to the interactive cloud application. The user will be given the choice through the cloud application to choose the path and this will be feedback to the cloud event.

Fig. 4.
figure 4

Flowchart of the three events

3.1 Parking Spots Availability and Allocation

The main system that detects the spot occupancy was tested in three different locations on UCO campus parking lot with three coordinates that used to locate the system on google maps through the cloud platform. The system used an Arduino which has two operations, first detect the vehicle through the magnetic sensor which can operate from 1.6 V to 3.6 V and then it gives a pulse to the embedded system to operate on a full mode. As the vehicle approaches the magnetic sensor a distortion of the magnetic field occurs as explained in [8]. The 3-axis magnetic sensor fixed data shows the normal earth magnetic field at -23, -177, -532. The sensor was calibrated to set these raw data to zero. Figure 5 show a graph of the magnetic sensor data. It shows a distortion level between negative 10 mg and 40 mg around 0.004 s. Once the magnetic sensor detects the vehicle it sends a value to the Intel Edison to operate and take reading with the IR sensors which is used to measure the distance of the car ground clearance to decide whether a vehicle is parked or not. Therefore, the IR sensor will double check for any errors and make sure that there is a vehicle in the parking spot. The IR sensor GP2Y0A21YK0F is used because of its wide range of detection [9] as shown in Fig. 6. The range of 10–80 cm is ideal for detecting any car including stock cars with minimum ground clearance of 18.5 cm and maximum of 22.0 cm [10]. Many cars on campus are not stock suspension which means their owners did not decrease the height clearance or increased it. When the IR sensor detects a vehicle, it will send an integer of 1 and if it is a false reading it will send 0, it keeps updating every 10 s. Every integer value is uploaded to the server to be processed and considered when decisions are made.

Fig. 5.
figure 5

Magnetic sensor vehicle detection

Fig. 6.
figure 6

IR Sensor range of detection, [9]

The IoT system is based on the API server, which is UBIDOTS, the server is analyzing the data in the platform, then it’s sent to the Dashboard website and the Android app. Figure 7 shows the explained application layer, all these systems are integrated to send the data to the google maps that navigate the user to the parking spot, the analytics layer shows the data stored and then go to the data extraction and data analytics in the end. Last part is the network layer that has the Wi-Fi and the LTE that receive the data from the cloud.

Fig. 7.
figure 7

IoT testing bed Layer

The two systems are operated through the HTTP requests of the cloud platform. The HTTP GET REUEST (HGR) is used to send the integer values to the cloud system as shown in Fig. 8. The data sent are between 0 and 1 to detect the spot occupancy.

Fig. 8.
figure 8

Cloud server for vehicle detection

The software event is set to communicate between the web application and the platform when a value of 1 is sent as it will POST an HTTP request through a third-party server to write a command to be posted on the google cloud platform to print a MARKER on the google map widget on the Web application. The software will send the value as context and status which will show a status on the marker that the spot is available. In case the integer sends a value of “1”, the third-party server will operate an HTTP DELETE REQUEST which will delete the MARKER from the google map which means that the spot is not available anymore as shown in Fig. 9. An embedded HTML link for the real time google map is integrated and implemented into the android studio to generate an Android app that shows this on an online updated map. The user can go through the map in the app and choose any free parking spot available and shown by a Marker. Once the parking spot Marker is selected, the driver will be forwarded to the google maps app which will navigate the driver to the desired location as shown in Fig. 10.

Fig. 9.
figure 9

Google map of the free parking spots

Fig. 10.
figure 10

Android developed app for the smart parking system

The implemented IoT smart parking system has the capabilities to collect and display other related information such as weather status, live road conditions information and any warning messages from the Oklahoma department of transportation. All these information are displayed through the website application in addition to an integrated widget that has the total number of parking spots and the number of free spots available at any particular time as shown in Fig. 11.

Fig. 11.
figure 11

Web application of the parking status

The second hardware system which is responsible for the live smart parking system information uses a software called WI-FI Get Client to get the values and save them in the firmware. An algorithm is developed and used to determine the exact location of the free parking spots and arrows displayed on the LCD are used to guide the users to the area in the parking lot with the free spots. The software is capable of detecting any issues with the smart parking system. For example, when the HTTP request is accepted it will send back a numerical value of “202” which means the request has been accepted for processing but if it receives any other value such as 4xx, then a bad request is detected. In this case, an error event is created and reported through a third-party server by sending an email to the company running the smart parking system and reporting the problem. The reported error message will include the specific device that caused the error, the exact location of the device in the parking lot, the issues were detected and possible solutions to the problem.

3.2 Smart Parking Case Study

A case study was performed on one of the University of Central Oklahoma parking lots shared between multiple buildings. Three of these buildings are considered as three points of interests for our smart parking system. The three buildings are the nursing building, the math building and the science building. Following a similar approach as in [7] we defined Eqs. 1, 2 and 3. In Eq. 1, the probability P is the occupancy of the targeted parking spot and \( P_{1} ,P_{2} \;and\;P_{3} \) are the probability of parking occupancy close to the first building, second building and third building, respectively. Let \( P_{1} P_{2} P_{3} \) be the probability of total occupancy in the parking lot shared by the three points of interest.

$$ P = P_{1} + P_{2} + P_{3} - P_{1} P_{2} P_{3} $$
(1)

The probability of finding a parking spot during any time of the day including daily normal hours and special events can be calculated with respect to the distance by using a modified Fermi-Dirac formula. We can identify a relationship between the parking lot occupancy and the targeted parking spot by replacing the energy parameter in the Fermi-Dirac model with a distance parameter, d and considering the parameter KT as the effect factor on the steepness of the slope. Equation (2) shows the modified Fermi-Dirac model.

$$ P\left( d \right)\, = \, \frac{1}{{e^{{\frac{d - p}{KT}}} \, + \,1}} $$
(2)

Figure 12 shows the relationship between the parking lot occupancy and the distance to each of the points of interest. As expected, since the points of interest shared between multiple buildings, the probability of occupancy increases, as we get closer to the targeted parking spot. The intersection of the three curves in Fig. 13 will be the ideal target parking spot located at exactly the same distance from all three points of interest. The targeted parking spot is located at a distance of 20 m with a 50% probability of occupancy. The probability of occupancy with relation to the distance and time \( P\left( {d, t} \right) \) can be found by multiplying the probability of distance P(d) by the probability of time P(t) as shown in Eq. 3.

Fig. 12.
figure 12

Fermi – Dirac distribution of the point of interest.

Fig. 13.
figure 13

University of Central Oklahoma (UCO) map

$$ P\left( {d,t} \right) = P\left( d \right)\,\,* \,P\left( t \right) $$
(3)

3.3 Shortest Path to the Point of Interest Using Active Maps

After the driver determines the point of interest within the available parking spots, the system will navigate the user to that spot using the shortest path available after obtaining the coordinates of the driver and the coordinates of the point of interest. The system will use OpenStreetMap MATLAB function [11]. In our case study we exported a map of the University of Central Oklahoma as shown in Fig. 13 and the OSM version of the same boundary. We used the OpenStreetMap functions to plot the map streets and nodes as shown in Fig. 14 then we added it in parallel with the original PNG version as shown in Fig. 15. We plotted a figure of the active nodes on the map of each street intersection; we got a total of 883 ways and 3139 nodes as shown in Fig. 16. We plotted the active nodes on our map as shown in Fig. 17 to locate the shortest path between the nodes to navigate the driver through the ways in the map and guide him to his chosen spot. The smart parking system was tested successfully and displayed the shorted path between two nodes as shown in Fig. 18 were one node was chosen as a starting node (node 51) and another node was chosen as a target node (node 151).

Fig. 14.
figure 14

MATLAB traced path of UCO campus area

Fig. 15.
figure 15

MATLAB traced path parallel to the image

Fig. 16.
figure 16

Map active nodes

Fig. 17.
figure 17

Campus map with the active nodes

Fig. 18.
figure 18

Shortest path from node 51 to 151

4 Results and Future Work

This paper provides a simple IoT solution for the parking problem on campus. The solution utilizes smart devices and the cloud. The system included an application which was designed and created with an APK file using the Android studio to create a Cell Phone Application, A Token and Device ID were used to communicate between each device in the parking spot with the cloud through a packets of secure HTTP requests with the SSL Encryption which creates a secure encrypted connection between the server and the device. A formula is used to show the relation between the parking occupancy and the points of interest. The smart parking system was tested successfully, and the system was able to take a google map and generate an active node map and then identify the shortest path between two target nodes. In a future work, the goal is to have a complete smart system that control the entire campus. Cameras can be integrated on the side roads of the campus and give predictions of the traffic flow in and out of the campus and predict how many spot will be filled at any instant of time. RFID machine readers can be used too to collect data from the university tags to count the vehicles entering the university campus.

5 Conclusion

In this paper, a smart parking solution using the cloud is proposed to minimize parking delays for students, staff and faculty. The proposed system proved to be initially working successfully in achieving this goal considering cars that are both equipped with smart devices and unequipped. This proposed smart parking system is inexpensive and could provide a simple and cheap solution to the parking delay problem. The reduction in the cost is due to the use of the cloud and the app which guide the users to the closest available parking spot locations using smart devices they most likely have thus saving them time and money.