SlideShare a Scribd company logo
1 of 10
Download to read offline
FUZZY CONTROL
Example:
Consider a dynamic system of first order dynamics and delay
with a transfer function
G s
e
s
s
( )
.
=
+
−
12
10 1
The reference signal is a unit step. Develop a fuzzy PI(D)
type of controller for it and study its performance.
Solution:
The Simulink diagram of the system is shown below It is built
in Simulink in the usual fashion by first opening Simulink
with the command
» simulink
and then proceeding to use blocks in the appropriate block
libraries.
How to cope with steady-state error? To reduce it to zero
requires PI type of fuzzy controller. The integral part of the
controller, drives the error to zero. If only two membership
functions are used, the rule base becomes
• PI type FLC (velocity algorithm)
– If e(k) is positive and ∆e(k) is positive, then ∆u(k) is positive
– If e(k) is positive and ∆e(k) is negative, then ∆u(k) is zero
– If e(k) is negative and ∆e(k) is positive, then ∆u(k) is zero
– If e(k) is negative and ∆e(k) is negative, then ∆u(k) is
negative
At this point one has to observe that in the simulation we are
going to mix a continuous process and a discrete controller.
In practice this requires A/D and D/A-conversions. Simulink
has so-called Zero-order hold block to handle the situation.
For laymen it is also possible to skip this practical problem
completely, because Simulink will, by default, allow to mix
discrete and continuous signals.
The fuzzy controller uses error e(k) and change in ∆e = e(k)-
e(k-1) going into Fuzzy Logic Controller block. In the latter
case, we need the appropriate transfer function block from
Simulink block library. A simple calculation produces the
following
1
( ) ( 1) (1 ) ( )e e k e k z e k−
∆ = − − = −
Since the input to the block is e(k), the transfer function we
want is
1( )
(1 )
( )
e k
z
e k
−∆
= − .
Observe that the output is ∆u=u(k)-u(k-1). The appropriate
transfer function has ∆u as the output and u as the input.
1 1
( ) ( 1) ( ) ( ) (1 ) ( )u u k u k u k z u k z u k− −
∆ = − − = − = −
or
1
1
(1 )
u
u z−
=
∆ −
To design the fuzzy controller we open the Fuzzy Logic
Toolbox GUI in the usual fashion by typing
fuzzy
Set up a fuzzy system with two outputs and one output. For
simplicity, use two, triangular membership functions at the
input and three at the output. The resulting system is shown
in the following figures.
In order to transmit the knowledge of the fuzzy system to
Simulink, save the FIS to workspace. Call it FPI.
Next go to Simulink and configure the overall system shown
below.
The two discrete filters are formed by changing Numerator
and Denominator parameters appropriately.
Remember that the Fuzzy Logic Controller needs two inputs,
but can accept only one. Therefore introduce a multiplexer,
Mux.
The fuzzy controller block library is found either by typing
Fuzblock or opening first Blocksets & Toolboxes and then
Fuzzy Logic Toolbox
Once you move this block to the system configuration, you
have to click it open and call it FPI.
Now you can start simulation, but first adjust parameters as
follows:
Open Parameters and change Stop time to 50 s.
Now start the simulation. The result is seen from the scope.
If a better response is needed, many ways can be tried. The
gains can be changed, more membership functions may be
added and their positions hanged.

More Related Content

What's hot

Block diagram representation of DT systems
Block diagram representation of DT systemsBlock diagram representation of DT systems
Block diagram representation of DT systemsDr.SHANTHI K.G
 
Forelasning4
Forelasning4Forelasning4
Forelasning4Memo Love
 
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault ToleranceParallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault ToleranceUniversity of Technology - Iraq
 
Introduction to simulink (1)
Introduction to simulink (1)Introduction to simulink (1)
Introduction to simulink (1)Memo Love
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithmsguest084d20
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introductionAmeen San
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithmsDanish Javed
 
Matlab programming project
Matlab programming projectMatlab programming project
Matlab programming projectAssignmentpedia
 
linear algebra in control systems
linear algebra in control systemslinear algebra in control systems
linear algebra in control systemsGanesh Bhat
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithmsguest084d20
 
Block diagram representation 3
Block diagram representation 3Block diagram representation 3
Block diagram representation 3Syed Saeed
 
