FUZZY LOGIC CONTROL
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL (FLC)
Control applications most common FL applications Control actions based on rules
Rules in linguistic form
Reasoning with fuzzy logic FLC is (on the surface) nonanalytic
General design methods still in infancy The effect of control parameter changes on control result difficult to estimate
Tuned case by case
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL (FLC)
Classical FLC
r + e FLC Process y
Taking a shower (our process) in the bathroom. (y=water temperature, r=desired water temperature.) What is the rule base for FLC?
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL (FLC)
FLC and conventional PID as a backup
r + PID e FLC + y Process
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL (FLC)
FL tuning conventional PID
r + FL e PID u Process y
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL (FLC)
FL in gain scheduling PID
r + e PID1 Process PID2 FL u Switch y
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL
FLC is a fuzzy system consisting of Fuzzification interface Fuzzy inference Knowledge base Defuzzification interface
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL
FUZZY SYSTEM Knowledge base Input Fuzzification Inference Defuzzification Output
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL - Structure
Control inputs Fuzzy sets (membership functions) of inputs Rules Control outputs Fuzzy sets (membership functions) of outputs Fuzzy reasoning Defuzzification
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL - Structure
Control inputs
error, change in error, process input and output, setpoint
Fuzzy sets (membership functions) of inputs
number of sets, type of membership functions, location of membership functions
Rules Control outputs
control, change in control, control parameters, setpoint
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL - Structure
Fuzzy sets (membership functions) of outputs
number of sets, location of membership functions
Fuzzy reasoning
max-min, sum-product, etc.
Defuzzification
center of gravity, max, etc.
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL Structure
Helsinki University of Technology Control Engineering Laboratory
FLC Closed-loop step responses to guide in construction of rules
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL - PD type
PD type fuzzy
u = K pe + KDe
If e is
and e is
then u is
REMARK: PD especially for servo problems
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL - PID type
PID type fuzzy (position algorithm)
u = K p e + K D e + K I e( )d
0 t
If e is and e is then u is
Helsinki University of Technology Control Engineering Laboratory
and e(k ) is
i =0
FUZZY LOGIC CONTROL - PID type
PID type fuzzy (velocity algorithm)
u = K p e + K D e + K I e( )d
0
If e is and e is then u is
Helsinki University of Technology Control Engineering Laboratory
and 2 e(k ) is
FUZZY LOGIC CONTROL - PI type
PI type fuzzy
u = K p e + K I e dt ,
0 t
Take derivative on both sides u = K pe + KI e
If e is
and e is
then u is
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL PD type, rule base
PD type FLC (position algorithm)
If e(k) is positive and e(k) is positive, then u(k) is large If e(k) is positive and e(k) is negative, then u(k) is medium If e(k) is negative and e(k) is positive, then u(k) is medium If e(k) is negative and e(k) is negative, then u(k) is small
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL PI type, rule base
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
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL - Example
Example:
Consider a dynamic system of first order dynamics and delay with a transfer function
1.2e s G(s) = 10 s + 1
The reference signal is a unit step. Develop a fuzzy PI(D) feedback controller for the feedback system and study its performance.
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL - Simulation
SOLUTION: Simulink diagram of the system is constructed next Open Simulink with the command simulink and then proceed to use blocks in the appropriate block libraries.
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL- Simulation
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL- Simulation
In MATLAB command side open fuzzy toolbox fuzzy Develop the fuzzy system (Fuzzy Logic Controller) In order to use in the command side, save to workspace. If you want to use the system later, save to disk. The easiest thing to get started is to pick a fuzzy controller from fuzzy demos. Open tank, and use the controller tank.
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL- demo sltank
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL- Simulation
Open Fuzzy Logic Controller to see the name of the fuzzy system (FIS matrix)
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL- Simulation
Open Fuzzy Logic Toolbox and from fuzzy demos [Link] and study its rule base
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL- Simulation
You can use tank or start changing it according to your own design. You can graphically adjust membership functions. One modification is given on the next slide REMARK : We have position type of controller output is u.
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL- Simulation
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL - Simulation
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL PI type (velocity)
To reduce steady-state error to zero integrator is needed Try to set up PI type of fuzzy controller Study typical step responses to set up the rule base
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL PI type (velocity)
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
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL velocity type
u (k ) = u (k ) u (k 1)
u ( k )
u (k )
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL velocity type
Helsinki University of Technology Control Engineering Laboratory
FUZZY LOGIC CONTROL
Easy to set up a working fuzzy controller even for difficult-to-control processes (but previously controlled by operator) Easy to understand the rule base in simple cases No sense to use FLC in straightforward linear cases, if implementation reasons would not require it Complications will arise when rule base increases Speed could be a bottleneck in some cases, if many rules
Helsinki University of Technology Control Engineering Laboratory