Abstract

This paper proposes a signal timing scheme through a two-stage fuzzy logic controller. The controller first determines the signal phase and then adjusts the green time. At the first stage, the adaptive membership function of vehicle arrival rate is improved to adapt to the changing traffic flow. In addition to arrival rate and queue vehicles, a specific phase order rule is considered to avoid disordered phase selection in fuzzy control. At the second stage, the green time detection module decides whether to extend the current green time or switch phases every few seconds and the vehicle arrival rate is not required as the input to controller in real-time detection. Differential evolution algorithm with low space complexity and fast convergence is applied to optimize the fuzzy rules for avoiding artificial uncertainty. Simulation experiments are designed to compare traditional fuzzy controller, fixed-time controller, and fuzzy controller without flow prediction. Results show that the current proposed method in this paper can reduce vehicle delay significantly.

1. Introduction

Traffic demand has greatly increased over the past decades. Many control strategies have been proposed to improve traffic capacity of an isolated intersection. Traffic signal control can be classified according to the following general operation methods [1, 2]:(1)Timing control based on historical traffic data(2)Adaptive control using online real-time data

The first method is easy to operate but has poor control effect. The main idea is to model the historical data, construct one or several objective functions, and find the optimal solution by optimization algorithm. For example, J. Guo proposed a particle swarm optimization to reduce vehicle delays based on Akcelik delay model [3]. This method simplifies traffic flow data but has difficulty solving congestion under traffic accident. Besides, its control efficiency is also very low in the case of traffic flow changes. The second method has good control effect but may be costly [4, 5]. Chen S improved traffic efficiency through the real-time signal control algorithm based on a dynamic programming (DP) procedure [6]. Three types of loop detectors are placed to obtain the real-time data for online calculation in consideration of presignals and lane selection [7]. O. Younis and N. Moayeri [8] propose a novel framework dynamic TL control (DTLC), that is, low overhead in communication and data processing to optimize the waiting time and queue length. These adaptive methods all need to model vehicle behavior. However, modelling the actual traffic behavior accurately is difficult, and optimization algorithms based on the aforementioned model may be ineffective. Some dynamic programming algorithms with a large amount of calculation are unsuitable for real-time control [9]. Fuzzy control does not need accurate modelling, and the design of a fuzzy controller is relatively simple. Therefore, in this paper, a fuzzy controller is designed to deal with the adaptive control problem. In 1977, Pappis and Mamdani [10] introduced the fuzzy logic control method into the signal control of the city one-way intersection, thus creating a new era of fuzzy logic signal control.

Compared with the classical control algorithm, the fuzzy logic control algorithm can describe the urban traffic system more reasonably. A two-stage fuzzy logic controller is designed [1113], and the phase sequence is first determined; then the green time delay is calculated. However, the phase selection is often unordered in the fuzzy controller of this structure. As a result, the busy phase is continuously selected, while some phases cannot obtain the green time [14]. Thus, a specific order condition is considered when the phase is selected in this paper. A type-2 fuzzy signal controller is introduced [1517]. This controller can deal with the uncertainty of the traffic model effectively, but it is difficult to select suitable parameters of membership functions and fuzzy rules are difficult. The optimization is time-consuming and may be ineffective. Azimirad [18] proposed state-space equations to formulate the average waiting time and used fuzzy logic to solve them. Modern control theory can be applied through state equations but many conditions are simplified in the modelling process. Fuzzy neural network system is applied to optimize signal timing [19, 20]. This system combines fuzzy control and neural networks and needs a large amount of data for training. The structure is relatively fixed and difficult to optimize. In this paper, the proposed controller can be easily optimized to adapt to different traffic conditions. Other fuzzy controllers are available for different cases [21, 22], but none of these controllers predict the traffic flow, and a forward-looking control is necessary. The design of fuzzy parameters is also a noteworthy problem because many people determine them depending on their experience without theoretical basis.

