# A Two-Stage Fuzzy Logic Control Method of Traffic Signal Based on Traffic Urgency Degree

Authors: Yan Ge
Journal: Modelling and Simulation in Engineering
 (2014)

---

## Abstract

City intersection traffic signal control is an important method to improve the efficiency of road network and alleviate traffic congestion. This paper researches traffic signal fuzzy control method on a single intersection. A two-stage traffic signal control method based on traffic urgency degree is proposed according to two-stage fuzzy inference on single intersection. At the first stage, calculate traffic urgency degree for all red phases using traffic urgency evaluation module and select the red light phase with large traffic urgency as the next phase to switch. At the second stage, green delay of the current green phase is determined by fuzzy inference based on the amount of vehicles of current green phase and next green phase. The average vehicle delays are used to evaluate the performance of the fuzzy signal controller. Finally, comparisons have been made with pretimed controller and fuzzy logic controller without considering the urgency of red phase. Simulation results show the performance of our proposed method.


---

## Body

## 1. Introduction

The monitoring and control of city traffic are becoming a major problem in many countries. With the ever increasing number of vehicles on the road, the traffic monitoring authority has to find new ways or measures for overcoming such a problem.Traffic control in most signalized traffic intersections is done with either pretimed signal control or traffic-actuated control. Pretimed control is based on preset signal timings and therefore nonresponsive to real-time fluctuations in the traffic demand. Traffic-actuated control presents an improvement over pretimed control, but it has limited ability to respond to real-time traffic demand. For an intersection with actuated control, performance generally deteriorates with heavy traffic conditions and the proportion of stopped vehicles is generally high. Adaptive controllers are designed to address these deficiencies, as they have the ability to make real-time adjustments to signal settings in response to both observed and predicted real-time traffic demands.Several approaches have been proposed for the design and implementation of adaptive signal control systems. The major research focus has been on application of fuzzy logic on intersection control. Fuzzy logic was initiated in 1968 by Zadeh [1]. Fuzzy logic is based on mathematical representation of human knowledge and experiences. It reasons approximately or in a certain degree of true or false. A fuzzy system is a classical artificial intelligent technology using fuzzy logic to solve problems in many fields. It has been applied successfully in many control systems, such as robot control, traffic signal management, industrial control, and home appliances, where traditional modeling techniques and controllers do not usually provide satisfactory system performance [2–6].There are many earlier applications of fuzzy logic to traffic signal control. Pappis and Mamdani have used fuzzy logic to control isolated two-way intersection, with no turning vehicle movements [7]. Niittymäki and Turunen provided a fuzzy IF-THEN control algorithm based on Lukasiewicz equivalence to signalized isolated pedestrian crossing [8]. Kaedi et al. established a two-stage method for intersection signal timing control based on neurofuzzy network [9]. Mehan provided a fuzzy logic signal controller for a four-way isolated intersection. This model is suited for mixed traffic, including the high proportion of motorcycles [10]. Hou et al. established a fuzzy control model for traffic light with countdown ability. It implemented a self-adapted fuzzy controller for intersection signal control based on the conception of flow quantitative to fuzzy traffic flow [11]. Pranevicius and Kraujalis presented a traffic signal control method based on fuzzy logic for an isolated signalized intersection. The current green signal can be extended or terminated in response to changing traffic conditions [12].All the researches reviewed above have reported better performance of the fuzzy logic controllers compared to pretimed and actuated controllers. However, the reviewed research switched traffic phase in sequence without considering the urgency of red phase. The main objective of this research is to design a fuzzy logic-based signal controller considering the urgency of red phase for a four-way isolated intersection with through and left-turning vehicle movements. The fuzzy logic-based signal controller will not only decide whether to extend or terminate a current green phase but also decide which red phase will be set as green phase. The average vehicle delays will be used to evaluate the performance of the fuzzy signal controller. The comparisons will be made with pretimed controller and fuzzy logic controller without considering the urgency of red phase.


## 2. Fuzzy Logic Signal Control Method Based on Traffic Urgency Degree

