Fuzzy Cruise Control 1
J. Yen and R. Langari, Fuzzy Logic: Intelligence, Control, and Information (Prentice Hall, Upper Saddle River, New Jersey, 1999). D. Simon, "Sum normal optimization of fuzzy membership functions," International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems, Aug
Fuzzy Cruise Control = N = 4 N / (m/s) 2 m = 1000 kg f i = 1000 N (engine idle force,) g = 9.81 m/s 2 3
z=.2; w=1; t=0:.1:10; wd=w*sqrt(1-z*z); A=1; B=1; x=exp(-z*w*t).*(A*cos(wd*t)+B*sin(wd*t)); plot(t,x), hold on; plot(t, zeros(size(t)), 'r--') 4 error = v ref – v
Fuzzy Cruise Control NLNSZPSPL NL NS NLNSZZZ ZNLNSZPSPL PSZZZ PL PS PL Change in Error Error Throttle Position Change VehicleControl.m 5
Error (meters/sec) Default Membership Functions PlotMem ('DefaultMem.txt', 2, [5 5], 1, 5) 6
Default Membership Functions Change in Error (meters/sec) 7
Default Membership Functions Throttle change (rad) 8
c = modal point, or “center” b – and b + = half-widths Input Membership Functions 9 c b–b– f(x)f(x) 1 x b+b+
j-th output membership function: j = modal point, or “center” j – and j + = half-widths 10
Notation: f i1 (x 1 ) is membership of 1st input in i-th MF Similar for f k2 (x 2 ) x1x1 Example: f 11 (x 1 ) = 0 f 21 (x 1 ) = 0.8 f 31 (x 1 ) = 0.2 f 41 (x 1 ) = 0 f 51 (x 1 ) = 0 11
If x 1 is A i and x 2 is B k, then y is C j Firing level: So the fuzzy output when x 1 fuzzy set i and x 2 fuzzy set k is Point-wise sum of fuzzy outputs: 12
Centroid defuzzification with M rules: where j and J j are the centroid and area of the j-th output fuzzy membership function 13
Substitute m j (y) from 4 pages earlier into the j equation on the previous page. Two pages of calculus and algebra later, 14 Now use Theorem 4.1 in Jang to obtain the defuzzified output:
Fuzzy Cruise Control: VehicleControl.m 10 deg increase in road grade at t = 0 15
Fuzzy Controller Optimization 1.Gradient-based methods: Use the derivative of the tracking error with respect to the fuzzy MF parameters (Jang, Chapter 6) – “Home in” on a local optimum – Fast 2.Gradient-free methods (Jang, Chapter 7) – Genetic algorithms, etc. – Slow – No messy derivatives – “Global” optimization – General optimization (MF, number of rules, rule base, etc.) 16