ECE 4951 - Spring 2010 Introduction to Intelligent Control Part 2 Prof. Marian S. Stachowicz Laboratory for Intelligent Systems ECE Department, University of Minnesota Duluth January 19-21, 2010
Human-in-the-loop Intelligent Control 2
Human controlling an inverted pendulum on a cart. Intelligent Control 3
Such heuristic information may come from an operator who has acted as a human-in-the-loop controller for a process. Intelligent Control 4
We ask this operator to write down a set of rules on how to control the process, then we incorporate these into a fuzzy controller that emulates the decision-making process of the human. Intelligent Control 5
Fuzzy controller architecture Intelligent Control 6
Four main components (1)The rule-base holds the knowledge, in the form of a set of rules, of how best to control the system. (2) The inference mechanism evaluates which control rules are relevant at the current time and then decides what the input to the plant should be. (3)The fuzzification interface simply modifies the inputs so that they can be interpreted and compared to the rules in the rule-base. (4) The defuzzification interface converts the conclusions reached by the inference mechanism in to the inputs to the plant. Intelligent Control 7
We should view the fuzzy controller as an artificial decision maker that operates in a closed-loop system in real time. It gathers plant output data y(t), compares it to the reference input r(t), and then decides what the plant input u(t) should be to ensure that the performance objectives will be met. Intelligent Control 8
Intelligent Control 9
Control surface Intelligent Control 10
As opposed to PID, lead-lag, and state feedback control where the focus is on modeling and the use of this model to construct a controller that is described by differential equations, in fuzzy control we focus on gaining an intuitive understanding of how to best control the process, then we load this information directly into the fuzzy controller. Intelligent Control 11
While differential equations are the language of conventional control, heuristics and rules about how to control the plant are the language of fuzzy control. Intelligent Control 12
Fuzzy control provides a user-friendly formalism for representing and implementing the ideas we have about how to achieve high-performance control. Intelligent Control 13
Fuzzy control Fuzzy control is a practical alternative for a variety of challenging control applications since it provides a convenient method for constructing nonlinear controllers via the use of heuristic information. Intelligent Control 14
Computing with Words Computing with Words (CW) is a methodology in which words are used in place of numbers for computing and reasoning. Intelligent Control 15
Computing with Words CW is a necessity when the available information is too imprecise to justify the use of numbers. When there is tolerance for imprecision which can be exploited to achieve tractability, robustness, low solution cost, and better rapport with reality. Intelligent Control 16
A linguistic variable AGE T(AGE) = {YOUNG, NOT YOUNG, VERY YOUNG, NOT VERY YOUNG,, OLD, NOT OLD, VERY OLD, NOT VERY OLD,, NOT YOUNG AND NOT OLD, NOT MIDDLE AGED,, NOT OLD AND NOT MIDDLE AGED,, EXTREMELY OLD, } primary terms: YOUNG, OLD, the hedges : VERY, MORE OR LESS, QUITE, EXTREMELY, connectives : AND, OR, EITHER, NEITHER, negation : NOT Intelligent Control 17
Fuzzy variable and fuzzy values Fuzzy partitions formed by the linguistic values Young, Middle Aged, and Old : Intelligent Control 18
Context-dependency Linguistic concepts are not only predominantly vague, but their meanings are almost invariably context-dependent. Intelligent Control 19
Context-dependency For example, the meanings of young and old change when applied to different animal species, or when applied to stars in astronomy. Intelligent Control 20
A key aspect of CW is that it involves a fusion of natural languages and computation with linguistic variables. Intelligent Control 21
What are Fuzzy Sets?
Problem 1: Given the set U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, describe the set of prime numbers. A = {u in U u is a prime number} The elements of the set are defined unequivocally as: A = {2, 3, 5, 7, 11} Intelligent Control 23
Problem 2: Now using the same set U, suppose we want to describe the set of small numbers. M = {u in U u is a small number} Now, it is not so easy to define the set. We can use a sharp transition like the following, Intelligent Control 24
An alternative way to define the set would be to use a smooth transition. Intelligent Control 25
Intelligent Control 26
Fuzzy Sets Fuzzy set A defined in the universal space U is a function defined in U which assumes values in the range [ 0,1 ]. A : U [ 0, 1] Intelligent Control 27
Characteristic Function A : U {0, 1} Membership Function M : U [0, 1] Intelligent Control 28
Basic fields Fuzzy sets Fuzzy measures Fuzzy analysis Fuzzy relations Fuzzy arithmetic Fuzzy topology Fuzzy logic Intelligent Control 29
Applied fields Fuzzy neural network Fuzzy stability theory, Fuzzy pattern recognition, Fuzzy mathematical programming Intelligent Control 30
Fuzzy Sets Analog fuzzy sets A : U [ 0, 1] Discrete fuzzy sets A :{u1,u2,u3,...,us} [ 0, 1] Digital fuzzy sets A : {u1,u2,u3,...,us } {0, 1/n-1, 2/n-1, 3/n-1,..., n-2/n-1, 1} Intelligent Control 31
Analog fuzzy sets If a continuous-universal space membership function A can take on any value (the grade of membership) in the continuous interval [ 0, 1], then the continuous-universal space membership function A is called an analog fuzzy sets. A : U [ 0, 1] Intelligent Control 32
Example 1: Analog fuzzy sets Fuzzy set with continuous U. Let U = R + be the set of possible ages for teens. Then the fuzzy set A = " about 10 year old" may be expressed. Analog fuzzy set Intelligent Control 33
Discrete fuzzy sets A discrete-universal space membership function has a value (the grade of membership) only at discrete points in universal space and a discrete-universal space system operates on and produces discrete-universal space membership functions. A : {u1,u2,u3,...,us } [ 0, 1] Intelligent Control 34
Example 2: Discrete fuzzy sets (M.S.S.& M.K., 1982) Let U = {0, 20, 0.5} then the discrete fuzzy set A has a form : Intelligent Control 35
Digital fuzzy sets (M.S.& M.K., 1982) If a discrete-universal membership function can take only a finite number n 2 of distinct values, then we call this fuzzy set a digital fuzzy set. A : {u1,u2,...,us } {0, 1/n-1, 2/n-1,..., n-2/n-1, 1} Intelligent Control 36
Example 3: Digital fuzzy sets A digital fuzzy set A with discrete universal space and n = 4 levels has a form: Intelligent Control 37
ToDigital[FS1,4]; FuzzyPlot[FS1,LS1,ShowDots->True]; Intelligent Control 38
Digital Fuzzy Sets Intelligent Control 39
FS1 = FuzzyBell[50, 20, 4] Intelligent Control 40
FS2 = FuzzySigmoid[50,.2]; Intelligent Control 41
Fuzzy Sets for Mathematica Marian S. Stachowicz and Lance Beall Laboratory for Intelligent Systems Electrical and Computer Engineering Department University of Minnesota, Duluth, MN, USA http://www.wolfram.com/fuzzylogic http://www.d.umn.edu/ece/lis/ Intelligent Control 42
Operations on digital fuzzy sets Inclusion Equality Standard Complement Standard Union Standard Intersection Intelligent Control 43
Inclusion Let X and Y be fuzzy sets defined in the same universal space U. We say that the fuzzy set Yis included in the fuzzy set Xif and only if: for every u in the set U we have Y(u) X(u) Intelligent Control 44
Equality Let X and Y be fuzzy sets defined in the same universal space U. We say that sets X and Y are equal, which is denoted X = Y if and only if for all u in the set U, X(u) = Y(u). Intelligent Control 45
Standard complement Let X be fuzzy sets defined in the universal space U. We say that the fuzzy set Yis a complement of the fuzzy set X, if and only if, for all u in the set U, Y(u) = 1 -X(u). Intelligent Control 46
Standard union u U, (X Y)(u) = max(x(u), Y(u)) Intelligent Control 47
Standard intersection u U, (X Y)(u) = min(x(u), Y(u)) Intelligent Control 48
FuzzyPlot[FS1, FS2, ShowDots -> True]; Intelligent Control 49
FuzzyPlot[Union[FS1, FS2], Intersection[FS1, FS2], ShowDots -> True]; Intelligent Control 50
Operations on fuzzy values Middle Aged = NOT YoungAND NOT Old Intelligent Control 51
A FUZZY RELATION AS A SET OF PAIRS R = {{v,w}, R(v,w)}, for all v V w W {v, w} -is an element of the V W R(v,w) -is the value of the function R Intelligent Control 52
Examples of binary fuzzy relations x is close to y ( x and y are numbers), x depends on y ( x and y are events), x and y look alike ( x and y are persons, objects), If x is large, then y is small(x is an observed reading and y is a corresponding action). Intelligent Control 53
Digital Fuzzy Relation Levels = {0, 1/3, 2/3, 1} Intelligent Control 54
FuzzyPlot3D[Rel3,ShowDots->True]; Intelligent Control 55
FuzzySurfacePlot[Rel3]; Intelligent Control 56
Digital Fuzzy Relation SetOptions[FuzzySet,UniversalSpace->{0,9,1}]; Jan1=Jan2=DigitalSet[0,3,5,8,Levels->4]; Janrel=SetsToRelation[Min,Jan1,Jan2]; DensePlot[Janrel] Intelligent Control 57
Fuzzy Graph A fuzzy graph describes a mapping between an input linguistic variable and an output linguistic variable. A fuzzy graph serves as an approximation to a function, which is described in words as a collection of fuzzy if-then rules. Intelligent Control 58
Input = {Tiny, VerySmall, Small, Medium, Big, VeryBig, Huge} Intelligent Control 59
Out = {NB, NS, PS, PB} = CreateFuzzySets [4,Type -> Gaussian [4]] Intelligent Control 60
Fuzzy Graph. Rules={{Tiny, High}, {Very Small, Middle},,{Huge, High}} Intelligent Control 61
Fuzzy System Intelligent Control 62
A fuzzy logic control strategy to back a truck up to a loading dock. Intelligent Control 63
Inverted Pendulum Intelligent Control 64
Where Are Fuzzy Systems Used? Fuzzy washing machine Digital image stabilizer Fuzzy systems in cars Fuzzy control of a cement kiln Fuzzy control of subway train Intelligent Control 65
Digital image stabilizer. IF all the points in the picture are moving in the same direction, THEN the hand is shaking. IF only some points in the picture are moving, THEN the hand is not shaking. Intelligent Control 66
Matsushita Vacuum Dust sensors are used to adjust air-flow System is closed-loop Fuzzy rules are applied to reduce power consumption Example of rule: Ifthere is little dust, then reduce power. 3 Intelligent Control 67
Cannon Camera Screen is divided into 6 parts 2 Inputs per part 13 Rules 1.1 Kbytes of Memory Rules are used to bring the picture into focus using less memory that traditional methods. 4 Intelligent Control 68
Maytag Dishwasher Measures soil in water, adjusts wash accordingly Adjusts for dried-on foods Determines optimum wash cycle 6 Intelligent Control 69
Sony Palmtop Used directly for character recognition Each person writes letters slightly differently Fuzzy rules account for these differences 8 Intelligent Control 70
Professor Lotfi A. Zadeh & MSS 2009 IEEE International Conference on Systems, Nan, and Cybernetics SMC -2009, San Antonio, Texas, October 12, 2009 Intelligent Control 71
SMC 2009 Soft Computing For Biometric Applications Prof. Marian S. Stachowicz Laboratory for Intelligent Systems ECE Department, University of Minnesota, USA San Antonio, Texas, October 11, 2009
THANK YOU AND SEE YOU TOMORROW. Intelligent Control 73
ChopValueOption In[17]:=FS5=FuzzyGaussian[20, 3, UniversalSpace-> {0, 40, 1}] Out[17]= FuzzySet[{{0, 4.9891093927950183^-20}, {1, 3.8015944193905344^-18}, {2, 2.3195228302435696^-16}, {3, 1.1332393247975474^-14}, {4, 4.433377746328046^-13}, {5, 1.3887943864964021^-11}, {6, 3.4836240728956334^-10}, {7, 6.997045994265065^-9}, {8, 1.1253517471925912^-7}, {9, 1.449278887147761^-6}, {10, 0.000014945338524781451}, {11, 0.00012340980408667956}, {12, 0.0008159878350721483}, {13, 0.004320239474094066}, {14, 0.01831563888873418}, {15, 0.06217652402211632}, {16, 0.1690133154060661}, {17, 0.36787944117144233}, {18, 0.6411803884299546}, {19, 0.8948393168143698}, {20, 1.}, {21, 0.8948393168143698}, {22, 0.6411803884299546}, {23, 0.36787944117144233}, {24, 0.1690133154060661}, {25, 0.06217652402211632}, {26, 0.01831563888873418}, {27, 0.004320239474094066}, {28, 0.0008159878350721483}, {29, 0.00012340980408667956}, {30, 0.000014945338524781451}, {31, 1.449278887147761^-6}, {32, 1.1253517471925912^-7}, {33, 6.997045994265065^-9}, {34, 3.4836240728956334^-10}, { 35, 1.3887943864964021^-11}, {36, 4.433377746328046^-13}, {37, 1.1332393247975474^-14}, {38, 2.3195228302435696^-16}, { 39, 3.8015944193905344^-18}, {40, 4.9891093927950183^-20}}, UniversalSpace-> {0, 40, 1}] Intelligent Control 74
In[18]:=FS6=FuzzyGaussian[20,3,UniversalSpace -> {0,40,1},ChopValue -> 0.01] Out[18]=FuzzySet[{{14,0.0183156},{15,0.0621765},{16, 0.169013},{17, 0.367879},{18,0.64118},{19,0.894839},{20,1.},{21, 0.894839},{22,0.64118},{23,0.367879},{24,0.169013},{25, 0.0621765},{26,0.0183156}}, UniversalSpace-> {0, 40, 1}] Intelligent Control 75