# Designing and Managing a Smart Parking System Using Wireless Sensor Networks
## 3 Architecture of the Smart Parking System
### Parking Montoring Center
```
1: Do
2: While (Reception the availability state of a parking space [1 Dzi, 1 Dpi])
3: Update the information received in the database
4: Decrease the number of occupied spaces
5: Increment the number of available spaces
6: Save the time when the car left the parking space: Tout
7: Stop parking time Tparkij
8: While (The parking payment is not performed) do
9: If (The current time < Tout + 1H) then
10: Wait 15 min
11: Else
12: Send a notification to the authorities with the registration number of the car for a fine
13: Goto 16
14: End if
15: End
16: Update the database with the available state of the space [1 Dzi, 1 Dpi]

### Global Information Management Centre

The global information management centre relies on the data stored in the database to develop extra services to the users and drivers by facilitating the task of searching for an available space in their destination, such as the consultation of the available parking spaces, the navigation to these spaces, and also the online payment of parking fees. A mobile application is developed that allows drivers to take advantage of these services in a practical and simple manner. * Consultation of parking areas: Drivers use the mobile application which allows them to consult and find open parking spaces near their destination, before moving to avoid unnecessary travel and also not to create congestion of traffic. This application uses the information that is stored in the database to make available to drivers, the open parking areas closest their destination with the number of available and busy spaces in real-time, by indicating the parking price (Figure 11). * Navigation to parking areas: This service is based on the use of Google MAP to orient and guide drivers towards the desired parking areas. The driver opens the mobile application to look for an open parking near his destination. Then, depending on the results displayed by the application, the driver selects a parking area and the app opens Google MAP to guide the driver to the selected area. Once arriving in the area, the application displays the available spaces and busy squares in this parking area. Figure 12 illustrates the operation of navigation to the parking areas. * Payment of parking fees: Before leaving the parking space, the driver must pay the parking fees, this payment is made either manually by moving to the automated teller machine of the parking lot by entering the number of vehicle registration. Either online, the driver uses the same mobile application with the same manipulations of the automatic teller machine to realize the payment of the parking fees in this parking area. Figure 11: The consultation of the areas and the prices of parking. Algorithms 6 and 7 shows the operation of the global information management centre of our smart parking system. ```
1: Open the mobile application
2: Introduce destination
3: Do
4: Display the closest parking areas with their prices
5: The user selects the desired parking area
6: While (No available space in the selected area)
7: do
8: Navigation to the area
9: While (The driver did not arrive at the area)
10: Display available and occupied spaces
```

**Algorithm 6** Navigation to the parking area. ## 5 Discussion

According to the different architectures of smart parking system studied in this article, Tables 2 and 3 summarize the advantages, disadvantages, technologies, and services used by these

Figure 12: Navigation to a parking area. architectures. There is no system that adapts to the different types of architectures and structures of parking (linear and mass). There are parking systems that only work for linear car parks and do not have the same impact at the deployment level of sensor networks in mass parking, and vice versa. The complexity of the algorithms used in the management of parking spaces plays an important and crucial role in the development and design of a robust and efficient smart parking system.