Fuzzy Logic Inference Applications in Road Traffic and Parking Space Management


In modern motoring, many factors are considered to realize driving convenience and achieving safety at a reasonable cost. A drive towards effective management of traffic and parking space allocation in urban centres using intelligent software applications is currently being developed and deployed as GPS enabled service to consumers in automobiles or smartphone applications for convenience, safety and economic benefits. Building a fuzzy logic inference for such applications may have numerous approaches such as algorithms in Pascal or C-languages and of course using an effective fuzzy logic toolbox. Referring to a case report based on IrisNet project analysis, in this paper Matlab fuzzy logic toolbox is used in developing an inference for managing traffic flow and parking allocation with generalized feature that is open for modification. Being that modifications can be done within any or all among the tool’s universe of discourse, increment in the number of membership functions and changing input and output variables etc, the work here is limited within changes at input and output variables and bases of universe of discourse. The process implications is shown as plotted by the toolbox in surface and rule views, implying that the inference is flexibly open for modifications to suit area of application within reasonable time frame no matter how complex. The travel time to the parking space being an output variable in the current inference is recommended to be substituted with distance to parking space as the former is believed to affect driving habits among motorist, whom may require the inference to as well cover other important locations such as nearest or cheapest gas station, hotels, hospitals etc.

Share and Cite:

Dahiru, A. (2015) Fuzzy Logic Inference Applications in Road Traffic and Parking Space Management. Journal of Software Engineering and Applications, 8, 339-345. doi: 10.4236/jsea.2015.87034.

1. Introduction

In the last two decades, the world has recorded high increase in use of automobiles. In fact about 32.6% increases are recorded between 2005 and 2013 [1] . This is indeed a serious challenge to parking space management and other related infrastructures. While road network expansions and extensions on one hand and urban centre restructuring on the other can be a good approach in solving the problem, yet effective and efficient utilization of the available parking space is a better approach. This is for the cost involved and time required in changing the face of urban structures. Artificial intelligence applications such as fuzzy logic inferences can optimize space allocation and management for motorists while flying in the roads and parking areas, in addition to other road traffic guides.

A number of GPS enabled solutions arrive at, such as Retschers pedestrian navigation project, NAVIO [2] , which emphasizes the concepts of fusion of multiple intelligent sensors for building an inference for guiding visitors into university departments, which can probably be embedded on smartphones, PDAs etc. The emphasis on smart devices here is influenced by extreme smartness of today’s mobile devices and their cognitive capabilities [3] . Socio-economic factors are considered in developing Nericell [4] for the application in developing societies for guidance against road conditions, such as potholes, bumpy roads etc.

The work presented here considers the principle of using intelligent multi-sensor fusion in fuzzy logic approach using Matlab toolbox as against algorism based solutions, to be applied in management of traffic and allocation of parking space in cities and major towns similar to the pedestrian navigation [2] and Nericell [3] projects. It should be clear that the sensors to be fused here can be camera, proximity sensors, gyroscopes, GPS, microphones, etc. thereby detecting presence of packed and moving vehicles, shown as illustration in Figure 1 [5] .

In a fuzzy logic inference based approach, factors such as traffic intensity, distance between pedestrian and parking lot and availability of parking space are taken into account for building system’s inference [6] . The Matlab fuzzy toolbox can be used to facilitate the work in determining an available parking space for customers. The inference system can as well be built by programming using languages such as C or Pascal [7] . This simply implies that decision can be made by customers by using the inference guided system on the direction to follow to avoid traffic and use the most convenient available parking space within the shortest possible distance, a development seen to be as energy saving strategy and improved driving convenience. The Matlab fuzzy logic toolbox thus posses three turning points where such decisions can be modified to influence the system’s inference. The turning points are:

o The input and output variables: This can be achieved by redefining the variables;

o Fuzzy sets: This involves introduction of additional sets on the universe of discourse. There should be adequate overlap at the sets bases (usually 25% - 50%);

o The rules: This can be done by the addition of new rule sets.

Any of the three points above can be taken into account when determining an inference system, yet the three can be considered simultaneously depending upon system requirements. The implication of considering rules in building fuzzy logic inference in this case is that it solidly applies to a particular location’s specific requirements (expert knowledge). Thus, for general purpose fuzzy inference and particularly for this paper, only input and output variables are considered modification.