Machine learning is currently used as traffic control algorithm [23]. A deep neural network (DNN) is set up to learn the Q-function of reinforcement learning; then the appropriate signal timing policies by implicitly modelling the control actions and the change of system states can be obtained [24]. In this paper, wavelet neural network [2527] is applied to predict traffic flow, and the network can reflect the time information of traffic flow. In this way, the traffic arrival rate is considered in the fuzzy controller. However, the fixed membership function cannot respond to the change in traffic flow information. In order to deal with such problem, Shahvali proposed a new cooperative adaptive neural network method based on the minimum learning parameter and the predetermined performance technique, which ensures that all the closed-loop network signals are cooperative semiglobally uniformly ultimately bounded [28, 29]. Thus, an adaptive membership function is designed to solve the problem. Given many parameters, differential evolution (DE) algorithm [30, 31] is used to optimize the fuzzy rules for avoiding artificial uncertainty. The key feature of this algorithm is the faster convergence speed compared to traditional genetic algorithm (GA). Besides, considering some incident-related traffic light control, some strategies based on the discrete event model are introduced to prevent urban traffic congestion and reduce vehicle delay [32, 33].

The rest of this paper is organized as follows: Section 2 discusses the structure of the two-stage fuzzy logic controller and the evaluation index. Section 3 proposes the adaptive membership function to describe the predicted traffic volume and optimizes the fuzzy rules through DE algorithm. Section 4 describes the details of the simulation and compares the experimental results obtained in tested urban road.

2. Two-Stage Fuzzy Logic Controller

This paper investigates an isolated four-way intersection with straight and left-turning vehicle movements. The four phases are shown in Figure 1. Right-turning vehicle movement is not limited by the signal light.

The fuzzy signal controller, including phase selection and green time detection modules, differs from traditional ones. Phase selection cannot be entirely decided by the controller because the low flow phase may never be executed, whereas the high flow phase is executed many times. In order to avoid such disordered phase selection, each phase is guaranteed to be executed once in one cycle. We add some fixed order to deal with the problem. In one direction, left turn and straight ought to be connected, and green time will be given in each phase in a cycle. Also, if each phase of north and south direction is executed, then the direction of next phase is east and west. According to the phase selection rule, turning left or going straight forward in this direction is determined by the fuzzy controller. If left-turn phase is chosen, then the next phase is straight, and vice versa. In this case, the phase selection module is executed twice in one cycle.

In the specific phase order rule, processes A and B are executed alternately (Figure 1). The module determines which phase is executed first in process A or B (p1 or p2, p3 or p4).

The purpose of green time detection module is to determine whether to change the current phase. The input variables include the number of queue vehicles of current phase and average number of queue vehicles of other phases. If the fuzzy controller directly determines the green time, then vehicle arrival rate is ignored in this system and the result is unreasonable. The vehicle arrival rate also can be one of the inputs, but making fuzzy rules is difficult. One reason is that, among many fuzzy rules, few of them are beneficial to sum up and utilize the experience of artificial traffic manager. Thus, the number of inputs is as low as possible. Output is a decision variable. When the threshold is reached, the current phase is changed. In this case, the fuzzy controller is adaptive and indirectly considers the vehicle arrival rate.

When a phase is selected, the controller will provide the minimum green time of the phase. The sensors collect traffic flow information, and the green time detection module decides whether to extend the current green time or to switch phases every few seconds. The minimum phase green time is introduced to ensure that the vehicle passing through the stop line can safely cross the intersection and provide pedestrians and nonmotorized vehicles some street-crossing time when the traffic flow is very light. The vehicle waiting time of each phase also cannot be too long; otherwise, the drivers cannot stand it.

2.1. Phase Selection Module

This module is used to determine whether the vehicles turn left or go straight. The east-west or north-south direction is determined by the previous phase. The phase selection module has two input variables. One input is the number of queue vehicles in this phase, which is defined as QL. Another is average vehicle arrival rate within 15 minutes, which is defined as AR. The same phase has traffic flow of two directions, and the mean value of the two is taken for analysis. The calculation of AR involves the prediction of traffic flow as discussed in Section 3. The output variable is traffic urgency degree defined as U. The membership functions of QL, AR, and U are defined as follows.

The domain of QL is [0 30], and it is divided into five fuzzy subsets {Very Few, Few, Normal, Many, A great many}, which are shortened as {VL, L, N, M, VM}.

The domain of AR is [0 0.25], and it represents the traffic flow per second. AR is divided into five fuzzy subsets {Very Low, Low, Normal, High, Very High}, which are shortened as {VS, S, A, H, VH}.

The domain of U is [0 5], and it is divided into 5 fuzzy subsets {Very Light, Light, Normal, Heavy, Very Heavy}, which are shortened as {VR, R, G, F, VF}.

Figure 2 shows the triangular membership function of QL. The membership function of the output and the second input is also triangular. The triangular membership function is conducive to our modification to adapt to the changing traffic conditions.

