Trafﬁc Control Prediction Design Based on Fuzzy Logic and Lyapunov Approaches to Improve the Performance of Road Intersection

: Due to the increasing use of private cars for urbanization and urban transport, the travel time of urban transportation is increasing. People spend a lot of time in the streets, and the queue length of waiting increases accordingly; this has direct effects on fuel consumption too. Trafﬁc ﬂow forecasts and trafﬁc light schedules were studied separately in the urban trafﬁc system. This paper presents a new stable TS (Takagi–Sugeno) fuzzy controller for urban trafﬁc. The state-space dynamics are utilized to formulate both the vehicle’s average waiting time at an isolated intersection and the length of queues. A fuzzy intelligent controller is designed for light control based upon the length of the queue, and eventually, the system’s stability is proved using the Lyapunov theorem. Moreover, the input variables are the length of queue and number of input or output vehicles from each lane. The simulation results describe the appearance of the proposed controller. An illustrative example is also given to show the proposed method’s effectiveness; the suggested method is more efﬁcient than both the conventional fuzzy trafﬁc controllers and the ﬁxed time controller.


Introduction
One of the biggest issues in the world is urban traffic and transportation between cities. More than a million people spend a lot of time in traffic every day, and the total time wasted in traffic reaches millions of hours. Another disadvantage of traffic is air pollution. Urban traffic has three main factors: human, road, and vehicle. If none of these factors are present, urban traffic is not be generated. Recently, traffic became one of the most critical factors disrupting urban transportation. When the flow is smooth, fast, and without significant environmental impact, the city has good traffic. An example of the essential characteristics of developed cities is the permanent population extension in a comparatively short region. These results are the rise in the number of cars and the need to move and transport people in urban city tracks. As a result, the control and monitoring of traffic became the central issue in many countries [1][2][3].
The intelligence of urban systems such as traffic lights is another factor that can play a very influential role in reducing traffic. Also, some countries are developing different technologies to reduce traffic and increase the volume of highways. Because the traffic system is complicated, random, nonlinear, and discrete, it is difficult to control it using an accurate model. The use of fixed interval control and operated control cannot be entirely adequate [4][5][6]. In the last decade, numerous researchers applied fuzzy logic in traffic signal control, including type-1 and type-2 fuzzy systems [7]. Fuzzy logic relies on scientific interpretations of personal knowledge and its experiments. Fuzzy Logic controllers were vigorously implemented in several policies with uncertainties. Fuzzy logic, first introduced by Zadeh in [8], is based on the scientific order of personal knowledge and his skills. Fuzzy logic controllers were favorably utilized in various systems that have built-in possibilities. Fuzzy logic controllers were vigorously applied in various practices that have integrated uncertainties [9]. A compact summary of the first importance of fuzzy logic to traffic signal control is as follows: Pappis and Mamdani in [10] studied the control of a private traffic intersection with easy narrow east-west/north-south traffic control with casual vehicle approaches and no turning changes. Fuzzy rules were magnified to assess the suitability of sustaining a popular green phase across numerous durations, based on superimposing a metric size of resolution deadline. Specific extensions were related, and the one delivering the most critical quality of confidence was considered. This method considered connecting the period length divides and offsets per intersection using solely social traffic data. Regulations on the signal period length and divisions were performed based upon the plethora level for the respective method of an intersection. The fuzzy logic traffic lights controller performed the task completely as opposed to the the fixed-time controller and vehicle-operated controllers, owing to its flexibility. Its versatility allowed it to engage the number of cars perceived at the incoming intersection and the addition of the green time. A modern fuzzy logic controller for a detached acclaimed intersection was offered in [11]. In the big cities, traffic density reduced people's quality-of-life. There are reasons for creating urban traffic, however, traffic is mainly on roads, for example, in complex road structures where vehicles often cross due to driver intentions and problems with the traffic management system. In this article, fuzzy logic control in urban traffic, a strategy to use the time of traffic lights with the state, is recommended. The traffic light system is controlled to decrease queue length and status entry [12]. This method controls the traffic light timings and phases classification to guarantee constant traffic movement with the least amount of waiting and lowest length of queue. This implementation of an original traffic light control scheme using fuzzy logic technology is presented in [1]. Related to the other research that concentrates on the fuzzy controller, this paper deals with a class of stable fuzzy controllers. We assumes the traffic situation would be too hectic for the local fuzzy controllers to control it efficiently. As such, the unique controller will optimize the green time delays of the complete intersections using a simulated annealing algorithm. During the study, a novel TS fuzzy controller for urban traffic is proposed. The state-space dynamics are utilized to express the vehicle's standard waiting time at a separate intersection and length of queues. A fuzzy intelligent controller is designed for light control based on the length of the queue, and the system's stability was proved using the Lyapunov theorem.
More precisely, the remainder of this article is as follows: • A comprehensive model of vehicle behavior for the city's transportation system at intersections on two levels is provided. • We tested and imitated the given intersection model in traffic conditions. • We show that the fuzzy controller design reduced the number of vehicles waiting in line and the time required to wait at red lights. • Evaluation of the average number of cars in a row in two ways, one without a controller and one with a controller over a certain duration.
In this investigation, we propose a new TS fuzzy controller for urban traffic, in which we used space dynamics from a signal intersection to model. We proved the system's stability using the Lyapunov theorem. Finally, we designed it based on a model fuzzy control.
The rest of the article is composed as follows: Section 2 will briefly explain traffic control history and the reason for using fuzzy control and experts. In Section 3, the statespace difference of the single intersection is described. Then, in Section 4, we explain the proposed framework. Section 5 states the designation of the TS fuzzy controller for the single intersection. In Section 6, we describe the fuzzy controller's mathematical model. The simulation results for two fixed-time controllers and fuzzy intelligent control classes are mentioned in Section 7. In Section 8, the conclusions are mentioned; finally, some suggested methods will be presented to make the fuzzy process more efficient and accurate.

