**3.3. Rule base**

264 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 1

The membership functions of input variables PH and output variable percentage opening shown in figures 23, 24 and 25 respectively. μi is the membership function of output. In the

*3.2.3. Output* 

Fullyopen = 100% opening

current work the triangular membership is chosen.

**Figure 23.** membership Function of input of PH

**Figure 24.** Membership Function of set point (input2)

**Figure 25.** Membership Function of output pH

 3Q = 75% opening M = 50% opening Q = 25% opening Fullyclose =0% opening

Rule base stores the different rules that are to be fired or used according to the inputs. These rules are either gathered from experienced human operator or from careful study of existing PH systems. The base represents the control strategy employed in the PH control.


**Figure 26.** Fuzzy rule

The rules used have been designed based on the expertise. Those rules are carefully chosen to make the system as accurate as possible. They have been entered through the MATLAB editor. After rigoreous testing and trial, near optimum rules have been obtained. Table above gives the set of fuzzy action rules related to the application in hand.