The fuzzy rules are shown in Table 1. The element of the first row and first column is VR; if QL is VL and AR is VS, then U is VR. The parameters are adjusted according to the simulation results in the phase selection module and the adjustment rules are based on the following: if the number of queue vehicles is very small and the arrival rate is quite low, then the traffic urgency degree is very light. Fuzzy rules are not made at random, and the weights of the two inputs differ.

AR has a long-term effect on vehicle delays, whereas QL has an immediate effect. Thus, the traffic urgency degree is mainly influenced by QL, and AR plays a regulatory role. A long signal cycle indicates a large influence of AR. A short signal cycle implies a small influence of AR. The rules of fuzzy control should be chosen flexibly on the basis of the historical experience of the isolated intersection. Optimization algorithm is unsuitable for optimizing fuzzy control table because the inputs of the fuzzy system are not exact. Compared with optimal fuzzy rules, these rules are more feasible for improving the prediction accuracy of AR.

2.2. Green Time Detection Module

This module is used to determine whether to switch phases. Considering the potential effect of vehicle arrival rate, the fuzzy system does not directly output the green time. Unlike the phase selection, the green light time can be constantly changed; only the upper and lower limits are required. The green time detection module has two input variables and one output variable. One input is the number of queue vehicles in this phase, which is defined as MQL. Another is the average number of queue vehicles in other phases, which is defined as OQL. The output variable is a decision variable defined as J. It is fuzzed into a real value output between 0 and 1. When the value exceeds a certain threshold, the green light signal switches to the red-light phase; otherwise, the green light signal will remain unchanged. In this paper, the threshold is 0.5. The membership functions of MQL, OQL, and J are defined as follows.

The domain of MQL is [0 30], and it is divided into five fuzzy subsets {Very Few, Few, Normal, Many, A great many}, which are shortened as {VS, S, A, H, VH}.

The domain of OQL is [0 30], and it is divided into five fuzzy subsets {Very Few, Few, Normal, Many, A great many}, which are shortened as {VL, L, N, M, VM}.

The domain of U is [0 1], and it is divided into two fuzzy subsets {Yes, No}, which are shortened as {Y, N}.

The membership function is triangular, which is of the same type as the membership function of the output. The output U represents the traffic demand of other phases. If U is large, then the current phase needs to be switched. The fuzzy rules are shown in Table 2. The element of the first row and first column is “Y”; if OQL is VL and MQL is VS, then J is Y. This rule can be described by natural language as follows: if the number of queue vehicles in the current phase is very small and the numbers in other phases are very few as well, then the current phase can be switched. Despite congestion trends in other phases, we are still inclined to evacuate the current phase car flow.

Unlike phase selection module, two inputs here can be obtained directly by the detector with no error. Optimizing the fuzzy rule table is very effective because the fuzzy rule directly determines the output. We can optimize the fuzzy rule table by setting different target functions such as vehicle delays or queue length and select a specific fuzzy rule table depending on the specific circumstances.

2.3. Evaluation Index

Evaluation index is used to evaluate the control performance of the fuzzy controller. In this paper, traffic delay is chosen as the evaluation index, and a smaller traffic delay indicates a better control performance. The quantitative analysis of traffic delay is given below.

The number of queue vehicles at time in red-light phase is defined as ; then,where is one of the lanes in the red light and is the number of these lanes. represents the number of remaining vehicles at the end of previous green-light signal on the th lane, and is the number of arrival vehicles on the th lane during th time interval in the current red-light phase.

The total traffic delays in the red phase can be calculated aswhere is the number of seconds of the red light.

denotes the number of departure vehicles in a time unit during green phase. The number of queue vehicles at time in green-light phase is defined as . is calculated as follows:where represents the number of remaining vehicles at the end of previous red-light signal on the th lane, is the number of arrival vehicles on the th lane during th time interval in the current green-light phase. is the saturated flow rate. is the number of lanes in the current green-light phase, and is used to guarantee that the number of queue vehicles is positive. is defined as

The total traffic delays in the green phase can be calculated as follows:where is the number of seconds of the green light. In the th traffic light cycle, the traffic delay can be calculated as

Considering the difference in vehicle arrival rate, the average vehicle delay is chosen as the evaluation index and can be calculated aswhere is the number of cycles and is the number of arrival vehicles during the observation time.