This paper researches an isolated four-way intersection with through and left-turning vehicle movements (Figure1). The preset changing order of four phases is illustrated in Figure 2.Figure 1
The typical intersection with four phases.Figure 2
The four-phase order of an intersection.


### 2.1. The Distribution of Vehicles Arrival

The distribution of vehicles arrival is a discrete random distribution, also known as the count distribution. It reflected a random vehicles number within a fixed period of time at a given spot. The common distributions of vehicle arrival are Poisson distribution and binomial distribution. In this paper, we assume that the arrival vehicles from all directions to an intersection are random and obey the Poisson distribution. The vehicle arrival rate is 0~0.4 per second.The function of Poisson distribution is as follows [13]:
(1)P(x)=(λt)xe-λtx!,x=0,1,2,…,
where P(x) is the probability of vehicles x during counting interval t; λ is the average arrival rate per unit time; t is the duration of each counting interval.Setm=λt, where m is the average number of vehicles during counting interval. The function (1) can be rewritten as follows:
(2)P(x)=mxe-mx!.


### 2.2. The Average Delay of Vehicles

In this paper, the average delay of vehicles is the performance evaluation for traffic signal control of intersection. If the average vehicle delay is smaller, the traffic signal control effect is better. The calculation of vehicle delay model is shown below. The amount of queuing vehicles at timet in red light phase Qrt can be calculated as follows:
(3)Qrt=∑i=1k(Qgi+∑j=1tqij),
where t is the traffic time; r is a symbol representing the red phase; Qr is the amount of queuing vehicles in red light phase; i is one of the red light phase branches; j is the time interval during the red light; g is a symbol representing the green phase; Qgi is the amount of queuing vehicles in the red light phase branch i, when the current green signal ends; qij is the amount of arriving vehicles in the red light phase branch i during time interval j; k is the number of red phase branch. k=6, ignoring the right turn traffic.The total vehicle delay in red light phase can be calculated as follows:(4)Dr=∑t=1n[∑i=1k(Qgi+∑j=1tqij)],
where n is the red light time of red light phase.The amount of queuing vehicles at thet seconds during green light can be calculated as follows:
(5)Qgt=∑i=1kzi(Qri+∑j=1tqij-qs·t),
where qs is saturation flow; qij is the amount of arriving vehicles in the green light phase branch i during time interval; Qri is the amount of arriving vehicles in the green light phase branch i during last red light phase; k is the vehicles flow in green light phase. In this paper, there are four phases in intersection regardless of right turn flow. Consider that k=2. The value zi can show whether there are queuing vehicles or not in current green light phase branch i. If Qri+∑j=1tqij-qs·t>0, then zi=1; otherwise, zi=0.The total vehicle delay of green light phase can be calculated as follows:(6)Dg=∑t=1l[∑i=1kzi(Qri+∑j=1tqij-qs·t)],
where l is the green light time during green light phase.The total vehicle delay in thex cycle can be calculated as follows:
(7)Dx=Dr+Dg.The average vehicle delay can be calculated as follows:(8)d=∑x=1yDxA,
where y is the number of cycles; A is the total amount of arriving vehicles from all directions in an intersection during all cycles.


### 2.3. Fuzzy Logic Signal Control Principle Based on the Urgency of Red Traffic Phase

In this paper, the fuzzy logic-based signal controller will not only decide whether to extend or terminate a current green phase but also decide which red phase will be set as green phase. That is, the phase sequence is uncertain. But each phase must be guaranteed one and only one time in a signal cycle. The fuzzy controller based on traffic urgency degree is shown in Figure3.Figure 3
The chart of fuzzy control principle based on the urgency degree of red traffic phase.The core control algorithms for fuzzy logic-based traffic signal include the following steps.Step 1.
Set a minimum green time for each phase according to the actual traffic condition.Step 2.
Set the minimum green time for the current green phase.Step 3.
Calculate traffic urgency degree for all red phases using traffic urgency evaluation module.Step 4.
Select the red light phase with large traffic urgency as the next phase to switch.Step 5.
Get the current green phase green light time delay through fuzzy reasoning based on the vehicles number of the current green phase and the next green phase.Step 6.
Switch to the next green phase; skip to Step2 and continue.


