MATLAB DMU
MATLAB DMU
Table of contents:
1.Abstract
2.Introduction
3.Literature Reviews
4.Conclusion on literature reviews
5.The System
6.Experimental Design and analysis
7.Critical Reflection
8.Conclusion
9.Bibliography
Abstract:
This report is a new approach to traffic signal control using fuzzy logic. It aims to
enhance the efficiency and flexibility of urban traffic management. The proposed
system, implemented in MATLAB using Mamdani type fuzzy inference system (FIS) to
dynamically adjust traffic signal timings based on real time inputs. In my code there are
three key inputs, namely Traffic volume, Time of day and Lane occupancy. The FIS
employs a set of fuzzy rules to model the relationship between the 3 input variables and
the Signal time output. These rules are defined in a way to capture the complex traffic
behavior during various times, such as low traffic volume in morning and high lane
occupancy in the evening. My system will use Min-Max inference procedure with
centroid defuzzification strategy to get the crisp and efficient signal timing value. My
project encourages simulations and testing under diverse traffic conditions to evaluate
the system's responsiveness and its ability to optimize traffic flow while minimizing
congestion.
3
Introduction:
Traffic is one of the major problems in urban cities. We think traffic is not a big problem
to a developing country, but this traffic can affect the economy of a country deeply.
Traffic slows down the development in a city and productivity is lost due to traffic i.e. as
workers spend a lot of time stuck in traffic which otherwise could be utilized productively
for work which in turn contributes to the economy. Traffic congestions delay the
transportation of goods and services which increases logic costs for businesses, this in
turn leads to higher prices and decrease in competition for business. Vehicles stuck in
traffic consume more fuel and this results in higher operational costs for businesses.
Traditional traffic signal controls are static and struggle to cope with the dynamic nature
of modern-day traffic. Recognizing the need for a more smart and dynamic approach,
this project integrates fuzzy logic attributes into traffic signal decision making. The key
input variables are Traffic volume, Time of day and Lane occupancy. These inputs are
modeled using Fuzzy inference system (FIS) and then interpreted by the Mamdani
fuzzy inference system through the given rules and dynamically adjusts signal timings.
The main goal of this approach lies in its adaptability, the morning rush hours, afternoon
dims and evening congestion are treated with the dynamic rules which in turn enables
the system to respond smartly to various scenarios. As a result, the traffic signal control
system optimizes traffic and reduces wait times and also minimizes environmental
impact of extended idling of cars.
4
Literature Review:
Paper 1
This paper peaked my interest in traffic congestion which is a yet unsolved global
problem. In this research paper they address this situation by introducing a fuzzy control
approach for signals in a dynamic environment to reduce waiting time and also to
decrease queue lengths. The implementation of this technique resulted in reduced
vehicle delays and made the traffic at intersections efficient. The urban traffic relies on
traffic signals efficiency and this research explores the control strategy and the
performance at a single point intersection. This paper also suggests using a fuzzy
inductive control system that employs physical logic to determine the phase sequence
and exposure time of green light based on the input parameters.
The fuzzy system has 3 inputs and one output and used Takagi Sueno (TSK)fuzzy
system. The inputs include the length of the queue for vehicles and the number of
vehicles entering or leaving each leg. Linguistic variables like low, medium and high
were used for queue length and number of vehicles. Membership functions for input
variables were triangular with intervals [0 100] for queue length and [0 5] for number of
vehicles. There were also 36 rules in total.
As the study is used to evaluate the flexibility of the fuzzy controller system by
comparing it to a fixed system, the results show a superior performance by the fuzzy
controller in reducing queue lengths. The effectiveness of this controller is measured
using key metrics, the main one being reduced queue lengths.
5
This study concludes by highlighting the practical implications of a fuzzy model for
urban traffic systems focusing on reducing queue lengths and waiting times. It also
suggests a continuous exploration of optimal fuzzy parameters for improving the
efficiency of the model. The comparative analysis between the fuzzy logic system and
the fixed system shows how intelligently traffic systems can be managed.
This research paper lacks robustness testing under various unforeseen situations. This
probably generalizes the situation into one intersection. The research also limits to only
queue lengths and waiting time instead of adding more factors like different vehicle
types, pedestrian traffic and any other external events.
Paper 2
In this research paper design and implementation of a traffic control system for a four-
way intersection that focuses on achieving a balanced traffic flow through some efficient
adjustments in the green phase interval. The assumption made is that forward going,
right-turn, and left-turn are allowed in any approach. The primary goal is to minimize the
waiting time of cars by dynamically altering the duration of green phase for each
approach based on the respective traffic situations.
In this fuzzy logic system, the controller has 4 crisp input values i.e. (di where i=1,2,3,4)
These inputs represent the traffic flow conditions in all the directions. The outputs from
these inputs undergo the time multiplexing (MUX) process and then the membership
function circuit (MFC). The MFC generates needed fuzzy sets for the subsequent fuzzy
operations in the fuzzy inference engine. The resulting fuzzy set is then subjected to
defuzzification to produce a crisp output.
6
This fuzzy system uses a set of if-then rules. These rules are applied in the reasoning
process. To manage the computation that is very complex it is better to use a minimal
number of rules as large numbers of rules increase the complexity. After fuzzification it
is followed by the Mamdani approach which involves an AND operation for each rule.
Defuzzification, which the final step converts fuzzy set inputs into a crisp output.
This research also contains a Max-Min inference and centroid defuzzification.
The table (Figure 6) represents how the fuzzy traffic controller outperformed the actual
controllers. The fuzzy controller achieved 50% improvement over the other two
controllers in terms of flow density. The fuzzy controller however, did not perform better
under high traffic volume, even though the difference is minimal. It can be concluded
that the fuzzy controller developed here can perform better than the other controllers.
The result of both literature evaluations emphasizes how successful fuzzy logic-based
traffic control systems are at improving traffic flow and reducing congestion. A fuzzy
traffic controller for a four-way intersection is the focus of the second study, while
adaptive signal timing based on dynamic input conditions is the subject of the first
evaluation. Both approaches demonstrate promising results in simulation environments,
providing valuable insights for the development of intelligent traffic control systems.
Further research is suggested to optimize fuzzy parameters and look at real-world uses
for these systems.
The System:
My system uses MATLAB to define a fuzzy logic-based traffic signal control system
using a Mamdani fuzzy inference system. The system has taken 3 main input variables
namely Traffic volume, Time of day and Lane occupancy which generates an output
that is Signal timing. Traffic volume is categorized into Low, Moderate and High that
represents various traffic densities. Time of day is categorized into Morning, Afternoon
and Evening and Lane occupancy is Low, Moderate and High. The fuzzy rules are short
signal timings during low traffic volume in the morning which is a right decision-making
process. The rules aim to adapt the traffic signals dynamically to various situations of
traffic. The MATLAB code includes a visual representation of fuzzy sets for each input
and output variable. This graphical representation helps in understanding the fuzzy
system deeply. These 3 inputs will help us to give the final output, that is Signal timing.
We can see the inputs and outputs in Figure 7.
Figure 6 shows the graphical representation of the membership functions for the fuzzy
logic sets. There are 4 separate graphs each representing the membership functions.
These membership functions are used in fuzzy logic system to determine the degree to
8
which an input value belongs to each fuzzy set. This information is used then with a set
of fuzzy rules to make decisions and provide outputs based on the inputs provided.
The second input is Time of day, and this variable has 3 membership functions. These
are Morning, Afternoon and Evening. I used gaussmf for all the input variables. As the
variable’s morning, Afternoon and evening correspond to specific time intervals, the
gaussian function can efficiently represent the smooth transition between these
intervals. Figure 9 shows all the values I added in the input time of day.
The output variable is signal timing. It represents the duration for which the traffic signal
will be active. The range for signal timing is from 0 to 30 seconds.
I used trapmf for the short variable and long variable and I used trimf for the medium
variable.
Rules:
The traffic signal control system’s 6 preset rules can be seen in Figure 12.The rules are
based on real world traffic scenarios where the traffic circumstances change throughout
the day. In the rules I have prescribed for light morning traffic a short signal time and for
balanced afternoon traffic a medium signal time and for the evening congestion a
lengthy traffic signal time. This rule provides an efficient approach to signal
management by addressing the morning patterns and suggesting longer timings in
evening to clear intersections.
In the testing process of my fuzzy system, I began testing each of the rules I set for it.
Both the surface viewer and rules viewer help us enhance our understanding of the
fuzzy logic system by providing graphical representation of rules and output services.
Figure 13 is the fuzzy inference system. It uses fuzzy logic to determine the signal
timing from the given input data. The fuzzy inference system, also called FIS works by
first fuzzifying the input variables. FIS defines the degree of membership and the
membership functions used are trapezoidal, triangular and gaussian. After the input
variables have been fuzzified the FIS acts on the fuzzy rules provided. The fuzzy rules
define the relation between the input and output. After that the FIS defuzzifies the output
variable.
Figure 14 is a graph of the output of the FIS. The graph shows the output of the FIS for
a range of input values. The x-axis of the graph represents the traffic volume, and the y-
axis of the graph represents the time of the day, and the z-axis represents the signal
timing. The color of the surface shows the degree of membership in the medium
membership function for signal timing variable.
12
The graph shows FIS outputs of signal timing of medium for a wide range of the inputs
because the medium membership function for the signal timing variables is broad.
Overall, the FIS in this situation is more flexible and provides robustness to the old FIS
systems. This FIS adjusts the signal timing more precisely to match the traffic conditions
which in turn leads to better traffic flow and reduced congestion. Also, this FIS is more
robust to uncertainty than the traditional rule-based systems.
Critical Reflection:
I have gained a lot of knowledge from doing this project about the traffic signal control
system using fuzzy integrating system (FIS). The following critical reflections are my key
observations and analysis:
2) Performance measurements
13
A part of the assignment where I could have done better is to provide more inputs for
the fuzzy inference system. It would have helped in getting more accurate results. The 3
inputs which I have provided talk on traffic and time. Though I could have added in key
inputs such as weather conditions and pedestrian’s count.
The testing phase of my project was conducted with a focus on dynamic and
robustness. Given the dynamic nature of traffic situations, I adjusted the inputs in such a
way to explore a wide range of possible traffic conditions and analyze the output. The
3D graph was a great way to visually provide the results.
Conclusion:
In conclusion I think my system has worked perfectly and it has fulfilled the goals. The
goal was to create a fuzzy logic-based traffic signal system that considers various traffic
situations such as traffic volume, lane occupancy and time of day to determine an
appropriate signal timing. The visualization through subplots and the fuzzifications
shows the working of the system.
I could have done better by reading 2 more articles based on the same topic and
providing some more input to gain accurate results. In conclusion the provided system
lays a groundwork for fuzzy logic-based traffic signal control systems and also shows its
potential in addressing the uncertainty in traffic management. Further development and
refinement of the project will make it more robust and efficient.
Bibliography:
14
Jafari, S., Shahbazi, Z. and Byun, Y.-C. (2021) Traffic control prediction design based
on fuzzy logic and Lyapunov approaches to improve the performance of road
intersection, MDPI. Available at: https://www.mdpi.com/2227-9717/9/12/2205/htm
(Accessed: 10 December 2023).
Fuzzy Traffic Control System (no date) PDF Free Download. Available at:
https://docplayer.net/38399459-Fuzzy-traffic-control-system.html (Accessed: 10
December 2023).