164 CHAPTER 4. FUZZY CONTROL
-1 -2
2 1
-2
(^12)
0
1
2
3
4
z
For the antecedent membership functions, take triangular functions on the
domain[0,4].
0
0.2
0.4
0.6
0.8
1234
A 1 =B 1 =(0, 1 ,2),A 2 =B 2 =(1, 2 ,3),A 3 =B 3 =(2, 3 ,4)
Use the nine data points
Ifx 1 is 1 andx 2 is 1 thenyis 2 Ifx 1 is 2 andx 2 is 3 thenyis 13
Ifx 1 is 1 andx 2 is 2 thenyis 5 Ifx 1 is 3 andx 2 is 1 thenyis 10
Ifx 1 is 1 andx 2 is 3 thenyis 10 Ifx 1 is 3 andx 2 is 2 thenyis 13
Ifx 1 is 2 andx 2 is 1 thenyis 5 Ifx 1 is 3 andx 2 is 3 thenyis 18
Ifx 1 is 2 andx 2 is 2 thenyis 8
to define the antecedent functions for the nine rules
- Ifx 1 isA 1 andx 2 isB 1 ,thenyisC 1.
- Ifx 1 isA 1 andx 2 isB 2 ,thenyisC 2.
- Ifx 1 isA 1 andx 2 isB 3 ,thenyisC 3.
- Ifx 1 isA 2 andx 2 isB 1 ,thenyisC 4.
- Ifx 1 isA 2 andx 2 isB 2 ,thenyisC 5.
- Ifx 1 isA 2 andx 2 isB 3 ,thenyisC 6.
- Ifx 1 isA 3 andx 2 isB 1 ,thenyisC 7.
- Ifx 1 isA 3 andx 2 isB 2 ,thenyisC 8.
- Ifx 1 isA 3 andx 2 isB 3 ,thenyisC 9.
Use theMatlabfuzzy toolbox to view the surface. Tune the membership
functions until your surface approximatesy=x^21 +x^22 on the domain
[1,3]◊[1,3]to your satisfaction.