## 2.1. The Distribution of Vehicles Arrival

The distribution of vehicles arrival is a discrete random distribution, also known as the count distribution. It reflected a random vehicles number within a fixed period of time at a given spot. The common distributions of vehicle arrival are Poisson distribution and binomial distribution. In this paper, we assume that the arrival vehicles from all directions to an intersection are random and obey the Poisson distribution. The vehicle arrival rate is 0~0.4 per second.The function of Poisson distribution is as follows [13]:
(1)P(x)=(λt)xe-λtx!,x=0,1,2,…,
where P(x) is the probability of vehicles x during counting interval t; λ is the average arrival rate per unit time; t is the duration of each counting interval.Setm=λt, where m is the average number of vehicles during counting interval. The function (1) can be rewritten as follows:
(2)P(x)=mxe-mx!.


## 2.2. The Average Delay of Vehicles

In this paper, the average delay of vehicles is the performance evaluation for traffic signal control of intersection. If the average vehicle delay is smaller, the traffic signal control effect is better. The calculation of vehicle delay model is shown below. The amount of queuing vehicles at timet in red light phase Qrt can be calculated as follows:
(3)Qrt=∑i=1k(Qgi+∑j=1tqij),
where t is the traffic time; r is a symbol representing the red phase; Qr is the amount of queuing vehicles in red light phase; i is one of the red light phase branches; j is the time interval during the red light; g is a symbol representing the green phase; Qgi is the amount of queuing vehicles in the red light phase branch i, when the current green signal ends; qij is the amount of arriving vehicles in the red light phase branch i during time interval j; k is the number of red phase branch. k=6, ignoring the right turn traffic.The total vehicle delay in red light phase can be calculated as follows:(4)Dr=∑t=1n[∑i=1k(Qgi+∑j=1tqij)],
where n is the red light time of red light phase.The amount of queuing vehicles at thet seconds during green light can be calculated as follows:
(5)Qgt=∑i=1kzi(Qri+∑j=1tqij-qs·t),
where qs is saturation flow; qij is the amount of arriving vehicles in the green light phase branch i during time interval; Qri is the amount of arriving vehicles in the green light phase branch i during last red light phase; k is the vehicles flow in green light phase. In this paper, there are four phases in intersection regardless of right turn flow. Consider that k=2. The value zi can show whether there are queuing vehicles or not in current green light phase branch i. If Qri+∑j=1tqij-qs·t>0, then zi=1; otherwise, zi=0.The total vehicle delay of green light phase can be calculated as follows:(6)Dg=∑t=1l[∑i=1kzi(Qri+∑j=1tqij-qs·t)],
where l is the green light time during green light phase.The total vehicle delay in thex cycle can be calculated as follows:
(7)Dx=Dr+Dg.The average vehicle delay can be calculated as follows:(8)d=∑x=1yDxA,
where y is the number of cycles; A is the total amount of arriving vehicles from all directions in an intersection during all cycles.


## 2.3. Fuzzy Logic Signal Control Principle Based on the Urgency of Red Traffic Phase

In this paper, the fuzzy logic-based signal controller will not only decide whether to extend or terminate a current green phase but also decide which red phase will be set as green phase. That is, the phase sequence is uncertain. But each phase must be guaranteed one and only one time in a signal cycle. The fuzzy controller based on traffic urgency degree is shown in Figure3.Figure 3
The chart of fuzzy control principle based on the urgency degree of red traffic phase.The core control algorithms for fuzzy logic-based traffic signal include the following steps.Step 1.
Set a minimum green time for each phase according to the actual traffic condition.Step 2.
Set the minimum green time for the current green phase.Step 3.
Calculate traffic urgency degree for all red phases using traffic urgency evaluation module.Step 4.
Select the red light phase with large traffic urgency as the next phase to switch.Step 5.
Get the current green phase green light time delay through fuzzy reasoning based on the vehicles number of the current green phase and the next green phase.Step 6.
Switch to the next green phase; skip to Step2 and continue.


## 3. Design of Fuzzy Logic-Based Signal Controller Based on Traffic Urgency Degree

