0% found this document useful (0 votes)
51 views17 pages

Fuzzy Controller Design Guide

The document provides a step-by-step guide for designing a fuzzy controller, emphasizing the importance of fuzzy inference systems and the Mamdani approach. It outlines key steps including identification of variables, fuzzy subset configuration, obtaining membership functions, and creating a fuzzy rule base. An example involving a steam turbine is used to illustrate the process, detailing how to derive rules and perform defuzzification to achieve a crisp output.

Uploaded by

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

Fuzzy Controller Design Guide

The document provides a step-by-step guide for designing a fuzzy controller, emphasizing the importance of fuzzy inference systems and the Mamdani approach. It outlines key steps including identification of variables, fuzzy subset configuration, obtaining membership functions, and creating a fuzzy rule base. An example involving a steam turbine is used to illustrate the process, detailing how to derive rules and perform defuzzification to achieve a crisp output.

Uploaded by

Ashwin Dhoke
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

Home Courses Events



Join CodeCrucks
 
About
 

Designing Fuzzy Controller – Step


Introduction to Crisp Set

Categories
Crisp Set Operations

by Step Guide
Introduction to Fuzzy Set
Fuzzy Sets in Real World
 Algorithm (80)
Fuzzy Terminologies
Properties of Crisp Sets By codecrucks | August 22, 2021 | Categories: Fuzzy Logic | Tags: FLC, fuzzy
 Fuzzy Logic (31)
Properties of Fuzzy Sets logic controller | 2 Comments

Operations on Fuzzy Sets


Crisp Relations
Designing fuzzy controller requires knowledge of fuzzy inference
Crisp Composition Subscribe to Get Free
systems such as Mamdani approach of Takagi-Sugeno approach.
Fuzzy Relation
Fuzzy logic controllers are based on fuzzy logic. Most of the
Posts
Fuzzy Composition
Fuzzy Distance and Similarity embedded devices are nowadays implements one or other kind
Properties of Relation of FLC, for example air conditioner, washing machine, traffic light Enter Your Name*
Fuzzy Membership Functions
controller, flight navigation system and many more.
Classical and Fuzzy Logic
Enter Your Email*
Deductive Inference
Following steps should be followed to for designing fuzzy
Defuzzification
controller: Please accept terms & condition
Linguistic
2 Variables & Hedges
Your email will not be shared or
Maxima Methods
Identification of variables: Input, output and state variables published anywhere.
Weighted Average Method
must be identified of the plant Subscribe
Center of Gravity (CoG) Method
Center of Sums (CoS) Method Fuzzy subset configuration: The universe of information
Center of Largest Area (CoA) spanned by each variable is divided into number of fuzzy
Method

[Link] 1/17
3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

Example of Defuzzification subsets and each subset is assigned a linguistic variable


Home Courses Events
Popular Recent
Join CodeCrucks About
 
Methods
Obtaining membership function: Obtain membership
Introduction to Fuzzy
function for each fuzzy subset 21 Center of
Inference System Largest Area
Fuzzy Rule Base Configuration: Formulate fuzzy rule base by 08, 2021
Mamdani FIS - Concept (CoA) method
for
Mamdani FIS - Example assigning relationship between fuzzy input and output
defuzzification
Fuzzy Control System Normalizing and scaling factors: Appropriate scaling factors Cent [...]
How Fuzzy Inference System
for input and output variables must be chosen to normalize
Works?
variables between [0, 1] and [-1, 1] intervals Graph
Designing Fuzzy Controller - 19
Fuzzification: The Fuzzification process is done in this step Representatio
Example 12, 2021
Methods:
with the help of Fuzzifier Matrix and
List
Identification of output: Identify the output from each rule
Grap [...]
using fuzzy approximate reasoning and combine the fuzzy
output obtained from each rule
Bucket Sort
Defuzzification: Initiate Defuzzification process to form 12
09, 2021 Buck [...]
crisp output

Let us try to understand this with an example: Fuzzy set


20
example –
07, 2021
Real world
Example: problem
representation
2 This [...]
Consider the design of a fuzzy controller for a steam turbine.
Assume the input of the fuzzy controller as temperature and
Breadth First
20
pressure. The output will be the throttle setting of a steam 12, 2021
Search:
Graph
turbine. Use 3 descriptors for input and 5 descriptors for output Traversal
Technique

[Link] 2/17
3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

variables. Derive the set of rules for controller action and get the Brea [...]
Home Courses Events Join CodeCrucks About 
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:

2 N2: Large Negative


N1: Small Negative
Z: Zero
P1: Small Positive
P2: Large Positive

[Link] 3/17
3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

Step 3: Obtain Membership Function


Home Courses Events Join CodeCrucks About 

Define membership functions for descriptors (Temperature)

The fuzzy membership function for temperature is depicted in


following figure:

Fuzzy membership function for


temperature

From similar triangle rule we know that, (y2 – y1) / (x2 – x1) = (y –
y1) / (x – x1)

2
For fuzzy set COOL:

[0, 20] ⇒ (0 – 1) / (20 – 0) = (y – 1) / (x – 0)

μCool = (20 – xT) / 20