Overview Control Traffic
Today's traffic is one of the major global issues, and an urban traffic system is essential for managing daily movement. Developing an urban street network between the network and related traffic flow can improve the preparation capabilities of urban systems. This study [13] proposes a new model of urban transport in megacities using a multiagent system and pertinent method. This used to be used for complex urban traffic, based on interconnectivity, i.e., a traffic signal with Petri Nets to show a natural behavior. The process of urban systems can assist in the comprehension of the urban street network. This article studies the impact of the character proportion of a square urban network on the dynamics of traffic systems. The application of road networks was observed using the Macroscopic Fundamental Diagram (MFD) [14]. Due to the significant increase in vehicles in modern decades, urban traffic congestion became increasingly severe. Furthermore, urban overcrowding creates noise pollution. There are collected dynamical models of city-scale traffic that can help to develop model-based perimeter control methods. Controlling traffic in urban road networks remains challenging. As such, it was suggested a nonlinear model with a predictive perimeter control system for ordinance and commercial optimization goals, with closed-loop stability during development, which is for the effective and reliable control of city-scale traffic [15][16][17][18]. Traffic light control and the flow of urban traffic are essential elements for city traffic management. This paper proposes a genetic scheduling model for traffic light control, which has a status update feature that was developed to customize road signs. Also, this model can improve the cycle of road signals at different intersections dynamically [19].

Fuzzy Controller-Based Traffic Control
Traffic congestion is an as-of-yet unsolved global problem. If we suppose that new roads and additional capacity continue to be added, this problem will become more prominent in areas where unlimited access roads (such as arterial roads) and limited access roads (such as highways) are connected. To assist with this issue, it were proposed a fuzzy model for a complex traffic control system and a Diverging Diamond Interchange (DDI)-Ramp Metering (RM)-for over-saturated traffic situations, which means an alternative intersection geometry should be used in the intersection without conflict. The recommended fuzzy model in this paper was designed to stop a queue from the metering grade to the DDI; in previous work, it improved traffic situations slightly [20]. Congestion is a common critical problem, especially in large cities. There is congestion at intersections that were connected to different ones, such as the analytical traffic light continuance, which does not match traffic situations. Here, we propose a form of a traffic light controller using the Takagi-Sugeno-Kang method fuzzy logic. The research points to produce a green light continuance calculation using fuzzy logic [21].
Life's pace is quickening, and people feel anxious about the long travel times. Reasonable traffic control strategies could decrease the wait time for commuters. In the past, traffic control research was focused primarily on time sequence, ignoring phase investigation. The typical timing system based on a single loop phase structure cannot achieve optimal control for asymmetric or small traffic flows. Therefore, this article proposes a fuzzy control method for signals in a time-changing world and a way to develop the topological structure. The delay of vehicles was diminished, and the traffic potential of the intersection was improved in [22]. Traffic lights play a pivotal role in urban traffic control. This essay discusses the control artifice and a performance review of a single-point intersection of traffic signals. Furthermore, a fuzzy model control was used to modify the signal timing dynamically [23]. Flow traffic at all traffic intersections is used to control the traffic lights. This study suggests a fuzzy inductive control system that uses physical logic to determine the phase sequence of each circuit and time of green exposure based on input parameters, which were designed to improve traffic flow at different intersections during peak hours and assist with the transportation of emergency vehicle.
Here, we show in Table 1 a survey of methods used in the direction system.