Fuzzy logic-based signal controller based on traffic urgency includes the following two modules.(i)
The traffic urgency degree evaluation module for red light phase: calculate traffic urgency degree for all of the red phase using the traffic urgency evaluation module. Select the red light phase with large traffic urgency as the next phase to switch.(ii)
Decision module: get the current green phase green light time delay through fuzzy reasoning according to the vehicles number of the current green phase and the next green phase.


### 3.1. Traffic Urgency Degree Evaluation Module for Red Light Phase

There are two steps in the traffic urgency degree evaluation module for red light phase. Calculate traffic urgency degree for all of the red phase using the traffic urgency evaluation module. Select the red light phase with large traffic urgency as the next phase to switch.There are two input variables and one output variable for traffic urgency degree evaluation module. The input variables include vehicles number of current red light phaseQr and the duration of red light since the last end of the green light Tr. The output variable is traffic urgency of all current red light phase Ur. The membership functions of Qr, Tr, and Ur are defined as follows.The domain ofQr is [0,30]. It is divided into five fuzzy subsets {Very Short, Short, Medium, Long, Very Long}, for short {VS, S, M, L, VL}. The membership function of Qr is shown in Figure 4. The domain of Tr is [0,150]. It is divided into five fuzzy subsets {Very Short, Short, Medium, Long, Very Long}, for short {VS, S, M, L, VL}. The membership function of Tr is shown in Figure 5. The domain of Ur is [0,1]. It is divided into five fuzzy subsets {Very Small, Small, Medium, Big, Very Big}, for short {VS, S, M, B, VB}. The membership function of Ur is shown in Figure 6.Figure 4
The membership function of input variableQr.Figure 5
The membership function of input variableTr.Figure 6
The membership function of output variableUr.The fuzzy rules of red light phase urgency degree evaluation module are shown in Table1. In Table 1, the element of the first row and first column is “VS,” which represents a fuzzy rule. The sample rule is as follows:if{Qr  is  VS}  and  {Tr  is  VS}  then  {Ur  is  VS}.Table 1
The fuzzy rules of evaluation module for red light phase urgency degree.
Q
r
T
r
VS
S
M
L
VL
VS
VS
VS
S
S
M
S
VS
S
S
M
M
M
M
S
M
M
B
L
B
M
M
B
VB
VL
B
M
B
VB
VBThis fuzzy rule can be described by natural languages as follows: “If the queue number of current red light phase is very short and the light duration of current red light phase is very short, so the urgency degree of current red light phase is very small.”


### 3.2. Decision Module for Delay Time of the Current Green Light Phase

In decision module, the current green phase green light time delay can be acquired according to the vehicles number of the current green phase and the next green phase. There are two input variables and one output variable for the decision module. The input variables includeQg and Qr. Qg is the vehicles number of current green light phase, and Qr is vehicles number of red light phase which has big traffic urgency. The output variable is the delay time of current green light phase Ge.The domain ofQg is [0,20]. It is divided into five fuzzy subsets {Very Short, Short, Medium, Long, Very Long}, for short {VS, S, M, L, VL}. The domain of Qr is [0,30]. It is divided into five fuzzy subsets {Very Short, Short, Medium, Long, Very Long}, for short {VS, S, M, L, VL}. The domain of Ge is [0,30]. It is divided into five fuzzy subsets {Very Short, Short, Medium, Long, Very Long}, for short {VS, S, M, L, VL}. The fuzzy rules of decision module for the delay time of current green light phase are shown in Table 2. In Table 2, the element of the first row and second column is “VS,” which represents a fuzzy rule. The sample rule is as follows:if{Qr  is  S}  and  {QgTr  is  VS}  then  {Ge  is  VS}.Table 2
The fuzzy rules of decision module for the delay time of current green light phase.
Q
g
Q
r
VS
S
M
L
VL
VS
VS
VS
VS
VS
VS
S
S
S
S
VS
VS
M
M
M
M
M
S
L
L
L
L
M
M
VL
VL
VL
L
L
LThis fuzzy rule can be described by natural languages as follows: “If the queue number of current green light phase is very short and the queue number of next green light phase is short, so the delay time of current green light phase is very small.”