The calculation of can be completed in one cycle, but the calculation of needs two cycles. The vehicle delay of the current cycle during red-light time is related to the signal timing of the previous cycle due to the different phase sequence. Here, one cycle refers to the completion of four phases. Vehicle delay can be calculated every two cycles but the vehicle delay of the last cycle during red-light time needs to be calculated separately.

This paper assumes that the two phases in the same direction are paired. The first phase direction is initialized. The control algorithms include the following steps:(1)Choose the given direction and determine the phase depending on the phase selection module of this direction.(2)Set minimum and maximum green times and delay the green time in accordance with the green time detection module.(3)Switch to the paired phase of this direction; the next step is the same as step 2.(4)Choose another direction and determine the phase depending on the phase selection module of this direction. Refer to step 2 and step 3 to determine the green time of the third and fourth phases.(5)Calculate of this cycle and of the previous cycle.(6)Skip to step 1; if this cycle is the last cycle, then calculate of this cycle separately. Obtain on the basis of the vehicle flow rate.

3. Optimization Design

Two strategies are used to optimize the fuzzy controller. After the prediction accuracy is improved, the adaptive membership function is constructed for a better phase switching. DE algorithm is also used to optimize the fuzzy control table of green time detection module. Both are devoted to solving artificial randomness in fuzzy control.

3.1. Traffic Flow Prediction Using Wavelet Neural Network

Traffic flow seems to be very random in the short term but in the long term it has a close connection with time information. In this paper, wavelet neural network is used to predict traffic flow time sequence. The traditional s-function of hidden node is replaced in wavelet neural network by wavelet function. The basic structure is shown in Figure 3.

In Figure 3, are the input of the wavelet neural network. are the predicted output. The corresponding weight from input layer to hidden layer and weight from hidden layer to output layer are, respectively, denoted as and . Then the output of hidden layer can be obtained by the equation:where denotes the number of the nodes in hidden layers, represents the wavelet basis function, and and are the scaling factor and the translation factor of the wavelet basis function, respectively.

Then the output can be obtained as

The wavelet analysis improves the Fourier transform that is most widely used in the signal processing field, but it has a serious limitation. The transformation abandons time information and is unable to determine the time of signal occurrence. That is, Fourier transformation does not have distinguishing ability in the time domain.

We collect traffic data for 3 days and record the traffic flow every 15 minutes. The wavelet neural network is trained by the data of 2 days. Finally, the trained wavelet neural network is used to predict traffic flow on the third day. The four previous points can be used as input and the fifth time point is used as output. The results are shown in Figure 4. As shown in Figure 4, the predicted traffic flow can basically fit the actual traffic flow, but some points are inaccurately predicted. The predicted curve can reflect the trend of traffic flow and the average value of predicted results is similar to that of actual results. Therefore, the proposed method is verified.

Considering the change in traffic flow, a single membership function may have misleading effect on phase selection. An adaptive membership function needs to be constructed, and a general membership function is defined as

The values of the three parameters () can be adjusted to change the membership function in accordance with the predicted traffic flow. If traffic flow is increasing, then new iswhere is a ratio coefficient and is the increased traffic flow compared with the average traffic flow. and do not change. For example, the average traffic flow is 0.125 veh/s, while the current traffic flow is 0.2 veh/s and is 0.3. The membership function before and after the change is shown in Figure 5. The real line represents the changed membership function.

We only make a conservative change; if necessary, can also be changed as

If traffic flow is decreasing, similarly new and are

The coefficients can be adjusted depending on the actual situation.

The arrival rate of traffic flow plays an important role in vehicle queuing. The membership function is changed to avoid the small or large effect of the arrival rate of traffic flow on fuzzy control under low or high flow rate situations.

3.2. Fuzzy Control Table Optimization Using DE

DE was first proposed by Storn and Price in 1995. This algorithm is mainly used to solve the problem of real number optimization. Similar to GA, the initial population is randomly generated, and selection criteria are fitness values for each individual in a population. The main process also includes three steps: mutation, crossover, and selection. However, differences exist between them. GA is based on fitness value to control the probability value of the offspring generated by the parent crosses, and the probability of the selected individuals with larger fitness value will also be larger. The mutation vector of DE is generated by the parent differential vector and crossovers with the parent individual vector to generate new vector and is directly selected with the parent vector. This selection process embodies the idea of greedy algorithm. Thus, the approximation effect of DE is more significant than that of GA. We choose DE as the optimization algorithm because the fuzzy control table has many variables and the convergence speed of GA is slow.