State-Space Difference of the Single Intersection
The two phases signalized intersection configuration for single intersections is shown in Figure 1.
In this scenario, leg one and leg 3 are phase 1, and leg two and leg 4 are phase 2. The length of the queue at an intersection represents the traffic state. The queue is considered as follows [37]: Here, Equation (1) one shows the index of the traffic streams (i = 1 TO m), the discretized time intervals (n = 0 TO n − 1), the length of the queue of i stream at the onset of the n time interval (U), the number of vehicles that join the i queue in the n time interval q i (n), the number of cars that depart d i (n), and traffic lights (z = 1 is green and z = 0 is red), which were typically distributed random signals. If T is seen as a discretized time interval, and if it is quickly sufficient, it can be assumed that vehicle-arrivals in each time interval are uniform. Consequently, W i (n) the total waiting time of vehicles is reached with Equation (2) [37].
The formulation to facilitate state-space comparisons and the optimization goal can be edited in matrix arrangement, as seen in [37]: In Equation (3), there are the vector of state variables, which include: and At urban intersections, the traffic control signal is a traffic light. The vehicles during the green phase can enter or depart from the queue; during the red phase, the vehicles can only join the queue. The parameters used in the suggested approach are shown in Table 2.

Component
Description The number of vehicles entering the queue d i (n) The number of vehicles leaving the queue The vector of variables of mode Z(n) Control signal Traffic condition P Positive definite

The Proposed Framework
One of the characteristics of an optimal traffic control system is flexibility in environmental changes; however, the most important characteristic is intelligence. The correct and accurate operation of fuzzy system is based on the knowledge and experience of the expert operating the control system. With the fuzzy method, the experiment involved a nonlinear function as a fuzzy model of a system. Based on the fuzzy model, special controller systems can be designed, which can be very simple. With the fuzzy logic method, the obtained linguistic scores given by the professionals were converted to appropriate fuzzy set numbers. The fuzzy logic structure allows the professionals to capture the experts' opinions in linguistic terms and evaluate the overall ratio level. Also, by using fuzzy sets, the comparison process becomes more confident. Further maintenance support can develop using a fuzzy-based organization. The primary supervisor of traffic is an expert police officer, and their knowledge can be transferred to write the formula form. Fuzzy mathematics includes fuzzy sets and related mathematical operations. In classical sets, the boundaries of the collection are defined precisely and definitively and an element is either a member of the set or not. Hence, the classical set's basic premise is that the exact definition is the set's boundary, and the elements' membership have no more than two models. Still, there are many cases where it is impossible to define an exact and definite boundary for the reader. The membership of elements in fuzzy sets is also expressed by the degree of membership, which is a number between zero and one [38].

Fuzzy Logic-Systems
Fuzzy logic is evolved, while classical logic is generalized. In classical logic, which is a dual value logic, any statement can be true or false. Therefore, approximate and inaccurate judgments are possible by applying fuzzy logic [38]. There are systems whose input information can be incorrect, i.e., the information input into a fuzzy system can be inaccurate. One of the most well-known and inaccurate processes in fuzzy systems is the use of fuzzy rule databases. In the fuzzy law database, each law is defined by an "if-then" structure. Fuzzy logic is a great way to use quality information to design system controllers and gained a special place in the control of laboratory and industrial processes in the last decade. There is no specific way to design a fuzzy controller when controlling the process based on personal information. The fuzzy logic control method is an expert method, and the performance of a fuzzy controller depends largely on the experience of the user. Individual experiments were used as a nonlinear function as a fuzzy model of a system. Based on the fuzzy model, unique controller systems can be designed, and the idea of controller design can be very simple. It includes all rules and regulations established by experts to control the decisions of the decision-making system. Under the new fuzzy method, the rules and regulations can be modified and minimized to achieve the best results with minimal rules. Figure 2 is a fuzzy structure logic that includes four main sections: rules, fuzzifier, defuzzifier, and intelligent. As shown in Figure 2, a general structure of fuzzy systems is described because several choices were provided for each block, and various compounds creates different fuzzy systems [38].
There are systems whose input information can be inaccurate; input information in a fuzzy system can be incorrect. An example of the most well-known and inaccurate processes in fuzzy systems is a fuzzy rule database. In the fuzzy command database, special law was restricted by an "if-then" installation. All the rules and conditions are governed by the decision-making system, if stated by an expert. According to the new fuzzy method, the rules and regulations can be modified and minimized to achieve the best results with minimal rules.
Below are the characteristics of fuzzy logic follows [39]: • Flexible implementation; computational seriousness of machine learning methods. • Ability to simulate human logic and thinking. • Ability to create two solutions or answers to a problem. • A good solution to a problem with an expected answer. • A practical approach that uses flexible states in logic for reasoning. • Ability to generate nonlinear functions using random complex numbers. • Strong dependence on the researcher in creating fuzzy logic models.

