Fuzzy Control Systems Outline Fuzzy control system Fuzzy

  • Slides: 44
Download presentation
Fuzzy Control Systems

Fuzzy Control Systems

Outline • Fuzzy control system • Fuzzy Inference Systems • Defuzzification method • Mamdani

Outline • Fuzzy control system • Fuzzy Inference Systems • Defuzzification method • Mamdani fuzzy model • Sugeno fuzzy model • Tsukamoto fuzzy model 2

解模糊化的方法 2. 最大平均法 (mean of maxima defuzzifier) 其中 3. 修正型最大平均法 (modified mean of maxima

解模糊化的方法 2. 最大平均法 (mean of maxima defuzzifier) 其中 3. 修正型最大平均法 (modified mean of maxima defuzzifier) 其中 4. 中心平均法 (modified center average defuzzifier) 7

Fuzzy Inference System (FIS) • A computing framework based on the concepts of fuzzy

Fuzzy Inference System (FIS) • A computing framework based on the concepts of fuzzy set theory, fuzzy if-then rule, fuzzy reasoning • Fuzzy Inference System also called as: Fuzzy Rule_Based System, Fuzzy Expert System, Fuzzy Model, Fuzzy Associative Memory, Fuzzy Logic Controller, Fuzzy System 14

Three Types of Fuzzy inference system • Mamdani fuzzy model • Sugeno fuzzy model

Three Types of Fuzzy inference system • Mamdani fuzzy model • Sugeno fuzzy model • Tsukamoto fuzzy model 15

Mamdani Fuzzy Models • Attempt to control a steam engine and boiler combination by

Mamdani Fuzzy Models • Attempt to control a steam engine and boiler combination by a set of linguistic control rules obtained from human operators. Use max-algebraic product for T-conorm/T-norm and max-product composition The overall output: defuzzification 2 FISs: • a controller to generate the heat input to the boiler to regulate the steam pressure in the boiler • a controller of 節流閥opening of the engine cylinder to 控制 the speed of the engine • E. H. Mamdani and S. Assilian. An experiment in linguistic synthesis with a fuzzy logic controller. International Journal of Man-Machine Studies, 7(1): 1 -13, 1975. 16

Mamdani’s Fuzzy Models 17 max-min max-algebraic product T-conorm/norm

Mamdani’s Fuzzy Models 17 max-min max-algebraic product T-conorm/norm

Mamdani Fuzzy Models Defuzzification: • • a method to extract a representative crisp value

Mamdani Fuzzy Models Defuzzification: • • a method to extract a representative crisp value from a fuzzy set. defuzzification of a fuzzy set A of a universe of disourse Z: A(z): the aggregated output MF. • Centroid of area z. COA : expected values of prob. Distribution. z. COA =∫Z A(z) z dz / ∫Z A(z) dz • Bisector of area z. BOA : the vertical line z=z. BOA partitions the region b/t {z= , y=0, y= A(z)} into 2 regions with the same area. ∫ z. BOA A(z) dz = ∫ z. BOA A(z) dz where = min {z| z Z}, = max {z| z Z} • Mean of maximum z. MOM : z. MOM =∫Z z dz / ∫Z dz average of the maximizing z at which MF reach a maximum * where Z = {z| A(z)= * } • Smallest of maximum z. SOM : the minimum of the maximizing z • Largest of maximum z. LOM 18 : the maximum of the maximizing z

Mamdani Fuzzy Models • Centroid of area z. COA =∫ Z A(z) z dz

Mamdani Fuzzy Models • Centroid of area z. COA =∫ Z A(z) z dz / ∫Z A(z) dz • Bisector of area z. BOA ∫ z. BOA (z) dz = ∫ A z. BOA A(z) dz • Mean of maximum z. MOM =∫Z z dz / ∫Z dz • Smallest of maximum z. SOM • Largest of maximum z. LOM 19

Example: Mamdani’s Fuzzy Model • Single-input single-output Mamdani fuzzy model If X is small

Example: Mamdani’s Fuzzy Model • Single-input single-output Mamdani fuzzy model If X is small If X is medium If X is large 20 then Y is small. then Y is medium. then Y is large.

Example: Mamdani’s Fuzzy Model • Two-input single-output Mamdani fuzzy model If X is small

Example: Mamdani’s Fuzzy Model • Two-input single-output Mamdani fuzzy model If X is small and Y is small then Z is negative large. If X is small and Y is large then Z is negative small If X is large and Y is small then Z is positive small. If X is large and Y is large then Z is positive large. 21

Variants • AND operator (T-norm): for calculating the firing strength of a rule with

Variants • AND operator (T-norm): for calculating the firing strength of a rule with AND’ed antecedents • OR operator (T-conorm): the calculating the firing strength of a rule with OR’ed antecedents • Implication operator for calculating qualified consequent MFs based on given firing strength • Aggregation operator for aggregating qualified consequent MFs to generate an overall output MF. • Defuzzification operator for transforming an output MF to a crisp single output value. • Sum-product composition (aggregation – implication operator) The final crisp output via centroid defuzzification 22 = the weighted average of the centroids of consequent MFS, where the weighting factor for each rule = its firing strength the area of the consequent MF.

Theorem: Computation Shortcut for Mamdani Fuzzy Inference Systems Under sum-product composition, the output of

Theorem: Computation Shortcut for Mamdani Fuzzy Inference Systems Under sum-product composition, the output of a Mamdani FIS with centroid defuzzification = the weighted average of the centroids of consequent MFS, where each of the weighting factors = firing strength the consequent MF’s area. (wi ai) Pf) 23 Use product for implication, and sum for aggregation operator. Then, C (z) = w 1 C 1 (z) + w 2 C 2 (z) The crisp output under centroid defuzzification is

