design and development of portable fuzzy logic based ... · pdf filedesign and development of...

6

Click here to load reader

Upload: hamien

Post on 12-Mar-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Design and Development of Portable Fuzzy Logic based ... · PDF fileDesign and Development of Portable Fuzzy Logic based ... investigate the performance of the traffic control system

Design and Development of Portable Fuzzy Logic based Traffic Optimizer

Kenneteh Tze Kin Teo, Kiam Beng Yeo, Shee Eng Tan, Zhan Wei Siew, Kit Guan Lim

Modelling, Simulation & Computing Laboratory, Material & Mineral Research Unit School of Engineering and Information Technology

Universiti Malaysia Sabah Kota Kinabalu, Malaysia

[email protected], [email protected]

Abstract—Traffic jam has become a common scene nowadays, due to the rapid increase of road users in the past few years. To solve this problem, the design of traffic control is required. Traffic control parameter can be determined from the traffic flow behavior of the traffic intersection. Currently, most of the traffic control system in Malaysia is using Webster Model, which its green time duration is pre-determined by collecting the data from the traffic intersection. Most of the waiting time at the intersection is wasted due to the constant green time duration. The aim of this paper is to optimize the average waiting time of a traffic intersection via a developed Fuzzy Logic traffic control system. Traffic light simulator hardware is built to deal with the difficulties of working in a real environment and to investigate the performance of the traffic control system. Conventional traffic control system, Webster Model and the Fuzzy Logic controller will be applied into the traffic signal simulator in order to investigate their performance.

Keywords—Macroscopic traffic flow; traffic signal system; traffic simulator; webster; fuzzy logic

I. INTRODUCTION An inefficacious traffic signal system may trigger traffic

congestion especially during the peak hours the traffic condition are even worse. Therefore, a self-organized control system for traffic lights that could improve vehicular traffic flow need to be developed in order to replace the conventional traffic signalization. However, most of the systems nowadays are still using pre-determined set of configuration to optimize the traffic flow, and the lack of traffic flow model are obstructing the government from improving the traffic control system.

So a traffic flow model is constructed to model the behavior of the traffic. It is used to optimize the traffic conditions on every roads, and also optimizing the waiting time of each vehicles at the traffic lights.

A microscopic simulation model describes vehicle and driver behaviour in space time system. For instance, the decisions of drivers’ to changing lane are included as well. Apart from the drivers’ behaviour, vehicle control behaviour such as changing gear, accelerate of vehicle, etc also included in microscopic simulation model [1].

A mesoscopic model does not trace individual vehicle, but it specifies the behaviour of individual, it can be consider as probability term since mesoscopic model is base on aggregate data taken. A lane changing might be represented for an individual vehicle event where decision

to perform a lane changing is based on lane density and speed difference with others vehicle [2].

A macroscopic model does not explicitly represent the changing lane of individual vehicle. Macroscopic model is the model that collects the flow rate, density, and velocity to simulate a model like a fluid flowing through a pipe [3].

One important research study that demonstrates the effectiveness of fuzzy logic was conducted by Karakuzu and Demirci. They found that the implemented simulator show that the fuzzy logic traffic light controller dramatically reduced the waiting time, since the controller adapts itself according to the traffic density [4]. A similar study was conducted by Niittymaki and Kononen in 1999. They have simulated the fuzzy controller on an isolated intersection by using the bus priority algorithm. This model has been tested under fuzzy signal controller and the conclusion is fuzzy controller has a better performance compared to the conventional traffic signal system since it is able to reduce the average waiting time [5].

Another different study that yields similar results was conducted by Chiu and Chand. They have simulated a small network of intersections formed by six streets to verify the effectiveness of the distributed fuzzy control scheme. The simulation results show that the effectiveness of a small number of intersections is limited if they operate at a cycle time widely different from the rest of the system [6]. Besides, the traffic signal control system can be self-organized by retrieving information from the other controllers. The controller of an intersection controls its own traffic and cooperates with its neighbors. To carry out the performance evaluation of the controller, Lee and Lee-Kwang have developed a simulator for intersections groups. This method is compared with the vehicle actuated method, which is one of the typical conventional methods. The average delay time of a vehicle is used as a performance index. The simulation results show good performances in the cases of time varying traffic patterns and heavy traffic conditions [7].