## 3.1. Traffic Urgency Degree Evaluation Module for Red Light Phase

There are two steps in the traffic urgency degree evaluation module for red light phase. Calculate traffic urgency degree for all of the red phase using the traffic urgency evaluation module. Select the red light phase with large traffic urgency as the next phase to switch.There are two input variables and one output variable for traffic urgency degree evaluation module. The input variables include vehicles number of current red light phaseQr and the duration of red light since the last end of the green light Tr. The output variable is traffic urgency of all current red light phase Ur. The membership functions of Qr, Tr, and Ur are defined as follows.The domain ofQr is [0,30]. It is divided into five fuzzy subsets {Very Short, Short, Medium, Long, Very Long}, for short {VS, S, M, L, VL}. The membership function of Qr is shown in Figure 4. The domain of Tr is [0,150]. It is divided into five fuzzy subsets {Very Short, Short, Medium, Long, Very Long}, for short {VS, S, M, L, VL}. The membership function of Tr is shown in Figure 5. The domain of Ur is [0,1]. It is divided into five fuzzy subsets {Very Small, Small, Medium, Big, Very Big}, for short {VS, S, M, B, VB}. The membership function of Ur is shown in Figure 6.Figure 4
The membership function of input variableQr.Figure 5
The membership function of input variableTr.Figure 6
The membership function of output variableUr.The fuzzy rules of red light phase urgency degree evaluation module are shown in Table1. In Table 1, the element of the first row and first column is “VS,” which represents a fuzzy rule. The sample rule is as follows:if{Qr  is  VS}  and  {Tr  is  VS}  then  {Ur  is  VS}.Table 1
The fuzzy rules of evaluation module for red light phase urgency degree.
Q
r
T
r
VS
S
M
L
VL
VS
VS
VS
S
S
M
S
VS
S
S
M
M
M
M
S
M
M
B
L
B
M
M
B
VB
VL
B
M
B
VB
VBThis fuzzy rule can be described by natural languages as follows: “If the queue number of current red light phase is very short and the light duration of current red light phase is very short, so the urgency degree of current red light phase is very small.”


## 3.2. Decision Module for Delay Time of the Current Green Light Phase

In decision module, the current green phase green light time delay can be acquired according to the vehicles number of the current green phase and the next green phase. There are two input variables and one output variable for the decision module. The input variables includeQg and Qr. Qg is the vehicles number of current green light phase, and Qr is vehicles number of red light phase which has big traffic urgency. The output variable is the delay time of current green light phase Ge.The domain ofQg is [0,20]. It is divided into five fuzzy subsets {Very Short, Short, Medium, Long, Very Long}, for short {VS, S, M, L, VL}. The domain of Qr is [0,30]. It is divided into five fuzzy subsets {Very Short, Short, Medium, Long, Very Long}, for short {VS, S, M, L, VL}. The domain of Ge is [0,30]. It is divided into five fuzzy subsets {Very Short, Short, Medium, Long, Very Long}, for short {VS, S, M, L, VL}. The fuzzy rules of decision module for the delay time of current green light phase are shown in Table 2. In Table 2, the element of the first row and second column is “VS,” which represents a fuzzy rule. The sample rule is as follows:if{Qr  is  S}  and  {QgTr  is  VS}  then  {Ge  is  VS}.Table 2
The fuzzy rules of decision module for the delay time of current green light phase.
Q
g
Q
r
VS
S
M
L
VL
VS
VS
VS
VS
VS
VS
S
S
S
S
VS
VS
M
M
M
M
M
S
L
L
L
L
M
M
VL
VL
VL
L
L
LThis fuzzy rule can be described by natural languages as follows: “If the queue number of current green light phase is very short and the queue number of next green light phase is short, so the delay time of current green light phase is very small.”


## 4. Simulation Analysis