Pertemuan 05. SFG (Signal Flow Graph)
Pertemuan 05. SFG (Signal Flow Graph)Pertemuan 05. SFG (Signal Flow Graph)
Pertemuan 05. SFG (Signal Flow Graph)Aprianti Putri
 
Modern control system
Modern control systemModern control system
Modern control systemPourya Parsa
 
control system Lab 01-introduction to transfer functions
control system Lab 01-introduction to transfer functionscontrol system Lab 01-introduction to transfer functions
control system Lab 01-introduction to transfer functionsnalan karunanayake
 
Discrete state space model 9th &10th lecture
Discrete  state space model   9th  &10th  lectureDiscrete  state space model   9th  &10th  lecture
Discrete state space model 9th &10th lectureKhalaf Gaeid Alshammery
 

What's hot (20)

Block diagram representation of DT systems
Block diagram representation of DT systemsBlock diagram representation of DT systems
Block diagram representation of DT systems
 
Parallel algorithm in linear algebra
Parallel algorithm in linear algebraParallel algorithm in linear algebra
Parallel algorithm in linear algebra
 
Deadbeat Response Design _8th lecture
Deadbeat Response Design _8th lectureDeadbeat Response Design _8th lecture
Deadbeat Response Design _8th lecture
 
Forelasning4
Forelasning4Forelasning4
Forelasning4
 
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault ToleranceParallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
 
Introduction to simulink (1)
Introduction to simulink (1)Introduction to simulink (1)
Introduction to simulink (1)
 
Parallel quicksort cz. 1
Parallel quicksort cz. 1Parallel quicksort cz. 1
Parallel quicksort cz. 1
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithms
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introduction
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithms
 
Block diagrams
Block diagramsBlock diagrams
Block diagrams
 
Matlab programming project
Matlab programming projectMatlab programming project
Matlab programming project
 
linear algebra in control systems
linear algebra in control systemslinear algebra in control systems
linear algebra in control systems
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithms
 
Block diagram representation 3
Block diagram representation 3Block diagram representation 3
Block diagram representation 3
 
Pertemuan 05. SFG (Signal Flow Graph)
Pertemuan 05. SFG (Signal Flow Graph)Pertemuan 05. SFG (Signal Flow Graph)
Pertemuan 05. SFG (Signal Flow Graph)
 
Modern control system
Modern control systemModern control system
Modern control system
 
Lec15
Lec15Lec15
Lec15
 
control system Lab 01-introduction to transfer functions
control system Lab 01-introduction to transfer functionscontrol system Lab 01-introduction to transfer functions
control system Lab 01-introduction to transfer functions
 
Discrete state space model 9th &10th lecture
Discrete  state space model   9th  &10th  lectureDiscrete  state space model   9th  &10th  lecture
Discrete state space model 9th &10th lecture
 

Similar to FUZZY PI CONTROLLER

Raymond.Brunkow-Project-EEL-3657-Sp15
Raymond.Brunkow-Project-EEL-3657-Sp15Raymond.Brunkow-Project-EEL-3657-Sp15
Raymond.Brunkow-Project-EEL-3657-Sp15Raymond Brunkow
 
Linear Control Hard-Disk Read/Write Controller Assignment
Linear Control Hard-Disk Read/Write Controller AssignmentLinear Control Hard-Disk Read/Write Controller Assignment
Linear Control Hard-Disk Read/Write Controller AssignmentIsham Rashik
 
Control engineering module 3 part-A
Control engineering  module 3 part-AControl engineering  module 3 part-A
Control engineering module 3 part-AMohammed Imran
 
Mechatronics (2016) Unit II.pptx
Mechatronics (2016) Unit II.pptxMechatronics (2016) Unit II.pptx
Mechatronics (2016) Unit II.pptxnitcse
 
1.[1 5]implementation of pre compensation fuzzy for a cascade pid controller ...
1.[1 5]implementation of pre compensation fuzzy for a cascade pid controller ...1.[1 5]implementation of pre compensation fuzzy for a cascade pid controller ...
1.[1 5]implementation of pre compensation fuzzy for a cascade pid controller ...Alexander Decker
 
Lectures upto block diagram reduction
Lectures upto block diagram reductionLectures upto block diagram reduction
Lectures upto block diagram reductionUthsoNandy
 