The seminal study in this area was carried out by Rao Jalluri and Sanker Ram, who argued that neuro-fuzzy controllers are better than fuzzy logic controllers. A performance comparison of the neuro-fuzzy controller with conventional proportional-integral and fuzzy logic controller has been provided. The results show that the neuro-fuzzy controller based induction motor drive is superior to conventional proportional-integral and fuzzy

2013 IEEE ICCE-China Workshop

978-1-4799-0320-7/13/$31.00 ©2013 IEEE7

Page 2: Design and Development of Portable Fuzzy Logic based ... · PDF fileDesign and Development of Portable Fuzzy Logic based ... investigate the performance of the traffic control system

logic controller [8]. Q-learning based traffic light system has been proposed by Chin has the ability to learn the behavior of the traffic flow, and based on the traffic flow learned to assign green time for each section of the road [9,10].

Most of the traffic signal system in Malaysia is using Jabatan Kerja Raya (JKR) Standards. JKR Standards is developed by using Webster approach that the parameters in the method are adjusted to meet the requirements and traffic conditions in our country.

II. PETRI-NET MODEL AND PRACTICAL PARAMETER EXTRAZCTION

A. Petri-Net Model Description Petri Net is a mathematical modelling tool that models

the physical and chemical reaction that involves flow [11,12]. Petri Net can be used to model traffic flow model, the study road is separated into few segment and connected through few theory of vehicle flow. The vehicle in each segment flows from previous segment and the vehicle in current segment will flow to next segment. At this point, there are two criterions for the vehicle flow to become zero, which is each segment should have spaces to let vehicle in from previous segment. For example, if maximum vehicles that can fit in one segment is 16, and there are 15 cars in the segment at the moment, so the segment only can fit in 1 more vehicle. After that vehicle moves in then there will be no more spaces left for another vehicle to flow in, so the flow in rate should be zero now. Another criterion is the segment should have at least 1 vehicle in it. After the only vehicle flows out, there will be no more flow out rate for it, unless there is another vehicle flows in from previous segment. These concepts of PN are used to model the traffic flow model. The flow rate will be chosen between the maximum flow rate, the flow rate when vehicle are less and also the flow rate when the spaces are less. Min operation will be used in choosing the flow rate since the flow rate will only be low when the two criterions happen, and indirectly, it also solved the flow rate of fewer vehicles and less space. Maximum flow is chose to be the flow rate when the other two criterions are high.

After having the clear concepts, the equation of the flow rate can be derived. The equation is derived starting from the density of the segment. Density means numbers of particles that are currently fit into the certain space, and it usually is defined as mass per unit volume. For the case in traffic flow modelling, density of each segment is corresponding to the number of vehicle mi(t) at place Pi per distance of the segment ∆i. Following formula is the equation for average flow density ρi(t).

itmi