The average vehicle delays were used to evaluate the performance of the fuzzy signal controller. The comparisons have been made with pretimed controller and fuzzy logic controller without considering the urgency of red phase.In order to make comparisons, identical conditions have to be set during the simulations. The minimum green time and the delay time were set as follows.(i)
The minimum green time of east-west straight phase and north-south straight phase was set as 20 seconds.(ii)
The minimum green time of east-west left turn phase was set as 15 seconds.(iii)
The maximum delay of green light for green light phase was set as 30 seconds.(iv)
If the vehicle arriving in the intersection is stochastic and the traffic flow is not large, the vehicle arrival obeys the Poisson distribution. So, the vehicle arrival rate in the intersection was set as 0~0.4 per second.(v)
Assume that the vehicle leaving rate is one car leaving waiting team per second, when a phase from red to green light.(vi)
Set the simulation time as 1 hour.In this paper, the vehicle arrival rate is divided into three types, including low traffic flow, middle traffic flow, and high traffic flow. The ranges of each stage vehicle rate are as follows: 0~0.15 car per second, 0.15~0.3 car per second, and 0.3~0.4 car per second. The average delay of pretimed control, fuzzy control, and fuzzy control with traffic urgency degree is shown in Table3 (simulation results of low traffic flow), Table 4 (simulation results of middle traffic flow), and Table 5 (simulation results of high traffic flow).Table 3
Average vehicle delays of low traffic flow.
Number of simulation
Pretimed control
Fuzzy control
Fuzzy control with traffic urgency degree
1
73.5387
45.6423
40.7576
2
85.3338
42.7256
37.5516
3
82.7172
42.1008
42.0751
4
79.6795
44.7148
43.9731
5
91.9941
41.3830
40.4205
Average delay
82.65266
43.3133
40.95558Table 4
Average vehicle delays of middle traffic flow.
Number of simulation
Pretimed control
Fuzzy control
Fuzzy control with traffic urgency degree
1
146.6501
82.4300
76.7970
2
108.8296
63.1138
59.2166
3
187.9133
82.8549
78.5025
4
150.2061
78.3128
71.8656
5
175.1695
86.8280
74.6925
Average delay
153.7537
78.7079
72.21484Table 5
Average vehicle delays of high traffic flow.
Number of simulation
Pretimed control
Fuzzy control
Fuzzy control with traffic urgency degree
1
304.7168
211.6806
208.7081
2
314.6766
213.7743
209.5257
3
308.4338
219.8659
206.8460
4
310.3295
210.5916
209.1864
5
311.6645
219.8842
216.4840
Average delay
309.9642
215.1593
210.15From Tables3, 4, and 5, we can analyze the average delay of pretimed control, fuzzy control, and fuzzy control with traffic urgency degree, in three traffic types. The simulation results are as follows.(i)
In the low traffic flow, the average vehicle delay of fuzzy control with traffic urgency degree is reduced by 45.6% compared to pretimed control and is deduced by 5.4% compared to fuzzy control.(ii)
In the middle traffic flow, the average vehicle delay of fuzzy control with traffic urgency degree is reduced by 48.8% compared to pretimed control and is deduced by 8.2% compared to fuzzy control.(iii)
In the high traffic flow, the average vehicle delay of fuzzy control with traffic urgency degree is reduced by 30.6% compared to pretimed control and is deduced by 2.36% compared to fuzzy control.From the contrast of simulation results, the control effect of fuzzy control for traffic urgency degree is better than the pretimed control and common fuzzy control. The order of green light phase can be adjusted for some special traffic flow in fuzzy traffic control with traffic urgency degree.


## 5. Conclusions

This paper has analyzed the deficiency of existing fuzzy controller and put forward the strategies of improving fuzzy control based on traffic urgency degree. First, in order to determine the max urgency degree of red phase, the traffic urgency degrees of red phases were evaluated during the current green phase. The green light delay of current green phase was determined by fuzzy reasoning according to the number of vehicles of the current green phase and the next green phase. This algorithm has considered traffic factors and has more objectively reflected the intersection of each phase traffic demand urgent degree. Finally, the comparisons have been made with pretimed controller and fuzzy logic controller and fuzzy traffic control considering the urgency of red phase. From the contrast of the simulation results, the performance of fuzzy control for traffic urgency degree is better than the pretimed control and common fuzzy control method.



---

*Source: 694185-2014-08-04.xml*