[Link] 4/17
3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

For fuzzy set NOMINAL:


Home Courses Events Join CodeCrucks About 

[0, 20] ⇒ (1 – 0) / (20 – 0) = (y – 0) / (x – 0)

⇒ μ =xT / 20

[20, 40] ⇒ (0 – 1) / (40 – 20) = (y – 1) / (x – 20)

⇒ μ = (40 – xT) / 20

Combining both in single equation,

For fuzzy set WARM:

[20, 40] ⇒ (1 – 0) / (40 – 20) = (y – 0) / (x – 20)

μwarm = (xT – 20) / 20

2
Define membership functions for descriptors (Pressure)

The fuzzy membership function for pressure is depicted in


following figure:

[Link] 5/17
3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

Home Courses Events Join CodeCrucks About 

Fuzzy membership function for


pressure

For fuzzy set LOW:

[0, 50] ⇒ (0 – 1) / (50 – 0) = (y – 1) / (x – 0)

μlow = (50 – xP) / 50

For fuzzy set OK:

[0, 50] ⇒ (1 – 0) / (50 – 0) = (y – 0) / (x – 0)

2 ⇒ μ = xP / 50

[50, 100] ⇒ (0 – 1) / (100 – 50) = (y – 1) / (x – 500)

⇒ μ = (100 – xP) / 50

[Link] 6/17
3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

Combining both in single equation,


Home Courses Events Join CodeCrucks About 

For fuzzy set STRONG:

[50, 100] ⇒ (1 – 0) / (100 – 50) = (y – 0) / (x – 50)

μStrong = (xP – 50) / 50

Define membership functions for descriptors (Rotation)

In similar way, we can compute the membership function for


rotation, as shown below:

[Link] 7/17
3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

Home Courses Events Join CodeCrucks About 


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 3 x 3 i.e. 9 rules.

The rule base for given inputs and fuzzy sub sets is depicted in
following table:

Rule base for the system

Step 6: Fuzzification

2
30 % of temperature:

xT = (40 ∗ 30) / 100 = 12

μCool = (20 – xT) / 20 = (20 –


12) / 20 = 8 / 20 = 2/5
[Link] 8/17
3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

μNominal = xT / 20 = 12 / 20 =
Home Courses Events Join CodeCrucks About 
3/5

Membership of 30% temperature in


corresponding fuzzy sets

40 % of pressure:

xP = (100 ∗ 40) / 100 = 40

μlow = (50 – xP) / 50 = (50 – 40)


/ 50 = 10 / 50 = 1/5

μOk = xP / 50 = 40 / 50 = 4/5
Membership of 40% temperature in

2 corresponding fuzzy sets

Fired rules and the rule base for them is shown here:

[Link] 9/17
3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

Home Courses Events Join CodeCrucks About 

Rule base of fired rules

Fired rules

Step 7: Identification of output

From rule base of fired rules, we can derive following rules,

1. Rule 1: If temperature is cool and pressure is low, then


throttle setting is P2
2. Rule 2: If temperature is cool and pressure is ok, then
throttle setting is Z
3. Rule 3: If temperature is nominal and pressure is low, then
throttle setting is P2
4. Rule 4: If temperature is nominal and pressure is ok, then
throttle setting is Z
2

[Link] 10/17
3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

Home Courses Events Join CodeCrucks About 

2
Step 8: Defuzzification

Firing strength of each rule is highlighted in different colors in


above figures. To compute the corresponding crisp value, we

[Link] 11/17
3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

shall aggregate all output functions by placing them on same


Home Courses Events Join CodeCrucks About 
axis.

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.

[Link] 12/17
3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

Home Courses Events Join CodeCrucks About 

Thus, for 40% of temperature (xT = 12) and 30% of pressure (xP =

30), we shall rotate the throttle by 16.984o.

Watch on YouTube: Designing Fuzzy Controller

[Link] 13/17
3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

Home Courses Events Join CodeCrucks About 

Share This Story !      

 Previous Next 

2
Related Posts

[Link] 14/17
3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

Home Courses Events Join CodeCrucks About 


5
Article Rating

 Subscribe  Connect with

Join the discussion

2
{} [+] 

2 COMMENTS   Oldest 

[Link] 15/17
3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

Tohid Abedini
Home Courses Events Join CodeCrucks About 
 2 months ago

Thanks for your complete tutorial. I think in the last formula for
computing x*, denominator should be sum of miu1 and miu2. It
matches with the final answer.

0 Reply

codecrucks Author

 Reply to Tohid Abedini  1 month ago

Yes dear. Thanks for bringing it to my notice. Good observation. I


will correct the typo mistake.

0 Reply

Machine Learning: Q & A Machine Learning: MCQs Algorithm: Articles


Computer Graphics: Q & A Algorithm: MCQs Fuzzy Logic: Articles
Data Structures: MCQs

[Link] 16/17
3/16/22, 7:36 PM Designing Fuzzy Controller - Step by Step Guide - CodeCrucks

Home Courses Events Join CodeCrucks About 


Copyright 2021 | CodeCrucks | All Rights Reserved | Powered by [Link]     

[Link] 17/17

You might also like