Вы находитесь на странице: 1из 19


Traffic congestion has become a serious problem in the urban districts. This is mainly due to the rapid increase in the number and the use of vehicles. Travel time, travel safety, environmental quality, and life quality are all adversely affected by traffic congestion. Many traffic control systems have been developed and installed to alleviate the problem with limited success. Traffic demands are still high and increasing. The main focus of this project is to introduce a versatile traffic flow model capable of making optimal traffic predictions. This model can be used to evaluate various traffic-light timing plans. More importantly, it provides a framework for implementing adaptive traffic signal controllers based on fuzzy logic technology.

This project simulates the control logic of experienced human traffic controllers such as police officers who supersede signal controls at over-saturated intersections during special events. Given real-time traffic information, the FLC controller decides on whether to extend or terminate the current green phase based on a set of fuzzy rules.



INTRODUCTION 1.1 GENERAL 1.2 OBJECTIVES 1.3 Types in traffic signal control


FUZZY SET AND FUZZY LOGIC 2.1Fuzzy Set 2.2 Fuzzy Logic


TERMINOLOGY AND NOTATION 3.1 Terminology 3.2 Notation

4. 5. 6.





Introduction to Expert System

An expert system is a computer system that emulates the decision-making ability of a human expert. Expert systems are designed to solve complex problems by reasoning about knowledge, like an expert, and not by following the procedure of a developer as is the case in conventional programming. The first expert systems were created in the 1970s and then proliferated in the 1980s. Expert systems were among the first truly successful forms of AI software. An expert system has a unique structure, different from traditional programs. It is divided into two parts, one fixed, independent of the expert system: the inference engine, and one variable: the knowledge base. To run an expert system, the engine reasons about the knowledge base like a human. In the 80's a third part appeared: a dialog interface to communicate with users. This ability to conduct a conversation with users was later called "conversational". A system which employs human expertise captured in a CBIS to solve problems which usually require human expertise. An expert system either supports or automates decision making in an area of which experts perform better than non experts. It is also known as "Expert Computing Systems", or "Knowledge Based Systems". Characteristics: Symbolic Logic An explicit knowledge base understandable to professionals of the field Ability to explain its conclusions that are meaningful to its user Recognizing problems Recognizing solutions Explaining the choice of solution Selecting applicable solutions Dealing with incomplete information Restructuring problems Reducing the need for research

Advantages: Expert system offers many advantages for users compared to traditional programs because it operates like a human brain Conversational For users conversational is the first quality of expert system because it allows to interact with the computer like with human. To enter data into the computer, traditional computing uses a specific human-machine interface: the data entry screen, a non-interactive medium. The data entry screen forces the user to adapt because he must prepare a dataset without necessarily understanding why. It usually requires him to follow a preliminary training before using software. Reliability The reliability of an expert system is the same as the reliability of a database, i.e. good, higher than that of a classical program. Scalability Evolving an expert system is to add, modify or delete rules. Since the rules are written in plain language, those to be removed or modified are easily identified. Preservation and improvement of knowledge Valuable knowledge can disappear with the death, resignation or retirement of an expert. Recorded in an expert system, it becomes eternal. To develop an expert system is to interview an expert and make him aware of his knowledge. In doing so, he reflects and enhances it. Disadvantages: The expert system has a major flaw which explains its low success although the principle has existed for 70 years: knowledge collection and interpretation into rules, the knowledge engineering. Most developers have no method to perform this task. They work "manually" what opens to many possibilities for errors. Expert knowledge is not well understood, there is a lack of rules, rules are contradictory, and some are poorly written and unusable. Worse, they most often use an engine unable to reasoning. Result: the expert system works badly and the project is abandoned. Correct development methodology can mitigate these problems. There exists software to interview the expert step by step which automatically write the rules and simultaneously run the expert system before his eyes, performing a consistency of the rules control. So expert and users can check the quality of the software before it is finished.

COMPONENTS OF EXPERT SYSTEMS: An Expert System is typically composed of at least three primary components: User Interface: The user interface is the means of communication between a user and the expert systems problem-solving processes. A good expert system is not very useful unless it has an effective interface. It has to be able to accept the queries or instructions in a form that the user enters and translate them into working instructions for the rest of the system. It also has to be able to translate the answers, produced by the system, into a form that the user can understand. Careful attention should be given to the screen design in order to make the expert System appear friendly to the user. The Knowledge Base: The knowledge base stores all the facts and rules about a particular problem domain. It makes these available to the inference engine in a form that it can use. The facts may be in the form of background information built into the system or facts that are input by the user during a consultation. The rules include both the production rules that apply to the domain of the expert system and the heuristics and rules-of-thumb that are provided by the domain expert in order to make the system find solutions more efficiently by taking short cuts. The Shell or Inference Engine: The inference engine is the program that locates the appropriate knowledge in the knowledge base, and infers new knowledge by applying logical processing and problem-solving strategies.