Figure 1. Sensor Networks at parking space [5] .

2. The IrisNet Case Report

In Neagu’s IrisNet project perception [8] , the rules were set as well as input and output variables. Changing the rules, or input and output variables, or both, modifies or improves the work. Thus, decision in this case is changing only the input and output variables while the rules are not modified. Modification of rules are therefore reserved for location based purposes and expert knowledge (Table 1).

Applying the set rules without modification in Matlab fuzzy toolbox based on the current decision we have portion of the rules shown in Figure 2. Changing rules can be implemented using the rule editor.

The modifications done at the input and output variables are as follows:

o Titles of some input variables: Title changes to some membership functions were done to match the input variables correctly, e.g. to an average occupancy factor where we have three membership functions vs (very short), s (short) and m (medium) not being balanced and does not qualify the term factor very well. Thus the three membership functions titles given as low, medium and high to qualify the term and balance the title of the variables;

o Bases of membership functions were adjusted for the input variables universe of discourse: Titles to other input variables were considered appropriate and were maintained but given full titles short, medium and long for average distance instead of S, M and L. The same is applicable to the traffic intensity where we have low, medium and high instead of L, M and H;

Figure 2. Matlab’s rule editor (with no change to initial rules) [8] .

Table 1. Initial base rules (IrisNet Project) [8] .

o Bases of membership functions were adjusted for the output variables universe of discourse: The bases of the membership functions universe of discourse were adjusted to balance the input variables, most especially that they are termed to be average, hence balance is struck in this case to have an average result with consideration given to the bases of adjacent membership functions overlapping between 25% to 35%, as pointed out by Neagu’s IrisNet project analysis.

Modification on rules as discussed earlier depends on experts knowledge (findings from research conducted on for example road users, authorities traffic rules and standardizations, the location based culture and traditions, climatic conditions, road networks etc.). Number of fuzzy sets is not hereby increased and shapes are not being changed for the fact that fuzzy systems are highly tolerant of shape approximation [8] . Thus, modifications done here are reflected to only input and output variables.

3. Surface View of the Inference System

Applying the modified input and output variables in the Matlab fuzzy toolbox, surface views are generated to facilitate the system’s performance analysis, as well as managing complex problems within a reasonable period of time using a surface viewer of a fuzzy toolbox. The surface viewer is a three-dimensional mapping upon which any two sets or combinations of inputs and outputs are plotted. The developed inference system in this case has three inputs and the surface view displays any two sets of inputs and outputs. To have good representation of the surface, therefore we present the surface in three sets of input combinations below. The surface views shown in Figures 4(a)-(c) showcase the systems performance of input and output variables of Figures 3(a)-(d).

4. The Rule Viewer

The rule viewer of the Matlab toolbox GUI below shows the developed view of the whole system. It is a Platform upon which the inference implication process can be viewed and interpreted for analytical purposes. If such an inference implication process is analyzed, then decision can be taken to either modify further or implement the decision.

(a) (b)(c) (d)

Figure 3. Modified input (a) (b) (c) and output (d) variables.

5. Discussions

The fuzzy inference system being developed here was based on Neagu’s conception with a major modifications at the input and output variables. The surface view of Figure 4 as a 3-D GUI display of any one or two combinational inputs and an output where the inference could be analyzed only with no room for modifications, thus it is merely read only. The three factor input combinations makes the design a little bit complex, thus the average distance to the parking space s, seems to contribute insignificantly to the decision making as it indicates longer travel time before parking space is reached. There could be a risk of the inference output being inaccurate or ambiguous. This can be inconsistent with road users’ differing driving habits, implying that a driver could habi- tually be fast, slow or moderate. The road they use or environment which they drive may not be favorable to the time constraints of the designed fuzzy inference system. The simulated results shown in Figures 5(a)-(c) and Figure 5 clearly showcases the process and operational implications of the inference with all possible combinations (m, s and ρ) at the input against output n. Among the three-factor input combinations, the simulation results indicates that it takes much shorter time “n” for a motorist to locate a parking space when average occupancy factor “m” and traffic intensity factor “ρ” are considered in building the inference. The rule view in this simulation case therefore indicates that for a distance of 50 km, occupancy factor of 50% and traffic intensity factor of 50%, it will take a motorist 2 hrs 30 minutes to reach a parking lot and pack. Any change in the input variables will end up changing the travel time. From a rule view, modifications can as well be effected and analyzed. Whereas the surface viewer facilitates management of complex problems within a reasonable time frame. It is a good system to be relied upon for predicting the situations ahead. It could be better if the recommendations prescribed are considered towards developing a perfect system. For instance substituting travel time as output with travel distance could be more meaningful. For the driver to be informed about the various distances to the available parking spaces may allow the driver to decide how to travel. Information about the time of journey as plotted above by the rule viewer (Figure 5), to the destination may not offer much in terms of decision making or convenience [9] .