i Δ=

)(ρ

(1)

The average speed Si(t) for segment i is given at equation below.

)()(

)(tm

itvtSi

ii

Δ×=

(2)

The change of the vehicle at each segment i can be derived from equation (1).

itmi

i Δ=

)(ρ

dttdmi

dttd ii )()(

=Δ×ρ

)()()(

1 tvtvdt

tdmii

i −=−

(3)

From equation (3), the vehicle flow in rate minus vehicle flow out rate is the change of the vehicles in that segment. This equation proves what have been mentioned earlier, that vehicle flows in from previous segment and flows out again. This connects the model from segment to segment and the relationship between segments is done. Now this solves the problem to model vehicle flow from segment to segment, but how fast it is? Equation (4) is the flow rate of each segment, it does not only provides average flow rate, but also catch the case of the vehicle in segment and the space of the next segment, which are mentioned in the earlier part. ))(),(,min()( 11max tmCtmvtv iiiiii ++

−×= α (4) From (4), min of the �i, mi(t), and Ci+1-mi+1(t) means the equation chooses the smallest value among the three. vmaxi is the maximum firing frequency, the equation of vmaxi is shows below.

iv

v freei

i Δ=max

(5)

Vfreei is the limited maximal speed in segment i. Normally, the limited maximal speed of the segment is set by JPJ, but in real traffic flow, not many vehicles will follow the standard maximum speed and it depends on the condition of the road. Maximum speed may be increased or decreased due to the gradient of the road, if gradient is slide down, the maximum speed will increase, otherwise it will decrease. From (4), �i represent simultaneous firings for segment i and Ci is the limited capacity of segment i. The equation for �i and Ci are shown below.

freei

ii v

iq Δ×= maxα

(6)

iC ii Δ×= maxρ (7) qmaxi from (10) represent the maximum flow rate on segment i and ρmaxi from (7) represents the jam density in segment i.

B. Video Data Analysis Six videos have been captured at Jalan University

Malaysia Sabah, each of them is recorded for 60 minutes for each segment. There are two main roads and two secondary roads, the way of going out from UMS and the way of going out from Alamesra are the secondary roads, while the main roads are the roads going to 1Borneo and Kingfisher. The timing of green time for each segment is counted, indirectly, the cycle time is obtained. Flow out rate when green time is counted to find the maximum flow rate for that segment. At study place, vehicles did not accumulate to maximum capacity when red time, so vehicles flow in during red time is count to find the flow in rate for each second. The speed of vehicles in green time also examined from video. The view for 5 segments is shown in Fig.1.

2013 IEEE ICCE-China Workshop

8

Page 3: Design and Development of Portable Fuzzy Logic based ... · PDF fileDesign and Development of Portable Fuzzy Logic based ... investigate the performance of the traffic control system

Fig. 1. View of video record.

III. FUZZY LOGIC CONTROLLER

A. Membership Functions Fuzzy Logic control is unique because it is able to deal

with multiple numerical data or linguistic knowledge, both of which can be casted into the forms of IF-THEN rules. It includes a nonlinear mapping of an input data into a scalar output. Fuzzy Logic basically contains crisp set inputs, fuzzifization, inference fired with rules, defuzzification and crisp set outputs. [6]

The determination of the fuzzy input and output variables are vital because it affect the traffic condition of an intersection directly. Therefore, choosing a suitable fuzzy input and output is very important in Fuzzy Logic controller design. The fuzzy inputs are the number of vehicles accumulated (NV) and traffic flow (TF) on a certain phase. The fuzzy output would be the green time allocation (GT) for that phase.

The design of membership function for the fuzzy input and output is the method to define the essence of that fuzzy property based on the designer opinion or knowledge. The universe of discourse for each fuzzy input or output would be the range of the crisp input or crisp output. The universe of discourse for fuzzy input or output must meet the requirement of the control system. If failed to do so, the Fuzzy Logic control system is said to be failed or not efficient. Each fuzzy inputs or outputs have their own linguistic variables. [7]

The universe of discourse of NV is from 0 to 50, TF is from 0 to 1 and GT is from 0 to 52. All the membership functions design are illustrated in Fig. 2, 3 and 4.

Fuzzification is the transformation of a crisp set to a fuzzy set or a fuzzy set to a fuzzifier set. It is a translation process of crisp inputs into linguistic concepts that can be interpreted by human being.

B. Fuzzy Control Rules Fuzzy rules work just like human intelligence, choosing

the optimal solution for a problem. Since there are two

fuzzy input variables NV and TF, and NV has six linguistic values while TF has three linguistic values, the fuzzy controller should be described in 6x3 = 18 possible combination of AND rules here. The fuzzy control rules for the traffic control system are tabulated in TABLE I.

C. Defuzzification The final process of Fuzzy Logic control system is the

defuzzification step. It converts a fuzzy set into a crisp output. It is a process to get a non-fuzzy value that best represents the possibility distribution of an inferred fuzzy control action. There are many methods of defuzzifying a fuzzy set. The method that has been used in this project is Weighted Average method. This method is only valid for symmetrical output membership functions and it is calculated by using (8).

∑∑

=)(

)(*

if

iif

xuxxu

x (8)

Where x* is the crisp output, ix is the mean of ith membership function and ∑uf is the summation of degree of membership function. [8]

Fig. 2. Membership functions for input NV.

Fig. 3. Membership function for input TF

Fig. 4. Fuzzy logic system.

TABLE I. FUZZY CONTROL RULES FOR THE TRAFFIC CONTROL SYSTEM

Number of Vehicles

(NV)

Traffic Flow (TF)

L M H

N Z Z Z VS VS VS S S VS S M M S M L L M L VL

VL L VL VL

2013 IEEE ICCE-China Workshop

9

Page 4: Design and Development of Portable Fuzzy Logic based ... · PDF fileDesign and Development of Portable Fuzzy Logic based ... investigate the performance of the traffic control system

IV. DESIGN OF TRAFFIC SIMULATOR In the traffic simulator design, a microcontroller is used

to control the traffic light system. Four laptops will be used to generate incoming traffic flows. Those laptops act as the cameras on the traffic intersection to capture the number of vehicles passed through each phase. Then those traffic data will be sent to the microcontroller using RS232 communication protocol.

The Webster Model will take the average traffic flows of the intersection. Note that for Webster Model, the calculation of green time duration for each phase is pre-determined and it will last for three months or longer. Therefore, the constant green time duration can be straight away programmed into the microcontroller. However, Fuzzy Logic traffic control system is different, it reacts upon the traffic flows and the number of vehicles accumulated at that phase on the spot. Hence, the traffic flows cannot be programmed inside microcontroller for Fuzzy Logic control system.

Vehicles start to move when the green LED is on for a certain phase of the traffic intersection. When a vehicle goes across the traffic junction, the number of vehicles that is shown by the seven segment display will be decreased by one. For other phase of the intersection which is in red light, when a vehicle comes, it will stay at that road phase and the number of vehicles of that phase will increase by one. The green time duration will decrease every second until it ends. The yellow LED will on for two seconds and follows by red LED. The turn will be changed to other phase of the traffic intersection. This process goes on continuously in a similar manner.

It is difficult to tell when and with what speed a car passed through a certain phase. Different drivers have different driving behavior. Complex modeling of traffic system is needed, which will need a lot of time to complete and the result is not promising. Therefore, the number of vehicles will be decrease in an average rate of 0.4 vehicle/second for one lane. For north phase, there are three lanes which mean the number of vehicles will be decreased in a rate of 1.2 vehicle/second. There are two lanes on the east and west phase which mean the number of vehicle will be decrease in a rate of 0.8 vehicle/second. For south phase, there are four lanes which mean the number of vehicle will be decreased in a rate of 1.6 vehicle/second.

For Webster Model, the average traffic flows were calculated by using real environment data. Then, the average traffic flows can be used to calculate the cycle time of the intersection. The cycle time is multiply by the ratio of traffic flows of each intersection. Due to north-south direction having a heavy traffic flows, its green time duration would be longer. East-west direction will have smaller green time allocation as it has less traffic flows. The green time duration for north phase is 53 seconds, east phase is 18 seconds, south phase is 55 seconds and west phase is 24 seconds. Those constant green times allocation would be last for three months or longer.

For Fuzzy Logic traffic control system, its algorithm is programmed into the microcontroller to allocate proper

green time duration based on the number of vehicles accumulated and the traffic flows of a certain phase of the intersection. That means the inputs of Fuzzy Logic control system are the number of vehicles and traffic flows. For the input number of vehicles, it is received from four laptops that have been mentioned before. Those laptops represent the cameras on the traffic intersection, captured the number of vehicles passed through and sent it to the microcontroller. The number of vehicle is generated in every second and the total duration was about ten minutes by using a simple interface on the laptop. The microcontroller will received the number of vehicles from each direction of the traffic intersection from RS232 communication.

With the number of vehicles, the incoming traffic flows on a certain phase can be calculated. This is because it is calculated by using the number of vehicles coming divide by the intervals. Consequently, the two inputs for Fuzzy Logic control system have successfully simulated.

Due to the incoming traffic flow need some duration to calculate, every phase on the traffic intersection will be allocated 30 seconds of green time for the first cycle. After 120 seconds, the green time allocation will depends on the Fuzzy Logic traffic control system that has been designed. The performance of Webster Model and Fuzzy Logic control system can now be compared.

V. RESULTS AND DISCUSSION For the sake of testing the performance of both of the

methods used, a traffic simulator which it can simulate the traffic road condition in real time has to be constructed. The purpose of building the traffic simulator is to deal with the difficulties of working in real environment. The hardware implementation of traffic simulator is illustrated in Fig. 5. A. Results for Webster Model

Results of the traffic signal system based on Webster Model were observed and recorded from the traffic simulator in order to investigate the response upon the data and values obtained and calculated. Those data were plotted into graph for comparison purpose.

Fig. 5. Hardware implementation of traffic simulator.

2013 IEEE ICCE-China Workshop

10

Page 5: Design and Development of Portable Fuzzy Logic based ... · PDF fileDesign and Development of Portable Fuzzy Logic based ... investigate the performance of the traffic control system

B. Results for Fuzzy Logic Controller The results of Fuzzy Logic traffic control system was

observed and obtained by using the hardware traffic simulator that has been built. The incoming traffic data for each phase of the intersection is generated in real time for the Fuzzy Logic control system. The traffic flow will be calculated inside the microcontroller for each direction. The response of the Fuzzy Logic controller upon these inputs was then investigated.

In the interest of knowing the differences of performance between Webster Model and Fuzzy Logic traffic control system, Fig. 6, Fig. 7, Fig. 8 and Fig. 9 are plotted and compared.

Due to the flexibility of Fuzzy Logic system, the green time allocation for north phase is allocate according to the traffic conditions and hence the average waiting time is smaller compare to the Webster Model.

For the average number of vehicles gathered at east phase for Webster Model are control under (9+10)/2=10 cars. For Fuzzy Logic controller, the average number of vehicles is control below (7+4+4+4)/4=5 cars. The average waiting time and average number of vehicles accumulated at east phase have decreased. It proves that Fuzzy Logic Controller is better than conventional traffic control system.

The flexibility of Fuzzy Logic system causes the green time duration for south phase is allocated properly and thus has a smaller average waiting time compare to the Webster Model. The average waiting time for Fuzzy Logic controller is about (60+44+42+51)/4=49 seconds but for the Webster Model the average waiting time is around (95+95)/2=95 seconds. For south phase that is controlled by Fuzzy Logic system, the average waiting time and the average number of vehicles become smaller compare to Webster Model. It shows that the Fuzzy Logic controller has a better performance compare to Webster Model.

The average number of vehicles gathered at west phase for Webster Model is control under (13+10)/2=12 cars. For Fuzzy Logic controller, the average number of vehicles is control below (5+5+1)/3=4 cars. The average waiting time and average number of vehicles accumulated at west phase have a drop-off. It proves that Fuzzy Logic Controller is better than Webster Model. The average waiting time and average number of vehicles accumulated at each phase of the traffic intersection is summarized in Table II.

The overall average waiting time for the traffic intersection has decreased around 50% as it achieved the purpose of Fuzzy Logic controller. By the way of decreasing the average waiting time, the average number of vehicles accumulated at east and west phase which have slightly traffic flows show a big drop-off of 50% and 67%. For south phase which has heavier traffic flows, the average number of vehicles has a small decrease of 13%. There are no changes in average number of vehicles for north phase between these two methods.

Fig. 6. Number of vehicles versus time for north phase.

Fig. 7. Number of vehicles versus time for east phase.

Fig. 8. Number of vehicles versus time for south phase.

Fig. 9. Number of vehicles versus time for west phase.

The reason why Fuzzy Logic traffic control system has a better performance compare to Webster Model is due to Fuzzy Logic controller is dealing with the number of vehicles accumulated and traffic flows in order to allocate exact green time duration for the vehicles to pass through

2013 IEEE ICCE-China Workshop

11

Page 6: Design and Development of Portable Fuzzy Logic based ... · PDF fileDesign and Development of Portable Fuzzy Logic based ... investigate the performance of the traffic control system

TABLE I. PERFORMANCE COMPARISON BETWEEN WEBSTER AND FUZZY CONTROLLER

Direction

Average Waiting Time, s

Average Number of Vehicles

Webster

Fuzzy Logic

% Webster

Fuzzy Logic

%

North 97 48 -51 36 36 0 East 132 60 -55 10 5 -50

South 95 49 -48 45 39 -13 West 126 49 -61 12 4 -67

that phase. As for Webster Model, its green time duration is pre-determined and constant over a period by using average traffic flows of the intersection. However, the traffic condition changes frequently. For Fuzzy Logic controller, it has the ability to change the green time duration according to the traffic condition on the spot. Due to the greater flexibility of Fuzzy Logic controller compare to Webster Model, it causes the average number of vehicles and average waiting time to decrease.

From the overall results, it shows that Fuzzy Logic controller has optimized the traffic control system especially for east and west phase. Although there is no difference in average number of vehicles for north phase but by looking at the huge difference of average waiting time, it shows that Fuzzy Logic controller possess a potential to improve the traffic control system. The improvement can be done by adjusting the membership function range and shape.

VI. CONCLUSION The simulations of the traffic conditions by using

Webster were carried out and the response was evaluated. Besides, the Fuzzy Logic traffic control system is applied in the traffic simulator. The performance of these two methods were observed and compared. It shows that Fuzzy Logic controller has optimized the traffic control system because of the flexibility to allocate green time duration according to particular inputs. It can be concluded that allocating proper green time duration with respect to input is important to deal with traffic congestion problem.

This project can be further study by implementing it in real traffic signal control system, the traffic flow of a critical phase can be captured by cameras or sensors and then the signals will be sent to the microcontroller for further processing. New circuit and program need to be designed in order to implement the idea described.

ACKNOWLEDGMENT The authors would like to acknowledge the financial

assistance of the Ministry of Higher Education of Malaysia (MOHE) under Exploratory Research Grant Scheme (ERGS), grant no. ERG0021-TK-1/2012.

REFERENCES [1] Serge P. Hoogendoorn, Piet H. L. Bovy. State-of-the-art of

Vehicle Traffic Flow Modelling. Delft University of Technology Faculty of Civil Engineering and Geosciences Transportation and Traffic Engineering Section.

[2] Hoogendoorn, S.P. and P.H.L. Bovy. 1998. A New Estimation Technique For Vehicle-Type Specific headway Distributions. Transportation Research Record 1646,18 -28.

[3] Kerner, B.S., Konhauser, P., and Schilke, M. 1996. A new approach to problem of traffic flow theory. Proceedings of the 13th international symposium of transportation and traffic theory, Lyon.

[4] Karakuzu C. and Demirci O., “Fuzzy Logic Based Smart Traffic Light Simulator Design and Hardware implementation”, Applied Soft Computing, 2010, pp. 66-73.

[5] Niittymaki J. and Kononen V., “Traffic Signal ControllerBased on Fuzzy Logic”, IEEE International Conference on Systems, 2000, pp. 3578-3581.

[6] Stephen C. and Sujeet C., “Adaptive Traffic Signal Control Using Fuzzy Logic”, IEEE Conference on Decision and Control, 1993, pp. 1897-1902.

[7] Jee-Hyong L. and Hyung L., “Distributed and Cooperative Fuzzy Controllers for Traffic Intersections Group”, IEEE Transactions on System, 1999, pp. 263-271.

[8] Rao Jalluri Srinivasa and Sanker Ram Dr. B.V., “A Neuro Fuzzy Controller for Induction Machines Drives”, Theoretical and Applies Information Technology, 2010, pp. 102-108.

[9] Y.K. Chin, N. Bolong, A. Kiring, S.S. Yang, K.T.K. Teo. “Q-Learning based Traffic Optimization in Management of Signal Timing Plan,” International Journal of Simulation, Systems, Science & Technology. 2011. vol. 12, no. 3, pp. 29-35.

[10] Y.K. Chin, K.C. Yong, N. Bolong, S.S. Yang, K.T.K. Teo. “Multiple Intersections Traffic Signal Timing Optimization with Genetic Algorithm,” International Conference on Control System, Computing and Engineering. Proceeding of ICCSCE. 2011. pp. 454-459. doi: 10.1109/ICCSCE.2011.6190569.

[11] C. Tolba, D. Lefebvre, P. Thomas, A. El Moudni. “Continuous and Timed Petri Nets for the Macroscopic and Microscopic Traffic Flow Modelling,” Simulation Modelling Practice and Theory, vol. 13, no. 5, pp.407-436.

[12] Kovacs. A., Nemeth. E., Hangos. K.M., "Modeling and optimization of runway traffic flow using coloured Petri nets," Control and Automation, 2005. ICCA '05. International Conference on , vol.2, no., pp.881,886 Vol. 2, 26-29 June 2005

2013 IEEE ICCE-China Workshop

12