Fuzzy Logic:
A fuzzy expert system is an expert system that uses a collection of fuzzy membership functions and rules, instead of Boolean logic, to reason about data. The rules in a fuzzy expert system are usually of a form similar to the following: if x is low and y is high then z = medium where x and y are input variables (names for know data values), z is an output variable (a name for a data value to be computed), low is a membership function (fuzzy subset) defined on x, high is a membership function defined on y, and medium is a membership function defined on z. The antecedent (the rule's premise) describes to what degree the rule applies, while the conclusion (the rule's consequent) assigns a membership function to each of one or more output variables. Most tools for working with fuzzy expert systems allow more than one conclusion per rule. The set of rules in a fuzzy expert system is known as the rulebase or knowledge base. The general inference process proceeds in three (or four) steps. 1. Under FUZZIFICATION, the membership functions defined on the input variables are applied to their actual values, to determine the degree of truth for each rule premise. 2. Under INFERENCE, the truth value for the premise of each rule is computed, and applied to the conclusion part of each rule. This results in one fuzzy subset to be assigned to each output variable for each rule. Usually only MIN or PRODUCT are used as inference rules. In MIN inferencing, the output membership function is clipped off at a height corresponding to the rule premise's computed degree of truth (fuzzy logic AND). In PRODUCT inferencing, the output membership function is scaled by the rule premise's computed degree of truth. 3. Under COMPOSITION, all of the fuzzy subsets assigned to each output variable are combined together to form a single fuzzy subset for each output variable. Again, usually MAX or SUM are used. In MAX composition, the combined output fuzzy subset is constructed by taking the pointwise maximum over all of the fuzzy subsets assigned tovariable by the inference rule (fuzzy logic OR). In SUM composition, the combined output fuzzy subset is constructed by taking the pointwise sum over all of the fuzzy subsets assigned to the output variable by the inference rule.

4. Finally is the (optional) DEFUZZIFICATION, which is used when it is useful to convert the fuzzy output set to a crisp number.

What Can Fuzzy Logic Toolbox Software Do? You can create and edit fuzzy inference systems with Fuzzy Logic Toolbox software. You can create these systems using graphical tools or command-line functions, or you can generate them automatically using either clustering or adaptive neuro-fuzzy techniques. If you have access to Simulink software, you can easily test your fuzzy system in a block diagram simulation environment. The toolbox also lets you run your own stand-alone C programs directly. This is made possible by a stand-alone Fuzzy Inference Engine that reads the fuzzy systems saved from a MATLAB session. You can customize the stand-alone engine to build fuzzy inference into your own code. All provided code is ANSI compliant.

Because of the integrated nature of the MATLAB environment, you can create your own tools to customize the toolbox or harness it with another toolbox, such as the Control System Toolbox, Neural Network Toolbox, or Optimization Toolbox software. There are five primary GUI tools for building, editing, and observing fuzzy inference systems in the toolbox:

Fuzzy Inference System (FIS) Editor *

Membership Function Editor

Rule Editor *

Rule Viewer *

Surface Viewer

These GUIs are dynamically linked, in that changes you make to the FIS using one of them, can affect what you see on any of the other open GUIs. You can have any or all of them open for any given system.

FIS Editor

Rule Viewer

Surface Viewer

In addition to these five primary GUIs, the toolbox includes the graphical ANFIS Editor GUI, which is used for building and analyzing Sugeno-type adaptive neural fuzzy inference systems. The ANFIS Editor GUI is discussed in Sugeno-Type Fuzzy Inference.

The FIS Editor handles the high-level issues for the system: How many input and output variables? What are their names? Fuzzy Logic Toolbox software does not limit the number of inputs. However, the number of inputs may be limited by the available memory of your machine. If the number of inputs is too large, or the number of membership functions is too big, then it may also be difficult to analyze the FIS using the other GUI tools.

The Membership Function Editor is used to define the shapes of all the membership functions associated with each variable.

The Rule Editor is for editing the list of rules that defines the behavior of the system.

The Rule Viewer and the Surface Viewer are used for looking at, as opposed to editing, the FIS. They are strictly read-only tools. The Rule Viewer is a MATLAB technical computing environment based display of the fuzzy inference diagram shown at the end of the last section. Used as a diagnostic, it can show (for example) which rules are active, or how individual membership function shapes are influencing the results. The Surface Viewer is used to display the dependency of one of the outputs on any one or two of the inputsthat is, it generates and plots an output surface map for the system.

System Requirements
Product Requirements
Requires MATLAB

General System Requirements for

Windows Linux Mac

Product Version Availability

Fuzzy Logic Toolbox is available on the following platforms:

Operating System

