Presentation is loading. Please wait.

Presentation is loading. Please wait.

Abstract: This paper describes a real life application of fuzzy logic: A Fuzzy Traffic Light Controller. The controller changes the cycle time of the light.

Similar presentations


Presentation on theme: "Abstract: This paper describes a real life application of fuzzy logic: A Fuzzy Traffic Light Controller. The controller changes the cycle time of the light."— Presentation transcript:

1 Abstract: This paper describes a real life application of fuzzy logic: A Fuzzy Traffic Light Controller. The controller changes the cycle time of the light depending upon the accumulation of cars behind the green and red lights and the current cycle time. A fuzzy model is being built and tested to predict the behavior of the model under different traffic conditions.

2 Fuzzy logic emerged into the mainstream of information technology in the late 1980’s and early 1990’s. Fuzzy logic is an extension of classical Boolean logic. It implements logic on the continuous range of truth-values [0,1]. Since fuzzy logic can handle approximate information in a systematic way, it is ideal for controlling nonlinear systems and for modeling complex systems where an inexact model exists or systems where vagueness is common. A typical fuzzy system consists of a fuzzy rule base, membership functions and an inference mechanism. Fuzzy logic emerged into the mainstream of information technology in the late 1980’s and early 1990’s. Fuzzy logic is an extension of classical Boolean logic. It implements logic on the continuous range of truth-values [0,1]. Since fuzzy logic can handle approximate information in a systematic way, it is ideal for controlling nonlinear systems and for modeling complex systems where an inexact model exists or systems where vagueness is common. A typical fuzzy system consists of a fuzzy rule base, membership functions and an inference mechanism.

3 Some of the major applications of fuzzy logic to expert system development include its use to: Some of the major applications of fuzzy logic to expert system development include its use to: Control trains in Japan using fuzzy controllers (Miyamoto, Yasunobu) Control trains in Japan using fuzzy controllers (Miyamoto, Yasunobu) Cement kiln controller (Mamdani, Gaines) Cement kiln controller (Mamdani, Gaines) Z-II is a fuzzy ES shell used in medical diagnosis and risk analysis Z-II is a fuzzy ES shell used in medical diagnosis and risk analysis Video camera technology for automatic focusing, automatic exposure, image stabilization and white balancing Video camera technology for automatic focusing, automatic exposure, image stabilization and white balancing Automobiles in cruise control, brake and fuel injection system Automobiles in cruise control, brake and fuel injection system Video and audio data compression Video and audio data compression Stock exchange activities (Yamaichi, Hitachi) Stock exchange activities (Yamaichi, Hitachi) Prevention of unwanted temperature fluctuations in air- conditioning systems (Sharp, Mitsubishi ) Prevention of unwanted temperature fluctuations in air- conditioning systems (Sharp, Mitsubishi )

4 It is very easy to extend Boolean logic into multi- valued logic. The first extension is trinary logic. In trinary logic there are three values instead of two: True (1), false (0), and ‘I don’t know’ (1/2). The truth tables for the logic operators in trinary logic are represented as follows:

5 AB A and B A or B 0000 01/201/2 0101 1/2001/2 1/21/21/21/2 1/211/21 1001 11/21/21 1111

6 Lucaziewitz proposed that trinary logic can be extended from three values to n values, where n can be any natural number. Professor Zadeh, University of California Berkley, introduced the theory of fuzzy logic; where the truth value of a statement can be any real number from 0 to 1. Fuzzy sets are defined by a membership function. For example, consider the fuzzy set ”young”. The certainty on how “young” somebody is depends on his age. The smaller his numeric age in years, the younger he will be. Lucaziewitz proposed that trinary logic can be extended from three values to n values, where n can be any natural number. Professor Zadeh, University of California Berkley, introduced the theory of fuzzy logic; where the truth value of a statement can be any real number from 0 to 1. Fuzzy sets are defined by a membership function. For example, consider the fuzzy set ”young”. The certainty on how “young” somebody is depends on his age. The smaller his numeric age in years, the younger he will be.

7 The Boolean logic operators “and”, ”or”, “not”, and “implication” can be extended in the case of fuzzy logic. Young and Rich Age 30 years old  truth about being young is 0.7 based on the given membership function. Income is 1,000,000  truth about being rich is 0.99 based on the given membership function. Then the truth of the fuzzy set “young and rich” is minimum(0.7, 0.99) = 0.7. Young or Rich The truth of the fuzzy set “young or rich” is maximum (0.7, 0.99) = 0.99.

8 Operations on fuzzy sets: - There are many definitions for the operations of union, intersection, implies and Cartesian product. The most commonly used are:

9 To define fuzzy implication consider the rule : If “IQ is high THEN grades are high”. Given the rule A => B, where A and B are fuzzy sets the membership function of implication is: m A=>B (x,y) = max( 1-m A (x), m B (y)) To define fuzzy implication consider the rule : If “IQ is high THEN grades are high”. Given the rule A => B, where A and B are fuzzy sets the membership function of implication is: m A=>B (x,y) = max( 1-m A (x), m B (y))

