FUZZY LOGIC CONTROLLER BY SABARI
Start the MATLAB and in
the command window type “fuzzy” ….
A new window of “FIS
EDITOR” opens
In that window go to
EDIT -----à
Add variable ----à
Input
Add as many inputs we
want….
In this we are about to
model a cooling system. So, Temperature & Humidity are
involved. So, the inputs name is changed as
“TEMPERATURE” & “HUMIDITY”.
Edit---à Remove all the Membership Functions
Go to EDIT--à Add the desired
number of membership functions
Arrange the RANGE of
each function (Inputs & Outputs)
i.e Range of 100 for
having the function interval
Goto
Edit --à
RULES :::: Adding rules depends on the number of inputs & outputs used
After “ADDING THE RULES
” Goto FILE --à
Export and add to the WORKSPACE
In the workspace name use the common names (To be
remembered soon).
I used “Cooling_System”
The created file is saved in the “.fis” format…. It is created to link in the SIMULINK MODEL
To go to the model
window…. In the main window goto FILE --à
New --à
Model
In the model window
click on the “SIMULINK LIBRARY BROWSER” .Select the fuzzy logic toolbox select
the “FUZZY LOGIC CONTROLLER” .Add the toolbox to the SIMULINK MODEL WINDOW.
Draw
the model as per the diagram
Double click on the
“FUZZY LOGIC CONTROLLER” and input the file name as previously saved (i.e.)
saved during the Adding of the Rules {I
used the name Cooling_System} The output will be as per the RULES we added.
Instead of FUZZY LOGIC
CONTROLLER we can use FUZZY LOGIC CONTROLLER WITH RULEVIEWER present in the
same Fuzzy logic toolbox.
Double click on the
“FUZZY LOGIC CONTROLLER” and input the file name as previously saved (i.e.)
saved during the Adding of the Rules {I
used the name Cooling_System} The output will be as per the RULES we added
To Run the SIMULINK
MODEL press ctrl+T to run the
simulation.
After running the model
the rule viewer shows the inputs and outputs. By altering the Temperature and
Humidity the output is varying as per the RULES added.
For
additional details sabareeshwarank@gmail.com