Product Version

Linux (32-bit) Linux (64-bit) Mac OS X (Intel 64-bit) Windows (32-bit) Windows (64-bit)

2.2.14 2.2.14 2.2.14 2.2.14 2.2.14

MATLAB :Introduction
MATLAB is a high-level technical computing language and interactive environment for algorithm development, data visualization, data analysis, and numerical computation. Using MATLAB, you can solve technical computing problems faster than with traditional programming languages, such as C, C++, and Fortran. You can use MATLAB in a wide range of applications, including signal and image processing, communications, control design, test and measurement, financial modeling and analysis, and computational biology. Add-on toolboxes (collections of special-purpose MATLAB functions) extend the MATLAB environment to solve particular classes of problems in these application areas.

MATLAB provides a number of features for documenting and sharing your work. You can integrate your MATLAB code with other languages and applications, and distribute your MATLAB algorithms and applications.

Key Features

High-level language for technical computing Development environment for managing code, files, and data Interactive tools for iterative exploration, design, and problem solving Mathematical functions for linear algebra, statistics, Fourier analysis, filtering, optimization, and numerical integration 2-D and 3-D graphics functions for visualizing data Tools for building custom graphical user interfaces Functions for integrating MATLAB based algorithms with external applications and languages, such as C, C++, Fortran, Java, COM, and Microsoft Excel

The MATLAB Language:

The MATLAB language supports the vector and matrix operations that are fundamental to engineering and scientific problems. It enables fast development and execution. With the MATLAB language, you can program and develop algorithms faster than with traditional languages because you do not need to perform low-level administrative tasks, such as declaring variables, specifying data types, and allocating memory. In many cases, MATLAB eliminates the need for for loops. As a result, one line of MATLAB code can often replace several lines of C or C++ code. At the same time, MATLAB provides all the features of a traditional programming language, including arithmetic operators, flow control, data structures, data types, object-oriented programming (OOP), and debugging features.

Development Tools:MATLAB includes development tools that help you implement your algorithm efficiently. These include the following: MATLAB Editor - Provides standard editing and debugging features, such as setting breakpoints and single stepping

Code Analyzer - Checks your code for problems and recommends modifications to maximize performance and maintainability MATLAB Profiler - Records the time spent executing each line of code Directory Reports - Scan all the files in a directory and report on code efficiency, file differences, file dependencies, and code coverage

Analyzing and Accessing Data:

MATLAB supports the entire data analysis process, from acquiring data from external devices and databases, through preprocessing, visualization, and numerical analysis, to producing presentation-quality output.

Data Analysis
MATLAB provides interactive tools and command-line functions for data analysis operations, including:

Interpolating and decimating Extracting sections of data, scaling, and averaging Thresholding and smoothing Correlation, Fourier analysis, and filtering 1-D peak, valley, and zero finding Basic statistics and curve fitting Matrix analysis

Data Access
MATLAB is an efficient platform for accessing data from files, other applications, databases, and external devices. You can read data from popular file formats, such as Microsoft Excel; ASCII text or binary files; image, sound, and video files; and scientific files, such as HDF and HDF5. Low-level binary file I/O functions let you work with data files in any format. Additional functions let you read data from Web pages and XML.


The general structure of the present traffic control is shows in Fig. 1.

Fuzzy logic traffic lights control is an alternative to the present conventional traffic lights control which can be used for a wider array of traffic patterns at an intersection. A fuzzy logic controlled traffic light uses sensors that count cars instead of proximity sensors which only indicate the presence of cars. This provides the controller with traffic densities in the lanes and allows a better assessment of changing traffic patterns. The general structure of a fuzzy traffic lights control system is illustrated as in Fig. 2. There are two electromagnetic sensors placed on the road for each lane.

The first sensor behind each traffic light counts the number of cars passing the traffic lights, and the second sensor which is located behind the first sensor counts the number of cars coming to the intersection at distance D from the lights. The number of cars between the traffic lights is determined by the difference of the reading between the two sensors.

A basic fuzzy logic control (FLC) algorithm for full intersections with two-way streets and left-turn lanes was developed. The FLC strategy simulates the control logic of experienced humans such as police officers directing traffic who often replace signal

controls when intersections experience unusually heavy traffic volumes (e.g., during special events.) The FLC controller makes the decision whether to extend or terminate the current green phase based on a set of fuzzy rules and real-time traffic information. FLC was compared with pretimed and actuated control strategies using a typical intersection with varying traffic volume levels. Measures of effectiveness including delay, speed, % stops, time in queue, and throughput-to-demand ratio were examined. FLC showed substantial improvements over pretimed and actuated control strategies for all MOE except % stops under heavy traffic volumes. Overall, the simulation results indicated that FLC has the potential to improve operations at oversaturated intersections.

Похожие интересы