10 For example, if the membership function for grades is m grades = high (x) = 1.0/A + 0.7/B + 0.3/C + 0.1/D + 0.0/F And f or high IQ is: m IQ = high (y) = 0.1/100 + 0.3/110 + 0.5/120 + 0.7/130 + 0.8/140 + 0.9/150 then the membership function of implication is: Grades ABCDF 10010.9 11010.7 12010.70.5 13010.70.3 14010.70.30.2 15010.70.30.1 IQ

11 Given the rule: If IQ is high Then grade is high and a student with IQ = 150 who has grade = A, by the previous table m rule (150,A) = 1. This is an example of perfect agreement with the rule. But if the student has IQ = 150 and grade = F, Then by the same table: m rule (150,F) = 0.1. This is close to 0, so this student tends to be contradictory to the rule.

12 N W E S D D D N1 N2 S2 S1 W1 W2 E2 E1

13 In this application, the street structure is the same for all the directions which makes us to assume that the distance value ‘D’ is same for all the lanes and the red light is being shown to both the north and south direction at the same time and the green light in turn is being displayed to the east and west direction and when the green light is being displayed in the north-south direction, the red light is displayed in the east-west direction. The inputs of this model consist of: oCycle time oAccumulation Of Cars behind The Red Light oAccumulation Of Cars behind The Green Light Where Cycle time = Time passed since the last switching of lights Accumulation Of Cars behind The Red Light = number of cars behind red light on the more crowded side of the street. Accumulation Of Cars behind The Green Light = number of cars behind green light on the more crowded side of the street.

14 The cars behind the light are the maximum number of cars in both the directions when a North-South or East- West lane is being considered. o The corresponding output parameter is the probability of change of the current cycle time.

15 In this model the density of cars behind the red light has been divided into the following membership functions. Accumulation of cars Behind the Red Light: LABELRANGE Very minimal[0,1] Scarce[0,5] Moderate[4,9] Heavy[7,15] Uncontrolled[14,20] Accumulation of cars Behind the Green Light: LABELRANGE Very minimal[0,1] Scarce[0,3] Moderate[2,7] Heavy[6,14] Uncontrolled[13,20] Cycle Time: LABELRANGE Short[0,15] Moderate[12,30] Long[27,50] Very long[48,60]

16 The output function, which is the probability of change of the current cycle time, is divided into the following singleton membership functions. (i.e., in the output one value is assigned instead of a range of values) The output function, which is the probability of change of the current cycle time, is divided into the following singleton membership functions. (i.e., in the output one value is assigned instead of a range of values) Change ProbabilitySingleton Position No0 No0 Probably no0.25 Probably no0.25 Maybe0.50 Maybe0.50 Probably yes0.75 Probably yes0.75 Yes1.0 Yes1.0

17 Rules are formulated using a series of if-then statements, combined with AND/OR operators, and give output as one of the output membership functions. A few of the rules for cycle time short, moderate, long and very long are given below. If traffic accumulation behind red is very minimal then change is NO. If traffic accumulation behind red is very minimal then change is NO. If traffic accumulation behind red is very minimal and green is very minimal and cycle time is short then change is NO. If traffic accumulation behind red is very minimal and green is very minimal and cycle time is short then change is NO. If traffic accumulation behind red is high and green is scarce and cycle time is moderate then change is YES. If traffic accumulation behind red is high and green is scarce and cycle time is moderate then change is YES. If traffic accumulation behind red is moderate and green is moderate and cycle time is long then change is PROBABLY YES If traffic accumulation behind red is moderate and green is moderate and cycle time is long then change is PROBABLY YES If traffic accumulation behind red is moderate and green is uncontrolled and cycle time is very long then change is MAYBE If traffic accumulation behind red is moderate and green is uncontrolled and cycle time is very long then change is MAYBE If traffic accumulation behind red is scarce and green is moderate and cycle time is moderate then change is PROBABLY NO If traffic accumulation behind red is scarce and green is moderate and cycle time is moderate then change is PROBABLY NO There is a total of 100 fuzzy rules in the system.

18 Case 1: Traffic accumulation behind red = 3 (scarce) Traffic accumulation behind red = 3 (scarce) Traffic accumulation behind green = 4 (moderate) Traffic accumulation behind green = 4 (moderate) Cycle Time = 7(short) Cycle Time = 7(short)

19 M A1…An  B (X,Y) = max(1,0) = 1 M B’ (Y) = max(min(1,1,1),1) = 1 So the resultant is Yes with probability 1.


Download ppt "Abstract: This paper describes a real life application of fuzzy logic: A Fuzzy Traffic Light Controller. The controller changes the cycle time of the light."

Similar presentations


Ads by Google