Ece 415 control systems, fall 2021 computer project 1
Ece 415 control systems, fall 2021 computer project  1 Ece 415 control systems, fall 2021 computer project  1
Ece 415 control systems, fall 2021 computer project 1 ronak56
 
MODELLING, ANALYSIS AND SIMULATION OF DYNAMIC SYSTEMS USING CONTROL TECHNIQUE...
MODELLING, ANALYSIS AND SIMULATION OF DYNAMIC SYSTEMS USING CONTROL TECHNIQUE...MODELLING, ANALYSIS AND SIMULATION OF DYNAMIC SYSTEMS USING CONTROL TECHNIQUE...
MODELLING, ANALYSIS AND SIMULATION OF DYNAMIC SYSTEMS USING CONTROL TECHNIQUE...shivamverma394
 
Control tutorials for matlab and simulink introduction pid controller desig...
Control tutorials for matlab and simulink   introduction pid controller desig...Control tutorials for matlab and simulink   introduction pid controller desig...
Control tutorials for matlab and simulink introduction pid controller desig...ssuser27c61e
 
control system lab 02 - PID tuning
control system lab 02 - PID tuning control system lab 02 - PID tuning
control system lab 02 - PID tuning nalan karunanayake
 
New controllers efficient model based design method
New controllers efficient model based design methodNew controllers efficient model based design method
New controllers efficient model based design methodAlexander Decker
 
TRANSFER FUNCTION (4).pptx
TRANSFER FUNCTION (4).pptxTRANSFER FUNCTION (4).pptx
TRANSFER FUNCTION (4).pptxankit317032
 
Adaptive neural network controller Presentation
Adaptive neural network controller PresentationAdaptive neural network controller Presentation
Adaptive neural network controller PresentationNguyen Cong Dan
 

Similar to FUZZY PI CONTROLLER (20)

Raymond.Brunkow-Project-EEL-3657-Sp15
Raymond.Brunkow-Project-EEL-3657-Sp15Raymond.Brunkow-Project-EEL-3657-Sp15
Raymond.Brunkow-Project-EEL-3657-Sp15
 
Chapter10
Chapter10Chapter10
Chapter10
 
Linear Control Hard-Disk Read/Write Controller Assignment
Linear Control Hard-Disk Read/Write Controller AssignmentLinear Control Hard-Disk Read/Write Controller Assignment
Linear Control Hard-Disk Read/Write Controller Assignment
 
Simulink 1.pdf
Simulink 1.pdfSimulink 1.pdf
Simulink 1.pdf
 
Control engineering module 3 part-A
Control engineering  module 3 part-AControl engineering  module 3 part-A
Control engineering module 3 part-A
 
Mechatronics (2016) Unit II.pptx
Mechatronics (2016) Unit II.pptxMechatronics (2016) Unit II.pptx
Mechatronics (2016) Unit II.pptx
 
1.[1 5]implementation of pre compensation fuzzy for a cascade pid controller ...
1.[1 5]implementation of pre compensation fuzzy for a cascade pid controller ...1.[1 5]implementation of pre compensation fuzzy for a cascade pid controller ...
1.[1 5]implementation of pre compensation fuzzy for a cascade pid controller ...
 
Lectures upto block diagram reduction
Lectures upto block diagram reductionLectures upto block diagram reduction
Lectures upto block diagram reduction
 
Ece 415 control systems, fall 2021 computer project 1
Ece 415 control systems, fall 2021 computer project  1 Ece 415 control systems, fall 2021 computer project  1
Ece 415 control systems, fall 2021 computer project 1
 
Lab03
Lab03Lab03
Lab03
 
MODELLING, ANALYSIS AND SIMULATION OF DYNAMIC SYSTEMS USING CONTROL TECHNIQUE...
MODELLING, ANALYSIS AND SIMULATION OF DYNAMIC SYSTEMS USING CONTROL TECHNIQUE...MODELLING, ANALYSIS AND SIMULATION OF DYNAMIC SYSTEMS USING CONTROL TECHNIQUE...
MODELLING, ANALYSIS AND SIMULATION OF DYNAMIC SYSTEMS USING CONTROL TECHNIQUE...
 
Control tutorials for matlab and simulink introduction pid controller desig...
Control tutorials for matlab and simulink   introduction pid controller desig...Control tutorials for matlab and simulink   introduction pid controller desig...
Control tutorials for matlab and simulink introduction pid controller desig...
 