Consider a parameter set , and a cost function . The value of each parameter is limited to a given scope . The purpose of the algorithm is to minimize the values of parameter sets by optimizing their values and the individuals (chromosomes) of the initial population of candidate solutions are randomly initialized within the given boundaries aswhere represents a randomly generated number with uniform probability distribution within the range [0, 1]. The change of the population is mainly based on differential mutation, where a new chromosome is generated by adding the weighted difference between two individuals of the triad to the third individual (donor). Finally, the perturbed individual and the current population member (parent) are recombined in this way:where denotes the “donor,” is the current generation, and is a randomly selected integer within the interval [1, ], under the computation for all members of the population. The random number is seeded for each chromosome parameter, while, for the mutation and crossover operations, the DE control parameters and remain unchanged during the search process. Then, at the selection stage, each trial vector competes only against its counterpart (parent) in the current population . The survivors of the competitions being better fitted than the corresponding final candidates move to the next generation. The DE selection strategy ensures the survival of the elitists, described as follows:

The main control parameters of the DE algorithm include population size (M), scaling factor (F), and crossover probability (cr). We need to choose suitable values depending on the actual situation. In this paper, the fitness function is the average traffic delay. However, the parameters of the fuzzy control table are integers and DE mainly solves the problem of real number optimization.

For the fuzzy table of green time detection module, a function is defined as

The variable range of DE is [1 2]. Notably, 1 represents Y and 2 represents N in the fuzzy control table.

4. Simulation

Data used in the simulation are collected from a single intersection in Huagang Road, Nanjing, Jiangsu Province, China. We collect data for four consecutive days at the same time period to facilitate the prediction of wavelet neural network. The simulation is conducted on MATLAB and vehicle delay. Parameters of wavelet neural network can be obtained from MATLAB neural network toolbox. The saturated flow rate and the range of green time is [15, 51].

For comparison, another traditional fuzzy controller without phase selection module is designed. The green time detection module directly decides the green time delay of current green-light phase.

Figure 6 shows the traffic delay of fixed-time controller, the proposed fuzzy controller in this paper, and traditional fuzzy controller. The average traffic delay is recalculated every cycle.

The traffic delay of the proposed controller is evidently decreased compared with those of fixed-time and traditional fuzzy controllers. Fixed-time controller is a conservative control and has parameters obtained on the basis of people’s experience and knowledge. The control effect of the traditional fuzzy controller is not much better than that of the fixed-time controller because considering the number of queues in the current time only is insufficient. Phase selection also plays an important role.

Then we verify the effectiveness of vehicle prediction in phase selection. Figure 7 shows the queue vehicles in the straight phase of north direction in the two cases. One cycle includes four phases and 84 time periods. In the beginning, the controller without prediction can control the queue vehicles well. As time goes on, queuing vehicles increase gradually, and the control effect becomes poor. On the contrary, the number of queue vehicles has been kept at a lower level under the proposed controller.

At last, we also verify the effectiveness of DE algorithm in green time detection module. The optimized fuzzy control table is shown in Table 3. In the optimization process, the speed of convergence is fast, which conforms to the characteristics of the DE algorithm. The average vehicle delay results are shown in Figure 8.

Figure 8 shows that DE algorithm is effective, and the control performance of the optimized green time decision is evidently better. The control performance differs in different cases. In practical application, we need to optimize the rules in different circumstances and compare the results to obtain the final fuzzy control table. The results of DE algorithm can be used as a reference to reduce the interference of human factors when making fuzzy rules.

5. Conclusion

The simulation results show that the proposed fuzzy controller can effectively reduce vehicle delay. The traditional fuzzy and fixed-time controllers ignore the influence of vehicle arrival rate, which leads to their poor control effect. The predicted traffic flow input is added to the signal control to adapt to the sudden change of traffic flow. Then traffic flow prediction and adaptive membership function are designed for a long-term control, and the results show that the phase selection is also more accurate for a short term. Aiming at solving the problem that the subjectivity of fuzzy rules is too strong, the fuzzy control rules are optimized by DE algorithm. Also, the single-time optimization is insufficient, and the best fuzzy control table can be obtained by comparing the optimization results in different cases. However, this method is suitable for isolated intersections rather than for multiple intersections because the green time is not fixed.

Data Availability

The data used to support the findings of this study are included within the article.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This work was supported by the National Natural Science Foundation of China (no. 61473146).