(a)(c) (d)

Figure 4. Surface views of the systems inference performance (a), (b) and (c).

Figure 5. The rule viewer of the parking space fuzzy inference.

Based on the identified shortcomings of the currently developed inference the following could be recommended as basis towards perfection:

o Increase the input membership functions from three to four or five so that good representations and clearer definition of the input system variables could be arrived at;

o The rules need careful re-organizations which may depend on the environment the inference system is designed to be implemented;

o There is need for the simplification of the system by using only two inputs instead of three, as the traffic intensity factor in this case seems to contribute insignificantly to the system;

o The travel time as output of the system inference can be better substituted with length of journey to the parking lot. This is for the fact that travel time could change due un-expectations. Knowledge of where to pack and the distance in advance reduce the frustrations to the drivers as more energy and time are consumed to trace convenient parking spaces;

o Similar fuzzy inference work can be carried out and implemented to locate similar important locations such as gas stations, hotels and restaurants, hospitals etc. [5] ;

o It is important to consider duration of parking for individual vehicles (as vehicle sizes and weights differ) so that correct billing may be assigned to different parking spaces as one parking space may have more value in terms of security, sensitivity, importance than another etc. This could further influence drivers’ decision on selection of parking spaces.

6. Conclusion

For fuzzy inference implications in this case, the toolbox provides flexible features for the adjustment whenever desirable. The modifications being done in this case therefore have improved the system in areas, such as balancing the universe of discourse within the input and output variables, such that better defined three-dimen- sional surface views are obtained. The rule view as well is such simple and comprehensive enough to predict accurately and adjust conveniently. However this is subject to shortcomings such as inconsistencies with the environment which the system may be applied. Another implication is that the number of input membership functions of three in each case for m, s and ρ, are not adequate to give a better representation of the systems input variables.


The author appreciates the efforts of Dr John Readle and Mukhtar Ibrahim Bello of Faculty of Engineering and Informatics, University of Bradford, United Kingdom for their invaluable guidances and supports in this field. The author is also grateful to authors/editors/publishers of all those articles, journals and books from where the literature for this article has been reviewed and discussed.

Conflicts of Interest

The authors declare no conflicts of interest.


[1] International Organisation of Motor Vehicle Manufacturers (2015) World Vehicles in Use.
[2] Retscher, G. (2006) An Intelligent Multi-Sensor System for Pedestrian Navigation. Journal of Global Positioning Systems, 5, 110-118. http://dx.doi.org/10.5081/jgps.5.1.110
[3] Campbell, A. and Choudhury, T. (2012) From Smart to Cognitive Phones. IEEE Pervasive Computing, 11, 7-11.
[4] Mohan, P., Padmanabhan V.N. and Ramjee, R. (2008) Demo Abstract: Nericell—Using Mobile Smartphones for Rich Monitoring of Road and Traffic Conditions. Microsoft Research India, Bangalore.
[5] Ross, V. (2012) Smart Parking System Steer Drivers to Open Spaces. Popular Mechanics.
[6] Build Mamdani Systems (GUI) (2015) How to Build Mamdani Systems Using Fuzzy Logic Toolbox Graphical User Interface Tools.
[7] Ibrahim, A.M. Introduction to Applied Fuzzy Electronics. Eastern Economy Edition, PHI. DeVry Institute of Technology, Toronto, Canada.
[8] Neagu, D. (2012) Building Fuzzy Inference System: A Case Study. School of Informatics and Media, University of Bradford, Bradford.
[9] Buckley, P. (2012) Smart Parking Sensor Platforms Helps City Motorist Save Time and Fuel. EE Times News and Analysis, UBM Tech.http://www.eetimes.com/electronics-news/4216891/Smart-parking-sens or-platform-helps-city-motorists-save-time-and-fuel

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.