0% found this document useful (0 votes)
137 views10 pages

Designing of Fuzzy Controller

By Agha Shakir

Uploaded by

Suraj K Essrani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
137 views10 pages

Designing of Fuzzy Controller

By Agha Shakir

Uploaded by

Suraj K Essrani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 10
Designing Fuzzy Controller — Step by Step Guide Designing fuzzy controller requires knowledge of fuzzy inference systems such as Mamdani approach of Takagi-Sugeno approach. Fuzzy logic controllers are based on fuzzy logic. Most of the embedded devices are nowadays implements one or other kind of FLC, for example air conditioner, washing machine, traffic light controller, flight navigation system and many more. Following steps should be followed to for designing fuzzy controller: + Identification of variables: Input, output and state variables must be identified of the plant + Fuzzy subset configuration: The universe of information spanned by each variable is divided into number of fuzzy subsets and each subset is assigned a linguistic variable * Obtaining membership function: Obtain membership function for each fuzzy subset + Fuzzy Rule Base Configuration: Formulate fuzzy rule base by assigning relationship between fuzzy input and output + Normalizing and scaling factors: Appropriate scaling factors for input and output variables must be chosen to normalize variables between 10, 1 and [-1, 1] intervals * Fuzzification: The Fuzzification process is done in this step with the help of Fuzzifier + Identification of output: Identify the output from each rule using fuzzy approximate reasoning and combine the fuzzy output obtained from each rule * Defuzzification: Initiate Defuzzification process to form crisp output Let us try to understand this with an example: Example: Consider the design of a fuzzy controller for a steam turbine. Assume the input of the fuzzy controller as temperature and pressure. The output will be the throttle setting of a steam turbine. Use 3 descriptors for input and 5 descriptors for output variables. Derive the set of rules for controller action and get the defuzzified values. Assume that the current temperature is 30% and pressure is 40% and we have to determine the throttle position of the turbine for this particular condition Solution: Step 1: Identification of variables « Inputs: Temperature and pressure + Output: Throttle setting of steam turbine Step 2: Fuzzy subset configuration Assign a linguistic descriptor for each fuzzy subset + Temperature: Cool, Nominal, Warm * Pressure: Low, Ok, Strong + Throttle Setting: No: Large Negative Na: Small Negative Z: Zero P: Small Positive Pp: Large Positive Step 3: Obtain Membership Function Define membership functions for descriptors (lemperature) The fuzzy membership function for temperature is depicted in following figure: Cool Nominal = Warm 0 20 40 From similar triangle rule we know that, (¥2 ~ ys) f Oa ~ x1) = (Y ~ ya) ~ x3) For fuzzy set COOL: [0, 20] > (0 - )/ (20 - 0 ~ D/%-0) cost = (20 - x) / 20 For fuzzy set NOMINAL: {0, 20] > (1 - 0) / (20 - 0) = (y- 0)/&-0) = wx; /20 [20, 40] = (0 - 1)/ (40 - 20) = ty - 1)/& - 20) = w= (40 -x))/20 Combining both in single equation, xp _| am (20) Hrominal =) 40 — xp 20 [20,40] For fuzzy set WARM: 120, 401 > 1 - 0) / 40 ~ 20) = ty ~ 0 / & ~ 20) Buarm = 0% ~ 20) / 20 Define membership functions for descriptors (Pressure) The fuzzy membership function for pressure is depicted in following figure: 0 50 100 Fuzzy membership function for pressure For fuzzy set LOW: 10, 50] > (0 ~ 1) / (60-0) = (y~ 1)/- 0) Blow = (50 - xp) /S0 For fuzzy set OK: 10, 50] > (1 ~ 0) / (GO - 0) = (y~0)/«~ 0) > B= xp /50 150, 100] = (0 ~ 1) / (100 - 50) = ty - 1)/ & - 500) = p= (400 - xp) / 50 Combining both in single equation, Xp oe =4 4932 [0,50] =) 100—xp so (50,100) For fuzzy set STRONG: 50, 100] > (1 - 0) / (100 ~ 50) = ty - 0) / & - 50) Bsirong = %p ~ 50)/ 50 Define membership functions for descriptors (Rotation) In similar way, we can compute the membership function for rotation, as shown below: 90 + x. [-90, -45] Ny, = tS ge bso 454%, tN, = a5 [-90, -45] (45,90) Be (45,0) Hem | 45 ~ x5 ast 4s] Step 4: Fuzzy rule base configuration As we assumed, this controller has 3 fuzzy sub sets for temperature and 3 fuzzy subsets for pressure. So rule base will contain 3x 3 i.e. 9 rules. The rule base for given inputs and fuzzy sub sets is depicted in following table: U4 BN CUT Cool P2 z N2 Nominal P2 Z Ml Warm Pl N2 NI Rule base for the system Step 6: Fuzzification Cool Nominal — Warm 0 20 40 Membership of 30% temperature in corresponding fuzzy sets 0 50 100 Membership of 40% temperature in corresponding fuzzy sets 30 % of temperature: xy = (40 + 30) / 100 = 12 Hoo! = (20 - xp) / 20 = 20 - 12) /20 =8/20=2/5 Hyominal = Xr/ 20 = 12 | 20 = 3/5 40 % of pressure: Xp = (100 + 40)/ 100 = 40 Hiow = (50 ~ xp) / 50 = (50 - 40)/ 50 = 10/50-1/5 Hox = Xp / 50 = 40/50 = 4/5 Fired rules and the rule base for them is shown here: | | Temperature | Pressure Rule! Cool(2/5) Low (v5) Rule 2 Cool (2/5) Ok (/5} Rule3— Nominal(3/5) Low (V5) Rule 4 Nominal(3/5) Ok (4/5) Fired rules oy es Cool P2 z N2 Nominal P2 z NI Warm Pl W2 NI Rule base of fired rules Step 7: Identification of output From rule base of fired rules, we can derive following rules, 1. Rule 1: If temperature is coo/ and pressure is /ow, then throttle setting is P2 2, Rule 2: if temperature is coo/ and pressure is ok, then throttle setting isZ 2. Rule 3: if temperature is nomina/and pressure is fow then throttle setting is P2 4, Rule 4: |f temperature is nominal and pressure is ok, then throttle setting isZ 'eat Nerina x ‘ot Noni Warn Step 8: Defuzzification Firing strength of each rule is highlighted in different colars in above figures. To compute the corresponding crisp value, we shall ageregate all output functions by placing them on same axis. 45 0 45 90 Xs Aggregated output function We can apply any defuzzification method on above aggregated output function to find the crisp value. Let us apply weighted average method. 3 1 My = 5 ber FS 1 = 0,2 = 67.937 Xibtxst¥abrs yt x0) +(2 x 67.937) 0+ 67.937 = 16.984° Thus, for 40% of temperature (x; = 12) and 30% of pressure (xp = 30), we shall rotate the throttle by 16.984°.

You might also like