Fuzzy Logic: From First Principles to Control Applications Complete lecture deck with figures, examples, and speaker notes
Learning Objectives Explain fuzzy sets, membership functions (MFs), and linguistic variables. Apply fuzzy operators (t-norms, t-conorms) and hedges. Design Mamdani and Takagi–Sugeno–Kang (TSK) inference systems. Build and tune fuzzy logic controllers (FLCs). Compare FLCs to PID; design hybrids and analyze stability. Implement, simulate, and evaluate control performance.
Motivation & History Real systems are nonlinear and uncertain; human expertise is linguistic. Fuzzy logic encodes heuristic if–then rules with graded truth (0–1). Milestones: 1965: Zadeh—Fuzzy Sets 1974/75: Mamdani—fuzzy control demo 1985: Takagi–Sugeno—TSK models
Fuzzy Sets & Definitions Fuzzy set A on X defined by membership function μA: X → [0,1]. Support: {x | μA(x) > 0}, Core: {x | μA(x) = 1}, Height: max μA(x). α-cut: Aα = {x | μA(x) ≥ α}. Convex fuzzy sets → convex α-cuts.
Common Membership Functions Start simple (tri/trap) for interpretability; use Gaussian/bell for smoothness.
Linguistic Hedges Effect Hedges like 'very' sharpen; 'more or less' widens.
Operators: AND/OR/NOT Complement (NOT): μ¬A(x) = 1 − μA(x). Intersection (AND, t-norms): min, product. Union (OR, t-conorms): max, probabilistic sum. Choice affects smoothness and conservatism of control.
Fuzzy Relations & Implication Fuzzy implication applies rule strength to consequents: clipping (min) or scaling (product). Composition: max–min or max–product to combine multi-antecedent rules.
Mamdani vs TSK Inference Mamdani: fuzzy consequents; defuzzify aggregate (e.g., centroid). TSK: crisp consequents z = p0 + p1x + …; output via weighted average. Mamdani for interpretability; TSK for efficiency and optimization.
Fuzzy Inference Pipeline End-to-end flow from sensor inputs to actuator commands.
Defuzzification Methods Centroid / Center of Gravity (COG). Bisector of Area; Mean of Maxima (MOM). Weighted average for singleton consequents. TSK uses weighted average directly.
Canonical Rule Table (e × de → u) e\de NB NM NS Z PS PM PB NB NB NB NM NM NS Z PS NM NB NM NM NS Z PS PM NS NM NM NS Z PS PM PM Z NM NS Z Z Z PS PM PS NS Z PS PM PM PM PB PM Z PS PM PM PM PB PB PB PS PM PM PM PB PB PB
Canonical Control Surface Smooth, monotone surface helps avoid limit cycles.
Worked Example: Room Temperature Control Plant: heater + room thermal dynamics (slow, with delay). Inputs: error e = Tref − T (°C), rate de (°C/min). Output: heater power % (or Δu increment for smoothness). MFs: 5 terms (NB, NS, Z, PS, PB) for e and de; singleton consequents. Objective: <10% overshoot; good disturbance rejection.
Temperature Example: Error MFs Ensure overlap to avoid dead zones near setpoint.
Temperature Example: Rate MFs Narrower MFs near zero reduce chattering.
Temperature Example: Aggregation & Centroid For e=1.5, de=-0.2, centroid yields a moderate positive heater change.
Fuzzy vs PID (and Hybrids) Fuzzy strengths: Good for nonlinear/uncertain plants Interpretable rule base Robust with minimal modeling PID strengths: Simple and analyzable Strong for linear plants Wide tooling support Hybrids: Fuzzy supervisor tuning Kp,Ki,Kd Parallel Fuzzy+PID Fuzzy anti-windup
Data-Driven Design (Clustering & ANFIS) Grid partition → rule explosion; prefer clustering when inputs > 2. Fuzzy C-Means (FCM) extracts clusters → MFs; TSK local models. Subtractive clustering: density-based without predefined K. ANFIS: hybrid training for TSK parameters from I/O data.
Implementation Notes (Embedded & Real-Time) Prefer singleton/TSK for speed; precompute MF values if needed. Fixed-point quantization requires re-tuning of MF overlaps. Safety: saturation, rate limits, watchdogs. Diagnostics: log rule firings and outputs for tuning.
Applications of Fuzzy Control DC motor speed regulation; servo position with dead-zone. Process control: level, pH, temperature; HVAC. Automotive: transmission shift logic; ABS assistance. Consumer devices: cameras, washing machines. Robotics: lane keeping, obstacle avoidance.
Performance Metrics & Testing Time-domain: rise, overshoot, settling, steady-state error. Integral criteria: IAE, ISE, ITAE. Robustness: disturbances, noise, ±20–30% parameter variations. Actuator limits: saturation handling and anti-windup.
Common Pitfalls & Remedies Rule explosion → reduce terms; hierarchical fuzzy systems. Dead zones/chatter near setpoint → increase overlap; add rate input. Contradictory rules → enforce symmetry; visualize surface. Poor scaling → tune gains before MF fine-tuning. Ignore delays at your peril → consider predictor + fuzzy supervisor.
Lab Assignments & Projects Simulated temperature control: 5×5 Mamdani vs tuned PID (IAE, overshoot). DC motor speed with TSK; robustness to inertia change. Control surface visualization & monotonicity fixes. ANFIS mini-project from recorded I/O data.
References & Further Reading L. A. Zadeh, “Fuzzy Sets,” Information and Control, 1965. E. H. Mamdani, fuzzy control of a dynamic plant, Proc. IEE, 1974/75. T. Takagi & M. Sugeno, IEEE TSMC, 1985. T. J. Ross, Fuzzy Logic with Engineering Applications. Driankov, Hellendoorn, Reinfrank, An Introduction to Fuzzy Control. Tanaka & Wang, Fuzzy Control Systems Design and Analysis (LMI).