Designing Stable TS Fuzzy Controller for Single Intersection
In this section, we outline how the fuzzy controller was developed. The fuzzy system has three inputs and one output, and we used Takagi-Sugeno-Kang fuzzy system. The inputs include the length of the queue for vehicles and the number of vehicles entering or leaving each leg, which in phase 1 is as follows: For phase two, it is as follows: The output control signals respectively are Z 1 and Z 2 . The format of fuzzy control rules is as follows: In fuzzy controller, y = f (u) is a constant function that receives values of 0 or 1 (0 means stop and 1 means move). Moreover, for input variables, we consider the linguistic variables in three fuzzy sets, low (L), medium (M), and high (H), in the length of the queue, and low (L) and high (H) for the number of vehicles that enter or leave the leg. Altogether, there are 36 rules. The membership function of the input variable is a triangle. For the queue length, the interval is [0100], and the number of vehicles entering or leaving in each leg interval was considered [05]. (U i (n)) and (Z i ) were defined for i = 1, 2, 3, 4. An example of the fuzzy rules that were used in two controllers are shown in Table 3. Table 3. One example of fuzzy rules.

Mathematical Model of the Controlled System
With the TS fuzzy method used here, the dynamic model considered a system from an intersection; then, we used TS fuzzy for the stability of state-space equations at a single intersection. Theorem 1. Consider the dynamical system given in (3), then the controller structure given in (9) and (10) makes the states of the system uniformly bounded, as well as all signals involved in the closed-loop system.

Proof.
For the green phase, the length of the queue and the waiting time equations were defined as follows: which K g = U g W g and state vector was considered as follows: The red phase in the traffic light, stability of the queue, and the waiting time equations were defined as follows: (11) which K r = U r W r and state vector is as follows: A Lyapunov function can be used to prove stability at an equilibrium point in phase space if it is defined in the phase space. Lyapunov functions can determine a system's stability or instability. In addition, this method has the advantage that it does not necessitate knowledge of the actual solution. By means of this calculation, the stability of nonrough equilibrium points can be studied. In this segment, the Lyapunov function must find and prove that the equations are stable because the equations' discretion is the Lyapunov function as follows: which P 1 , P 2 are definitely symmetrically positive. The difference of the Lyapunov function: ∆V(n) = V(n + 1) − V(n) = K(n + 1)PK(n + 1) − K(n)PK(n) To prove the stability of the closed-loop system using Equation (14), it can be rewritten as follows: ∆V(n) = K T g (n + 1)P 1 K g (n + 1) + K T r (n + 1)P 2 K r (n + 1) − K T g (n)P 1 K g (n) −K T r (n)P 2 K r (n) The Equation (16) is represented as follows: After some mathematical manipulation, the above equation is as follows: To simplify the formula, we use the following definitions: Furthermore, Consequently, we used (18) and (19); thus, we have the following equation: To prove the stability of the closed-loop system, the following definitions are considered: and furthermore, the Equation (22) can be assumed without loss of generality.
By using the Equations (21) and (22), δV can be summarized as follows: The differences with the Lyapunov system are uniformly in the compact set mentioned in Equation (23).
Finally, the proof is complete.