Sugeno Fuzzy Models (TSK model) • Takagi, Sugeno and Kang • a systematic approach

Sugeno Fuzzy Models (TSK model) • Takagi, Sugeno and Kang • a systematic approach to generate fuzzy rules from a given input/output data set. • if x is A and y is B then z = f(x, y) • z=f(x, y) : a crisp function in the consequent. • f(x, y) : a polynomial fn; but it can be any fn. - 1 st-order Sugeno fuzzy model: f(x, y) is a 1 st order polynomial. - Zero-order Sugeno fuzzy model: f(x, y) is a constant – A special case of Mamdani model, in which each rule’s consequent is specified by a fuzzy single (or a pre-defuzzified consequent) – A special case of Tsukamoto fuzzy model, in which each rule’s consequent is specified by an MF of a step function center at the constant. – Functionally, equivalent to a Radial Basis Function network under certain minor constraints (Chap. 12) • The overall output: 24 • weighted average z = (w 1 z 1+w 2 z 2) / (w 1+w 2) -- no defuzzification. Or • weighted sum z = w 1 z 1+w 2 z 2 -- the loss of MF linguistic meanings unless I wi 1.

Sugeno Fuzzy Models (TSK model) • don’t strictly follow Compositional Rule of Inference, but

Sugeno Fuzzy Models (TSK model) • don’t strictly follow Compositional Rule of Inference, but still employ the matching of fuzzy sets in the antecedent part. • Most popular candidate for sample-data-based fuzzy modeling, w/o defuzzification. • M. Sugeno and G. T. Kang. Structure identification of fuzzy model. Fuzzy Sets and Systems, 28: 15 -33, 1988 • T. Takagi and M. Sugeno. Fuzzy identification of systems and its applications to modeling and control. IEEE Transactions on Systems, Man, and Cybernetics, 15: 116 -132, 1985. 25

Sugeno Fuzzy Models (TSK model) 26

Sugeno Fuzzy Models (TSK model) 26

Example: Sugeno Fuzzy Models • Comparison of Fuzzy and Nonfuzzy Rules Set If X

Example: Sugeno Fuzzy Models • Comparison of Fuzzy and Nonfuzzy Rules Set If X is small If X is medium If X is large 27 then Y = 0. 1 X + 6. 4 then Y = - 0. 5 X + 4 then Y = X – 2. Antecedent MFs vs. Input-output curve

Example: Sugeno Fuzzy Model • Two-input single-output Sugeno fuzzy model If X is small

Example: Sugeno Fuzzy Model • Two-input single-output Sugeno fuzzy model If X is small and Y is small then z=-x+y+1. If X is small and Y is large then z=-y+3. If X is large and Y is small then z=-x+3. If X is large and Y is large then z=x+y+2. 28 Antecedent/consequent MF Overall input-output surface

Tsukamoto Fuzzy Model • the consequent of each fuzzy if-then rule: a fuzzy set

Tsukamoto Fuzzy Model • the consequent of each fuzzy if-then rule: a fuzzy set with a monotonical MF. • Overall output: the weighted average of each rule’s output. • No defuzzification. • Not as transparent as mamdani’s or Sugeno’s fuzzy model. • Not follow strictly the compositional rule of inference: the output is always crisp. 29

