FUZZY CONTROL Main bibliography J.M.C. Sousa and U. Kaymak. Fuzzy Decision Making in Modeling and Control. World Scientific Series in Robotics and Intelligent Systems, vol. 27, Dec. 2002. FakhreddineO. Karrayand Clarence De Silva. Soft Computing and Intelligent Systems Design. Addison Wesley, 2004. Michael Negnevitsky. Artificial Intelligence: A Guide to Intelligent Systems. Addison-Wesley, Pearson Education, 2002. 39
Fuzzy control Controller designed by using If-Then rules instead of mathematical formulas (knowledge-based control). Early motivation: mimic experienced operators. Fuzzy reasoning: interpolation between discrete outputs. Currently: also controllers designed on the basis of a fuzzy model (model-based fuzzy control). A fuzzy controller represents a nonlinearmapping (but completely deterministic!). 392 Fuzzy control: history 965 First publication on fuzzy sets (Zadeh) 974 Fuzzy control applied to a laboratory system (Mamdani) 982 First industrial application of fuzzy control (to a cement kiln) 985 Sendai subway train control, consumer products (Japan) 200? Large number of (micro)controllers: fuel injection, cameras, washing machines, etc. 393 2
Fuzzy control schemes PID fuzzy control (nonlinear) Fuzzy supervisory control Fuzzy model-based control 394 Low-level fuzzy control d r Fuzzy Logic Controller Process y 395 3
Fuzzy control: basic elements R : If x is A and x is A and and x is A then u is B k k k k 2 2 n n k 396 Fuzzy PD controller rule table e e(k) NB NS ZE PS PB NB NB NB NS NS ZE NS NB NS NS ZE PS ZE NS NS ZE PS PS PS NS ZE PS PS PB PB ZE PS PS PB PB R 8 : If e is NS and e is ZE then u is NS 397 4
Mapping of FLC Fuzzy rules associate fuzzy regions in the antecedent space with fuzzy regions in the consequent space. 398 Fuzzy inference mechanism. Establish fuzzy relation k k µ ( x, u) = µ ( x ) µ ( u), k =,, K R 2. Inference: sup-t composition 3. Defuzzification k n j = k = j j u (, ) = K k µ x u R ( x, u) R [ x x u ] µ ( y) = sup µ ( ) µ (, ) B A x X u cog = u U u U R u µ ( u) du B µ ( u) du B 399 5
Membership functions 400 Max-min inference 40 6
Max-product inference 402 Comparison of inferences 403 7
Design of a fuzzy controller. Determine input(s) and output(s). 2. Determine membership functions. 3. Define the rule base, based on e.g. expert knowledge. 4. Test the controller for typical test signals. 5. Fine-tune the controller (the designer can go back to step if necessary). 404 Types of PID fuzzy controllers PD fuzzy controller R : If e is and e is A then u is A i i i e u PI fuzzy controller R : If e is and e is A then u is A i i i e u PID fuzzy controller R : If e is and e is A and e is A then u is A i i 2 i i e 2 e u 405 8
Example: demo sltank. If level is OK then no_change valve 2. Iflevel is lowthenopen fastvalve 3. Iflevel is highthenclose fastvalve 4. Iflevel is OKand rate is positivethenclose slow valve 5. Iflevel is OKand rate is negativethenopen slow valve h R 406 PID control.6.4.2 level 0.8 0.6 0.4 0 50 00 50 200 250 300 time 407 9
PD fuzzy control.8.6.4.2 level 0.8 0.6 0.4 0 50 00 50 200 250 300 time 408 Example: proportional control Controller's input-output mapping 409 0
Proportional control: rules. If error is Negative Big then control input is Negative Big. 2. Iferror is Zerothencontrol input is Zero. 3. If error is Positive Big then control input is Positive Big. 40 Example: friction compensation DC motor with static friction. Fuzzy rules to represent normal proportional control. Additional rules to prevent undesirable states. Model of the DC motor Armature Load in_ K(s) L.s+R J.s+b Dead Zone s out_ K 4
Proportional controller Control u P Motor Mux Angle 42 Proportional controller output shaft angle [rad] control input [V] 0.5 0. 0.05 0-0.05-0..5-0.5-0 5 0 5 20 25 30 time [s] 0.5 0 -.5 0 5 0 5 20 25 30 time [s] 43 2
Fuzzy control rule base Proportional Rules:. Iferror is Negative Bigthencontrol input isnegative Big. 2. Iferror is Zerothencontrol input is Zero. 3. Iferror is Positive Bigthencontrol input ispositive Big. Additional rules: 4. Iferror is Negative Smallthencontrol input isnot Negative Small. 5. Iferror is Positive Smallthen control input is notpositive Small. 44 Input-Output mapping u local nonlinearity 0.5-0.5-0. -0.05 0 0.05 0. 0.5 e -0.5 45 3
Fuzzy control results shaft angle [rad] control input [V] 0.5 0. 0.05 0-0.05-0..5-0.5-0 5 0 5 20 25 30 time [s] 0.5 0 -.5 0 5 0 5 20 25 30 time [s] 46 Supervisory fuzzy control Example: Ifyis lowthenreducek p andincreasek d. Fuzzy Supervisor r PID Controller Process y 47 4