control system lab 02 - PID tuning
control system lab 02 - PID tuning control system lab 02 - PID tuning
control system lab 02 - PID tuning
 
New controllers efficient model based design method
New controllers efficient model based design methodNew controllers efficient model based design method
New controllers efficient model based design method
 
reduc_inclass.pdf
reduc_inclass.pdfreduc_inclass.pdf
reduc_inclass.pdf
 
TRANSFER FUNCTION (4).pptx
TRANSFER FUNCTION (4).pptxTRANSFER FUNCTION (4).pptx
TRANSFER FUNCTION (4).pptx
 
control_5.pptx
control_5.pptxcontrol_5.pptx
control_5.pptx
 
Block Diagram For Control Systems.
Block Diagram For Control Systems.Block Diagram For Control Systems.
Block Diagram For Control Systems.
 
Simulink
SimulinkSimulink
Simulink
 
Adaptive neural network controller Presentation
Adaptive neural network controller PresentationAdaptive neural network controller Presentation
Adaptive neural network controller Presentation
 

Recently uploaded

INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIkoyaldeepu123
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixingviprabot1
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 

Recently uploaded (20)

INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AI
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixing
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 

FUZZY PI CONTROLLER

  • 2. Example: Consider a dynamic system of first order dynamics and delay with a transfer function G s e s s ( ) . = + − 12 10 1 The reference signal is a unit step. Develop a fuzzy PI(D) type of controller for it and study its performance. Solution: The Simulink diagram of the system is shown below It is built in Simulink in the usual fashion by first opening Simulink with the command » simulink and then proceeding to use blocks in the appropriate block libraries. How to cope with steady-state error? To reduce it to zero requires PI type of fuzzy controller. The integral part of the controller, drives the error to zero. If only two membership functions are used, the rule base becomes • PI type FLC (velocity algorithm) – If e(k) is positive and ∆e(k) is positive, then ∆u(k) is positive – If e(k) is positive and ∆e(k) is negative, then ∆u(k) is zero – If e(k) is negative and ∆e(k) is positive, then ∆u(k) is zero – If e(k) is negative and ∆e(k) is negative, then ∆u(k) is negative At this point one has to observe that in the simulation we are going to mix a continuous process and a discrete controller. In practice this requires A/D and D/A-conversions. Simulink
  • 3. has so-called Zero-order hold block to handle the situation. For laymen it is also possible to skip this practical problem completely, because Simulink will, by default, allow to mix discrete and continuous signals. The fuzzy controller uses error e(k) and change in ∆e = e(k)- e(k-1) going into Fuzzy Logic Controller block. In the latter case, we need the appropriate transfer function block from Simulink block library. A simple calculation produces the following 1 ( ) ( 1) (1 ) ( )e e k e k z e k− ∆ = − − = − Since the input to the block is e(k), the transfer function we want is 1( ) (1 ) ( ) e k z e k −∆ = − . Observe that the output is ∆u=u(k)-u(k-1). The appropriate transfer function has ∆u as the output and u as the input. 1 1 ( ) ( 1) ( ) ( ) (1 ) ( )u u k u k u k z u k z u k− − ∆ = − − = − = − or 1 1 (1 ) u u z− = ∆ − To design the fuzzy controller we open the Fuzzy Logic Toolbox GUI in the usual fashion by typing fuzzy
  • 4. Set up a fuzzy system with two outputs and one output. For simplicity, use two, triangular membership functions at the input and three at the output. The resulting system is shown in the following figures.
  • 5.
  • 6. In order to transmit the knowledge of the fuzzy system to Simulink, save the FIS to workspace. Call it FPI. Next go to Simulink and configure the overall system shown below.
  • 7. The two discrete filters are formed by changing Numerator and Denominator parameters appropriately.
  • 8. Remember that the Fuzzy Logic Controller needs two inputs, but can accept only one. Therefore introduce a multiplexer, Mux. The fuzzy controller block library is found either by typing Fuzblock or opening first Blocksets & Toolboxes and then Fuzzy Logic Toolbox Once you move this block to the system configuration, you have to click it open and call it FPI.
  • 9. Now you can start simulation, but first adjust parameters as follows: Open Parameters and change Stop time to 50 s.
  • 10. Now start the simulation. The result is seen from the scope. If a better response is needed, many ways can be tried. The gains can be changed, more membership functions may be added and their positions hanged.