Fuzzy_Logic_Complete_Lecture_With_Figures.pptx

AdelRawea2 8 views 31 slides Aug 27, 2025
Slide 1
Slide 1 of 31
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31

About This Presentation

Fuzzy logic controller with PID


Slide Content

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

Crisp vs Fuzzy Membership Crisp membership jumps 0→1; fuzzy membership varies smoothly.

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.

Centroid Defuzzification Centroid computes area-balanced crisp output.

FLC Block Diagram Inputs: error and rate; output: control action.

Design Procedure (Step-by-Step) 1) Select variables & ranges (e, de, u). 2) Choose number/type of MFs (coverage & overlap). 3) Craft rule base (symmetry, monotonicity). 4) Choose inference & defuzzification. 5) Tune scaling gains and MF widths/centers. 6) Validate (IAE/ISE/ITAE, overshoot, settling). 7) Implement (sampling, saturation, safety).

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

Stability & Analysis Pointers Ensure smooth control surface (overlap MFs; centroid/TSK). TSK + Parallel Distributed Compensation (PDC) enables LMI-based stability tests. Sampling: Ts ≤ 0.1× smallest time constant; beware delays. Conservative output scaling reduces limit cycles.

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.

Glossary (Quick Reference) MF: membership function; t-norm/t-conorm: fuzzy AND/OR. Mamdani: fuzzy consequents; TSK: crisp functional consequents. Defuzzification: mapping to crisp output (centroid, MOM…). PDC: Parallel Distributed Compensation for TSK plants.

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).
Tags