Simulation Results
To show the effectiveness of the suggested controller, the proposed method is applied to the system mentioned in Equation (1), in which attention to queue length and delay, as well as available vehicles in the traffic were optimized. It is assumed that T = 6(s) is a sampling time. α shows values in traffic conditions. Regarding this Table, we can see different traffic conditions in the urban traffic for i = 1, 2, 3, 4; the α parameter is between 0 and 1 so that its variations conform to Table 4. The result of the simulation for fixed-time control and fuzzy intelligent control were discussed as follows [37]. In this section, we apply a model fixed-time controller to compare with the proposed model. The aim of the simulation is the decrement of the queue of length. In the fixed-time control method, the simulation results for the length of the queue and waiting time of vehicles without a controller are shown as follows. Figure 3 shows the number of vehicles in legs 1, 2, 3, and 4 in the intersection without a controller. The performance without a controller is not promising. For example, Figure 3 describes the number of vehicles in the second queue without a lower controller than other legs. Figure 3 displays the number of vehicles in the third queue without a controller that initially increased and then decreased.
Another example from Figure 3 is the fourth leg: this leg's traffic is greater than that of the other legs, so it was therefore improved using the fuzzy controller.

Fuzzy Intelligent Controller
In this part, we show how to develop a fuzzy system in a signal intersection. The output of the fuzzy controller as the control variable (Z i ) of the traffic system, which controls input, is a green or red phase in each leg. Figure 4 showed the system's total output at each leg in an intersection by using model intelligent fuzzy control. To see how robust our method is in urban traffic for reducing queue length, we consider the same case, whose results are shown in Figure 4, but it is an on-based, fixed-time controller. Figure 4 shows that the controller performs satisfactorily. The length of the queue of vehicles in the first leg reduces compared to that of fixed-time control. Also, the number of vehicles in the second queue decreases compared to that of fixed-time control. Moreover, the number of vehicles in the third leg was reduced compared to that of fixed-time control. With attention to results, the length of the queue of vehicles in the fourth leg reduced compared to that of fixed-time control.

Conclusions
In this article, a fuzzy model of an urban traffic network was designed for a single intersection. The length of queues and the average waiting time for the vehicles are the model's state variables. Moreover, both the vehicle's average waiting time at an isolated intersection and the length of queues are considered controller inputs. Additionally, the effectiveness of the suggested controller is verified by simulation results. As shown in Table 5 and Figure 5, the percentage of improvement with attention to simulation results using the proposed method decreases the vehicles in each intersection phase to the fixedtime control.

Discussion and Future Direction
Recently, the application of fuzzy sets in automatic control attracted much attention. In this section, we discussed the fuzzy model, whose model knowledge was categorized as specific and implicit, according to formation and transmission models. Specific knowledge is the knowledge stored in documents and computers, such as statistical information on the changes of traffic parameters. At the fuzzy model intelligent control, the initial work was performed with the goal of imitating an experienced and specialized human operator (Knowledge Base). A continuous addition is found between discrete outputs that are regularly obtained (fuzzy logic section). An example of this is the knowledge of traffic police in manual control of traffic lights of many intersections. We need both kinds to achieve a fuzzy control system for synchronizing the traffic light in a given intersection. Therefore, specific knowledge of the field values related to the design parameters of the fuzzy membership functions and the implicit understanding of the decision-construction rules for the change of the green phase should be possible. Table 6 shows the comparison of the fuzzy controller with the recent state-of-arts in this field. The advantages and disadvantages of fuzzy logic model are listed below.
The advantages of fuzzy logic include: • The logic of fuzzy is close to human reasoning. • Fuzzy logic programs are fast and inexpensive. • It can be easily designed. • It is widely used in decisive control and forecasting systems.
Disadvantages of fuzzy logic include: • Experts determine the principles of logic in fuzzy. • Analyzing a system using fuzzy logic is not easy, as the reaction is unpredictable. • Features can be time-consuming and incorrectly fixed.
Fuzzy logic is one of the most robust implementations of fuzzy sets, where the variables are in non-numerical language. Fuzzy logic was the opposite of binary or Aristotle's logic, which sees everything in two ways: yes or no; black or white; zero or one. These logical changes range from 0 to 1. In this case, we proposed a fuzzy model controller to schedule traffic lights in a single intersection in urban traffic to reduce the queue length with attention to delay time of cars in the traffic. However, in the proposed model, membership function parameters are not optimal, and therefore, for better efficiency and results in the future, an example of tasks that can be performed to continue working on the issue of urban traffic control are: • Fuzzy membership function parameters can be selected optimally with methods. • The functions of the memberships used triangular, which can be derived from other membership functions, such as Gauss, etc. • Investigate classical control techniques such as optimal control, adaptive control, robust control, etc., to design a coordinated traffic signal control system for several adjacent intersections.