DerivativeBased Fuzzy System Optimization Dan Simon Cleveland State
Derivative-Based Fuzzy System Optimization Dan Simon Cleveland State University 1
Suppose we have a fuzzy controller that operates for N time steps. The controller error can be measured as: 2
Input Modal Points cij Note that yq is constant. Therefore, 3
at each time step q, where wj is the firing strength, j is the centroid, and Jj is the area of the j-th output fuzzy membership function. 4
5
Definition: ri 1 k = 1 if x 1 fuzzy set i is a premise of the k-th rule and wk = fi 1(x 1), and ri 1 k = 0 otherwise. In other words, ri 1 k = 1 if x 1 determines the activation level of the kth rule because of its membership in the i-th fuzzy set. Similarly, ri 2 k = 1 if x 2 fuzzy set i is a premise of the k-th rule and wk = fi 2(x 2), and ri 2 k = 0 otherwise. 6
Example: Change in Error x 2 Error x 1 NL NS Z PS PL NL NS NS NL NS Z Z NL NS Z PS PL PS Z Z Z PS PL PL PS PS PS PL PL x 1 Throttle Position Change y x 1 NS (0. 8) and x 1 Z (0. 2) x 2 Z (0. 3) and x 2 PS (0. 7) 12 -th rule: x 1 NS and x 2 PS y NS Therefore, r 2, 1, 12 = 1. ri, 1, 12 = 0 for i {1, 3, 4, 5}, and ri, 2, 12 = 0 for i [1, 5]. x 2 7
Recall wk = firing strength of k-th rule, which is equal to the minimum of the two input membership functions. Therefore: Recall the membership functions fi 1 (x 1) are given by the following triangular functions: 8
9
Summary: • The expressions on pages 3, 5, 8, and 9, give us the partial derivative of the error with respect to the modal points of the input MFs. • Similar methods are used to find the derivatives of the error with respect to input MF half-widths, output MF modal points, and output MF halfwidths. • Now we can use gradient descent (or another gradient-based method) to optimize the MFs. Reference: D. Simon, "Sum normal optimization of fuzzy membership functions, " International Journal of Uncertainty, Fuzziness and Knowledge. Based Systems, Aug. 2002. 10
Example: Fuzzy Cruise Control – Vehicle. Grad. m 74% error decrease 11
Performance of cruise control after gradient descent optimization of MFs 12
Default Output MFs Optimized Output MFs Plot. Mem( 'paramgu. txt', 2, [5 5], 1, 5) The input MFs do not change as much as the output MFs Throttle change (rad) 13
Some issues to think about: • Why use 5 membership functions for the output and for each input? • How can we make the response less oscillatory? How about something like: where is a weighting parameter 14
• Try different initial conditions (initial fuzzy membership functions) • Try different gradient descent options • Try different MF shapes • How can we optimize while constraining the MFs to be sum normal? 15
f 11(x 1) 1 b 11– f 21(x 1) c 11 x 1 b 11+ 1 b 21– c 21 x 1 16
Similar equality constraints can be written for the input 2 MFs, and for the output MFs. = number of input 1 fuzzy sets = number of input 2 fuzzy sets = number of output fuzzy sets 17
Similar equality constraints for the input 2 MFs and the output MFs L 1: 2( 1) 3 L 2: 2( 1) 3 L 3: 2( 1) 3 18
In our case, = 0 19
Example: Fuzzy Cruise Control – Vehicle. Grad(1); 70% error decrease (Recall that it was 74% for unconstrained optimization) 20
Performance of cruise control after unconstrained and constrained gradient descent optimization of MFs 21
Default Output MFs Optimized Constrained Output MFs Plot. Mem( 'paramgc. txt', 2, [5 5], 1, 5) The input MFs do not change as much as the output MFs Throttle change (rad) 22
Other gradient descent optimization algorithms: • Chapter 3, “A Course in Fuzzy Systems and Control, ” by Li-Xin Wang 23
- Slides: 23