Example: Tsukamoto Fuzzy Model • Single-input Tsukamoto fuzzy model 30 If X is small

Example: Tsukamoto Fuzzy Model • Single-input Tsukamoto fuzzy model 30 If X is small then Y is C 1. If X is medium If X is large then Y is C 2. then Y is C 3.

Other Consideration Common Issues concerning 3 FISs: • How to partition an input space?

Other Consideration Common Issues concerning 3 FISs: • How to partition an input space? • How to construct a FIS for a particular application? In 3 FISs, the same Antecedent in 3 FISs - defines a local fuzzy region vs. different Consequent (MF, a constant, a polynomial) – describes the behavior within the region Methods of partitioning input spaces: • to form the antecedents - applicable to all 3 types of FISs • Grid partition • Tree partition • Scatter partition 31

Input Space Partitioning • Grid partition: • Often chosen in a fuzzy controller which

Input Space Partitioning • Grid partition: • Often chosen in a fuzzy controller which involves only several state variables as the inputs • Needs only a small # of MFSs for each input. • For large # of inputs? - exponential # of rules. -- curse of dimensionality. • Tree partition • Each region can be uniquely specified along a corresponding decision tree. – relieves an exponential increase in # of rules. • Scatter partition • Limit the # of rules to a reasonable amount by covering a subset of the whole input space which characterizes a region of possible occurrence of the input vectors. • Dictated by desired i-o data pairs, thus orthogonality doesn’t hold in X, Y, or X Y. 32

Fuzzy Modeling • A process for constructing a FIS • Features: • The rule

Fuzzy Modeling • A process for constructing a FIS • Features: • The rule structure of FIS makes it easy to incorporate human expertise a/t the target system directly into the modeling process – take advantage of domain knowledge • When the input/output data of a target system is available, conventional system identification techniques can be used. – the important role of the use of numerical data in fuzzy modeling. • A process for constructing a FIS • 1. identification of the surface structure: - Obtain rule base which describe the behavior of the target system b. m. o. linguistic terms. • 2. identification of deep structure: - Determine the MFs of each linguistic term. 33

Fuzzy Modeling A process for constructing a FIS: 1. identification of the surface structure:

Fuzzy Modeling A process for constructing a FIS: 1. identification of the surface structure: 1. 2. 3. 4. 34 Obtain rule base which describe the behavior of the target system b. m. o. linguistic terms. Rely on the knowledge of the target system whose information provided by human experts or trial & error. Select relevant input-output variables. Choose a specific type of FIS. Determine the number of linguistic terms associated with each inputoutput variables (and the order of consequent equation for Sugeno’s model). Design a collection of fuzzy if-then rules.

Fuzzy Modeling A process for constructing a FIS: 2. identification of deep structure: -

Fuzzy Modeling A process for constructing a FIS: 2. identification of deep structure: - Meaning of the linguistic terms are determined by the MFs of each linguistic term (and the coefficients of each rule’s output polynomial in Sugeno’s model). 1. Choose an appropriate family of parameterized MFs. 2. Interview human experts familiar with the target systems to determine the parameters of the MFs used in the RB. 3. Refine the parameters of the MFs using regression and optimization techniques. -- the desired input-output data set is assumed. 35

倒單擺的模糊控制 語言變數: 夾角angle Θ 角速度ΔΘ 施力y 五個模糊集合: (1) positive medium (PM); (2) positive small(PS);

倒單擺的模糊控制 語言變數: 夾角angle Θ 角速度ΔΘ 施力y 五個模糊集合: (1) positive medium (PM); (2) positive small(PS); (3) zero (ZE); (4) negative small (NS); (5) negative medium (NM) 37

每一語言變數的模糊集合 N 3: Large negative. N 2: Medium negative. N 1: Small negative. Z:

每一語言變數的模糊集合 N 3: Large negative. N 2: Medium negative. N 1: Small negative. Z: Zero. P 1: Small positive. P 2: Medium positive. P 3: Large positive. 41

應用模糊規則 rule 2: IF temperature IS cool AND pressure IS low, THEN throttle is

應用模糊規則 rule 2: IF temperature IS cool AND pressure IS low, THEN throttle is P 2. 42

應用模糊規則 rule 3: IF temperature IS cool AND pressure IS ok, THEN throttle is

應用模糊規則 rule 3: IF temperature IS cool AND pressure IS ok, THEN throttle is Z. 43