# Efficient Intersection Management Based on an Adaptive Fuzzy-Logic Traffic Signal
## 5 Evaluation and Discussion  
### Implementation of the Proposed Controller  
The setup of the proposed controller is explained with a case study, which is performed by taking into account the characteristics of an isolated intersection located in the city of Morelia, Mexico. The analyzed intersection is depicted in Figure 3 and is described below. The case study consists of a four-leg intersection, where the intersecting roads are denoted as \(r_{1},r_{2},r_{3},r_{4}\) and \(r_{5}\). These roads have three main characteristics:  
1. \(r_{1}\) is a two-lane dual road with west-east and east-west traffic. In addition, \(r_{1}\) has two turning movements: a permitted right turn allowing the incorporation of vehicles to \(r_{2}\) and \(r_{3}\), and a protected left turn for the incorporation of vehicles to \(r_{4}\) and \(r_{5}\). 2. \(r_{2}\) and \(r_{3}\) are two-lane single roads with north-south traffic. 3. \(r_{4}\) and \(r_{5}\) are two-lane single roads with south-north traffic. Moreover, \(r_{5}\) has a protected left turn to allow the incorporation of vehicles to \(r_{1},r_{2}\) and \(r_{3}\). All the allowed movements are grouped in three incoming traffic streams \(A\), \(B\), and \(C\):  
1. Stream \(A\) is composed by the through movements of \(r_{2}\), \(r_{3}\), \(r_{4}\) and \(r_{5}\), along with the permitted right turn of \(r_{2}\). 2. Stream \(B\) is composed of the two movements of \(r_{1}\), a protected left turn and a permitted right turn. 3. Stream \(C\) is composed of both movements of \(r_{5}\), the protected left turn and the through movement. Based on the streams \(A\), \(B\), and \(C\), three phases are allocated within a traffic signal cycle. Figure 4 depicts the phases' setting. For sensing the traffic flow, we assumed the deployment of on-road traffic counters such as piezoelectric, which were located upstream 150 m before the corresponding intersection approach. By considering the traffic streams \(A\), \(B\), and \(C\) as the system's inputs and the cycle length as the output, four linguistic variables are defined:  
Figure 4: Traffic signal phases. Figure 3: System model. 1. Flow A (\(FA\)) is the variable whose universe of discourse is the traffic flow rate of stream \(A\). 2. Flow B (\(FB\)) is the input related to the flow rate of stream \(B\). 3. Flow C (\(FC\)) is related to the flow rate of stream \(C\). 4. Cycle length (\(Cl\)) is the variable whose universe of discourse is the duration of the set of phases in the traffic signal. Linguistic variables are fuzzified and labeled with different linguistic terms as follows:  
1. Flows A and B are fuzzified through five fuzzy sets: _very low_ (\(VL\) ), _low_ (\(L\)), _medium_ (\(M\)), _high_ (\(H\)), and _very high_ (\(VH\)). 2. Since Flow C has the less traffic flow rates, only three membership functions are defined: _low_ (\(L\)), _medium_ (\(M\)), and _high_ (\(H\)). 3. The cycle length is fuzzified with five functions: _very short_ (\(VS\)), _short_ (\(S\)), _average_ (\(A\)), _extended_ (\(E\)), and _very extended_ (\(VE\)). Fuzzy sets, related to the four linguistic variables, are bounded as shown in Figure 5. The maximum and minimum values for flow rates were obtained from a six-month traffic survey performed in the study site. Consequently, the boundaries for the flow rate, in vehicles per hour per lane (Veh/h/lane), are set as: \(q_{min}(FA)=0\), \(q_{max}(FA)=700\), \(q_{min}(FB)=0\), \(q_{max}(FB)=1100\), \(q_{min}(FC)=0\) and \(q_{max}(FC)=500\). The values for the cycle length were defined by considering the recommendations included in the HCM [72] and the values obtained from the Webster method for averaged traffic conditions. The boundaries for the cycle length are set as \(t_{min}(Cl)=30\) and \(t_{max}(Cl)=90\). Based on the eighteen fuzzy sets depicted in Figure 5, the Mamdani FIS is defined by seventy-five if-then rules that have been stated to include all the possible traffic conditions.