*International Journal of Computer Applications (0975 – 8887) *
*Volume 91 – No.10, April 2014 *

**Fuzzy Gain Scheduling of PID Controller for a **

**MIMO Process **

### N. Kanagasabai

Department of Instrumentation Engineering, Annamalai University,

Chidambaram, Tamilnadu, India

### .

### N. Jaya,

Ph. DDepartment of Instrumentation Engineering, Annamalai University,

Chidambaram, Tamilnadu, India

### .

**ABSTRACT **

This paper describes the development of a fuzzy gain scheduling scheme of PID controllers for three tank process. This paper presents the controllers for three tank multi loop system using fuzzy gain scheduling. The application of fuzzy logic controller (FLC) appears to be encouraging in the sense that it is robust in disturbance rejection under various conditions. The controller designed by FLC technique is based on the choice of Fuzzy rules and Reasoning is used to determine the controller parameters based on the error signal and its first difference. Simulation results show that better control performance can be achieved in comparison with conventional-PI controllers. The simulation result of the process is carried out by using MATLAB simulink software.

**Keywords**

FLC, three tank, multi-loop

**1. INTRODUCTION **

Most of the processes in power plants, refinery process, aircrafts and chemical industries are multivariable or multi-input multi-output (MIMO) and control of these MIMO [3]processes are more complicated than SISO processes. The methodology used to design a controller for the SISO process cannot be applied for MIMO process because of the interaction exhibits between the loops. Many methods have been presented in the literature for control of MIMO process. Proportional-integral-derivative (PID) or Proportional-Integral (PI) based controllers are used very commonly to control three tank systems. Usually two types of control schemes are available to control MIMO processes. The first is decentralized control scheme or multiloop control scheme, where single loop controllers are used (the controller matrix is a diagonal one). The second scheme is a [3] full multivariable controller known as the centralized controller. Multi loop controllers do not explicitly consider the decoupling of the inter-loop interactions unlike full multivariable controllers. The application of knowledge-based systems in process control is growing, especially in the field of fuzzy control. In fuzzy control, linguistic descriptions of human expertise in controlling a process are represented as fuzzy rules or relations. This knowledge base is used by an inference mechanism, in conjunction with some knowledge of the states of the process in order to determine control actions. Although

they do not have an apparent structure of PID controllers, fuzzy logic controllers may be considered nonlinear PID controllers whose parameters can be determined on-line based on the error signal and their time derivative or difference. In this paper, a rule-based scheme for gain scheduling of PID controllers is designed for MIMO process. The new scheme utilizes fuzzy rules and reasoning to determine the controller parameters and the PID controller generates the control signal. It is demonstrated in this paper that human expertise on PID gain scheduling can be represented in fuzzy rules. Furthermore, better control performance can be expected in the proposed method than that of the PID controllers with fixed parameters.

**2. THREE TANK PROCESS **

The three-tank system considered for study [5] is shown in Fig. 1. The controlled variables are the level of the tank h1 and tank h3. In flow of tank1 (fin1) and in flow of tank3 (fin3) are chosen as manipulated variables to control the level .The open loop response of the three tank process is shown in Fig.2. The steady state operating data of the Three-tank system is given in Table1.The material balance equation for the above three-tank [1] system is given by

###

h1 h2###

2g S1 Az1 s1 fin1 dt dh1

(1)

h3) 2g(h2 S2 AZ3 h2) 2g(h1 S2 AZ1 dt dh2

(2)

2g(h2h3)

S3 AZ3 s3 fin3 dt dh3

h3 2g S3 AZ2

(3)

Where,

[image:1.595.316.534.468.645.2]**Table 1 Steady state operating parameter **
**Three tank System **

**L**

**E**

**R **

T
h
-.

.

** **

** **

**Fig1: Schematic diagram of three tank process**

**Fig 2: Open loop Response of the three tank process **

**3. DESIGN OF PID CONTROLLER**

The transfer function of a PID controller has the following
form:
s d K s

i K p K (s) c

G (4) Where Kp, Ki, and Kd are the proportional, integral, and

derivative gains, respectively. Another useful equivalent form

of the PID controller is

s) d T s i 1/(T (1 p K (s) c

G

### (5)

Where Ti = Kp/Ki and Td = Kd / Kp. Ti and Td are known as the

integral and derivative time constants, respectively. The discrete-time equivalent expression for PID [12] control used in this paper is given as

### U (K) =

n

1

i Δe(k)

s T

d K e(i) s T i K e(k) p K

Here, u(k) is the control signal, e(k) is the error between the reference and the process output, Ts is the sampling period for

the controller, andΔe(k)Δe(k)e(k1)the parameters of the PID controllers Kp, Ki and Kd or Kp, Ti and Td can be

manipulated to produce various response curves from a given process. Finding optimum adjustments of a controller for a given process is not trivial. In the following section, an on-line gain scheduling scheme of the PID controller based on fuzzy rules is presented. The main objective of this process is to control the level of Tank1 and Tank3. The fuzzy gain scheduling scheme is designed based on the thorough knowledge of the three tank process. Also the PI controller parameters for the interacting three tank process are obtained by utilizing direct synthesis method. The controller settings for loop1 Kc1=1.24137, Ti1=1336.5 and for loop2 Kc2=1.4589,

Ti2=1315.5. The closed loop response of the three tank

process for a set point change in tank1 from its operating value of 0.7m to 1m is shown in Fig.3 and its corresponding effect of interaction in tank3. Fig 4 shows the closed loop response of tank3 for a set point change of0.3 m to1.0 from its operating value and its corresponding effect of interaction in tank1 and their values are tabulated in Table 5. In accumulation of that a load value of 0.2 m is added and subtracted in the process under the 0.7m for tank1operating point and the servo and regulatory responses are plotted in Fig 5 to 6. The servo tracking response of tank-1 is shown in Fig.7.

h1, h2, h3 in m 0.7,0.5,0.3

fin1 and fin3 in ml/sec 100

Outflow coefficient (Az1, Az2, Az3)

2.251e-5,3.057e-5,2.307e-5

Area of tank (S1-S3)inm2 0.0154

Acceleration due to gravity in

[image:2.595.46.217.501.647.2]*International Journal of Computer Applications (0975 – 8887) *
*Volume 91 – No.10, April 2014 *

**Fig3: Closed loop response of Tank 1 forConventional PI **
**controller **

**Fig4: Closed loop response of Tank 3 forConventional PI **
**controller**

**Fig** 5**: Servo and Regulatory response of Tank 1 for**
**Conventional PI controller**

**Fig** 6**: Servo and Regulatory response of Tank 3 for**
**Conventional PI controller**

**Fig** 7**: Servo trackingresponse of Tank 1forConventional **
**PI controller**

**4. FUZZYGAIN SCHEDULING **

Fig.8 shows the PID control system with a fuzzy gain scheduler. The approach taken here is to exploit fuzzy rules and reasoning to generate controller parameters. It is assumed that Kp, Kd are in prescribed ranges [Kp,min Kd, max] and [Kd.min,

Kd.max], respectively.

**Fig 8: PID control system with a fuzzy fain scheduler**

The appropriate ranges are determined experimentally and will be given in equation (12). For convenience, Kp and Kd are

normalized into the range between zero and one by the following linear transformation:

##

Kp Kp.min##

/ Kp.max Kp.min##

' p

K

Fuzzy rules andreasoning

PID controller Process Input

### +

_{- }

Control signal

[image:3.595.66.238.79.216.2] [image:3.595.329.501.81.218.2] [image:3.595.326.501.259.395.2] [image:3.595.78.253.270.409.2] [image:3.595.66.240.459.597.2] [image:3.595.294.541.542.647.2]*International Journal of Computer Applications (0975 – 8887) *
*Volume 91 – No.10, April 2014 *

##

Kd Kd.min##

/ Kd.max Kd.min##

' d

K

(6) In this scheme, PID parameters are determined based on the current error e(k) and its first difference e (k).The integral time constant is determined with reference to the derivative time constant, i.e.,

*d*
αT
i

T (7)

And the integral gain is thus obtained by

###

/###

αKd2 p K d αT / p K i

K (8)

The parameters

### K

'_{p}

### ,

### K

'_{d}and are determined by a set of fuzzy rules of the form

If e (k) is Ai and e(k) is Bi, then

' p

### K

is Ci,' d

### K

is Di, and =i

i = 1, 2…, m. (9) Here, Ai, Bi, Ci and Di are fuzzy sets on the corresponding

supporting sets: i is a constant. The membership functions

(MF) of these fuzzy sets for e (k) and e (k) are shown in Fig.9. In this figure, N represents negative, P positive, ZO approximately zero, S small, M medium, B big. Thus NM stands for negative – medium, PB for positive big, and so on. The fuzzy sets Ci and Di may be either Big or Small and are

characterized by the membership functions shown in Fig.10, where the grade of the membership functions and the variable x (=

### K

'_{p}

### or

### K

'_{d}) have the following relation:

SMALL(x) =

4μ
e
)
(μ
SMALL
x
or
x
ln
4
1 _{}

for small,

BIG(x) =

4μ
e
1
)
(μ
BIG
x
or
x)
(1
ln
4
1 _{}

for Big (10)

[image:4.595.317.531.68.221.2]

**Fig 9: Membership functions for e (k) and ****e (k). **

**Fig 10: Membership functions for K’p and K**
**’**

**d **

The fuzzy rules in (12) may be extracted from operator’s expertise. Here the rules are derived experimentally based on the step response of the process. The PID controller should have a large proportional gain, a large integral gain, and a small derivative gain. Thus the proportional gain

### (K

'p### )

canbe represented by a fuzzy set Big and the derivative gain

' d

### K

by a fuzzy set Small. The integral action is determined with reference to the derivative action as in eqn (7). For the PID controller, taking a small or a small integral time constant Ti will result in a strong integral action. Whether theintegral action should be strong or weak is determined in the scheme by comparison with the well-known synthesis tuning rule.

If

### e

### (k)

is PB and### Δ

### e

### (k)

is Zo, then### K

`_{p}is Big

### K

`_{d}is Small, and =2.

Note that may also be considered as a fuzzy number which has a singleton membership function as shown in Fig.5. For example, becomes 2 when is Small. Around point b1

expect a small control signal to avoid a large overshoot. That is, the PID controlled should have a small proportional gain, a large derivative gain, and a small integral gain. Thus the following fuzzy rule is taken

If

### e

### (k)

is ZO and### Δ

### e

### (k)

is NB, then### K

`_{p}is Small

### K

`_{d}is Big, and =5

Thus a set of rules, as shown in Table 2, may be used to adapt the proportional gain

###

### K

'_{p}

The tuning rules for

### K

`_{d}and is given in Tables 3 and 4, respectively, in the tables, B stands for Big, and S for Small.The truth value of the ith rule in (12) i

*is obtained by*

product of the MF values in the antecedent part of the rule

μ_{i}μ_{Ai}

###

e(k) .μ_{Bi}

###

Δe(k)###

(11)Where Ai is the MF value of the fuzzy [15] set Aigiven a

value of e (K), and Bithe MF value of the fuzzy set Bi given

a value of e (k). Based on i the values of

' p

### K

and### K

'_{d}for

each rule are determined from their corresponding membership functions. The implication process of a fuzzy

### 1

N B N M N S Z O P S P M P B X= e (k) and e (k)

Small Big

0 _{0}
.
2
0
.
4
0
.
6
0
.
8
1

K’p orK ’

d

### 1

*[Type a quote *

*from the *

*document or the *

*summary of an *

*interesting point. *

*You can position *

*the text box *

*anywhere in the *

*document. Use *

*the Text Box *

*Tools tab to *

*change the *

*formatting of the *

*pull quote text *

*box.] *

0 _{0.2} _{0.4} _{0.6} _{0.8} _{1}

*International Journal of Computer Applications (0975 – 8887) *
*Volume 91 – No.10, April 2014 *
[20] rule is shown in Fig. 11.By using the membership

functions in Fig.9; we have the following condition [18]:

. 1 1 iμ

*m*

*i* (12)
Then, the defuzzification yields the following:

m

1

i ,i

` d K i μ ` d K (12b) m 1 i μiai.

a (12c)

Here

### K

'_{p.i}is the value of

### K

'_{p}corresponding to the grade i

for the i the rule (see Fig. 12).

### K

'_{d.i}is obtained in the same way. Once

### K

'_{p,}

### K

'_{d,}and are obtained, the PID controller Parameters are calculated from the following equations that are due to (6) and (8)

S .Small, MS: Medium Small

[image:5.595.319.512.77.139.2]M: Medium, B:Big

[image:5.595.322.551.460.579.2]**Fig 5: Singleton membership functions for **

**Table 2 Fuzzy tuning rules for Kp’ **

min p, K ` p K ) min d. K max p. (K p

K (13a)

min d, K ` d K ) min d, K max d, (K d

K

(13b) (13c)

Based on an extensive simulation study on various processes,
a rule of thumb for determining the range of Kp* and the range *

of Kd is given as

u 0.6K maz p. K , u K 0.32 p.min

K

u T u K 0.15 max d. K , u T u 0.08K min d.

K

(14) Where Ku and Tu are, respectively, the gain and the period of

oscillation at the stability limit under P-control [19.]. Note that there are other forms for the fuzzy tuning rules in (12). Some examples are as follows:

1) If e (k) is Ai* and * e (k) is Bi, then

` p

### K

is Ci,` d

### K

is Di, and` i

### K

is Ei2) If e (k) is Ai and e (k) is B*i, then *

` p

### K

is Ci` d

### T

is Di, and` i

### K

is E3) If e (k) is Ai and e (k) is Bi* then *

u(k) Ki_{p0}e(k)(K_{i0}i T_{s})_{j}e(j)(K_{d0}i /T_{s})Δe(k)

**Table 3 fuzzy tuning rules for **

** **
** **
** e(k) **

**e(k**

### )

**NB ** **NM ** **NS ** **ZO ** **PS ** **PM ** **PB **

**NB ** B B B B B B B

**NM ** S B B B B B S

**NS ** S S B B B S S

**ZO ** S S S B S S S

**PS ** S S B B B S S

**PM ** S B B B B B S

PB B B B B B B B

**e(k) **

**NB ** **NM ** **NS ** **ZO ** **PS ** **PM ** **PB **

**e(k) **

**NB ** S S S S S S S

**NM ** B B S S S B B

**NS ** B B B S B B B

**ZO ** B B B B B B B

**PS ** B B B S B B B

**PM ** B B S S S B B

**PB ** S S S S S S S

). d K ( / 2 p (K i

[image:5.595.48.271.588.706.2]**Table 4 fuzzy tuning rules for kd’**

**Fig12: Implication process of a fuzzy rule **

Where Kipo, Kii0, Kid0 are constant. Although these rules have

different forms, they are equivalent to each other under certain conditions. It seems relatively easier to set the fuzzy tuning rules by (11). The fuzzy gain scheduling scheme has been tested on a variety of processes. The multi loop fuzzy gain scheduling PID controller parameters of the process calculated as follows. First the error and its first difference are calculated from the sampled process output. Then the values of K’p and K’d for each rule are determined by the fuzzy

reasoning process, as shown in Fig. 6. Finally, the PID parameters are obtained by using equation (12), (13) and (14).

**5. SIMULATION RESULTS AND**

** DISCUSSIONS **

The performances of the two controllers are evaluated using performance indices namely settling time (ts), Integral Square

error (ISE) and Integral Absolute Error (IAE). The closed loop response of the three tank process for a set point change in tank1 from its operating value of 0.7m to 1m is shown in Fig.13 and its corresponding effect of interaction in tank3.Fig 14 shows the closed loop response of tank3 for a set point change of 0.3 m to1.0 m. from its operating value and its corresponding effect of interaction in tank1 and their values are tabulated in Table 5.With same operating conditions, a simulations runs are carried out for direct synthesis based three tank process for comparative study. The performance indices are calculated in terms of settling time, Integral Square Error (ISE) and Integral Absolute Error (IAE) and values are charted in Table 5. From the table it is observed that intelligent fuzzy control system gives satisfactory performance than the PI controller. In accumulation of that a load value of 0.2 m is added in the process under the 0.7m for tank1operating point and the servo and regulatory responses are plotted in Fig 15 to 16. The servo tracking response of tank-1 is shown in Fig.17. The performance indices are calculated in terms of settling time, Integral Square Error (ISE) and Integral Absolute Error (IAE) and values are charted in Table 5. From the table it is observed that fuzzy gain scheduling control system gives satisfactory performance than the PI controller and clearly indicates that the control augmented the control system is considerably reduced the effect of load disturbance in the process variable compared to the PI controller.

**Fig13: Closed loop response of Tank1 for**
**Fuzzy logic controller**

**Fig14: Closed loop response of Tank3 for**
**Fuzzy logic controller **

**e(k) **

**NB ** **NM ** **NS ** **ZO ** **PS ** **PM ** **PB **

**e(k***) *

**NB ** 2 2 2 2 2 2 2

**NM ** 3 3 2 2 2 3 3

**NS ** 4 3 3 2 3 3 4

**ZO ** 5 4 3 3 3 4 5

**PS ** 4 3 3 2 3 3 4

**PM ** 3 3 2 2 2 3 3

**PB ** 2 2 2 2 2 2 2

Ai

e(k )

e

Ai

i

K'

p, j K'p

Bi

Bi

[image:6.595.341.510.525.660.2] [image:6.595.81.248.542.674.2]*International Journal of Computer Applications (0975 – 8887) *
*Volume 91 – No.10, April 2014 *

**Fig15: Servo and regulatory response of **
**Tank1forFuzzy logic controller **

**Fig16: Servo and regulatory response of Tank3 for**
**Fuzzy logic controller **

**Fig17: Servo tracking response of Tank1 for**
**Fuzzy logic controller **

**Table 5 Performance evaluation of the controller**

**Types of **
**controllers**

**Controllers parameters **

**Loop - 1 ** **Loop – 2 **

**TS **

**(sec) ** **ISE ** **IAE **

**TS **

**(sec) ** **ISE ** **IAE **

**Fuzzy PID **

**Controller ** 0.12 0.0004912 0.00423 0.1 2.047e-11 8.118e-007

**Convention**
**al - PI **
**Controller **

**6. CONCLUSION **

In this paper Multi-loop fuzzy gain scheduling controller is designed for three tank process and compared with the controller designed by Synthesis tuning method through simulation The proposed gain scheduling scheme uses fuzzy rules and reasoning to calculate the PID controller parameters. Human knowledge and experience in control system design is exploited in the tuning of a PID controller. The scheme has been tested on various set points in simulation, and satisfactory results are obtained. The result of the fuzzy gain scheduling control is analyzed and clearly shows that potential advantages using fuzzy control for a three tank process. The control strategies have a good set point tracking without any offset with reasonable settling time. The comparison of above these controllers, reveals that fuzzy gain scheduling control is superior resulting in smoother controller output without oscillations which would increase the actuator life.

**7. ACKNOWLEDGEMENTS **

The author(s) wish to thank Prof. Dr.S.P.Natarajan, Head of the Department of Instrumentation Engineering, and Annamalai University, India for his kind permission to carry out this Research work.

**8**

### .

**REFERENCES **

[1] S.Abraham Lincon., D.Sivakumar. J.Prakash. State and Fault Parameter Estimation Applied to Three-Tank Bench Mark Relying On Augmented State Kalman Filter., ICGSTACSE Journal, Volume 7, Issue 1, May 2007.

[2] M. Zhaung and D.P. Atherton (1994), “PID controller design for TITO system,” IEEP processes control Theory Appl., Vol. 141 no.2pp 111-120.

[3] S. Skogestad ,I. Postlehwaite (1996 ), “Multivariable Feedback Control Analysis and Design ,” John Wiley & Sons Chichester

[4] K Astrom and T. Hagglund (1995), “PID Controllers: Theory Design and Tuning,” Instrument Society of America, 2nd Edition.

[5] L. Kovács: Classical and Modern Multivariable Control Designing Methods of the Three Tank System, Periodica Politechnica–Transactions on Automatic Control and Computer Science, Vol. 48/62, 2003, pp. 80-86.

[6] J. J. Buckley and H. Ying. Fuzzy controller theory: Limit theorems for linear fuzzy control rules. Automatica, 25(3):469–472, March 1989.

[7] K.L. Anderson, G.L. Blankenship, and L. G. Lebow, “A rule-based adaptive PID controller,” in Proc. 27th IEEE Conf. Decision, Control, 1988, pp. 564-569.

[8] P. J. Gawthrop and P.E. Nomikos, “Automatic tuning of commercial PID controllers for single-loop and multiloop applications,” IEEE Control Syst. Mag. Vol. 10, pp. 34-42, 1990.

[9] J. Gertler and H.S. Chang. “An instability indicator for expert control,” IEEE Control Syst. Mag., vol.6, pp. 14-17, 1986.

[10]C.C. Hang, “The choice of controller zeros,” IEEE Control Syst. Mag., vol.9, pp. 72-75, 1989. [11]C.C. Hang, K. J. Astrom, and W. K. Ho, “Refinements of

the Ziegler – Nichols tuning formula,” Proc. IEE, Pt. D., vol. 138, pp. 111-118, 1991.

[12]T. Iwasaki and A. Morita, “Fuzzy atuo tuning for PID controller with model classification,” in Proc. NAFIPS’ 90 Toronto, Canada, June 6-8, 1990, pp. 90-93.

[13]T. Kitamori, “A method of control system design based upon partial knowledge about controlled processes,” Trans. SICE Japan, vol.15. pp. 549-555, 1979 (in Japanese).

[14]B.C. Kuo, Automatic Control Systems, 5th ed. Englewood Cliffs, NJ: Prentice-Hall, 1987.

[15]C.C. Lee, “Fuzzy logic in control system: Fuzzy logic controller, Part I,” IEEE Trans. Systs., Man, Cybern, vol. SMC-20, pp. 404-418, 1990.

[16]“Fuzzy logic in control systems: Fuzzy logic controller, Part II,” IEEE Trans. Syst. Man. Cybern., vol. SMC-20, pp. 419-435. 1990.

[17]C.G. Nesler, “Experiences in applying adaptive control to thermal processes in buildings,” in Proc. Amer. Control Conf. Boston, MA, 1985. Pp. 1535-1540. [18]T.J. Procyk and E.H. Mamdani, “A linguistic self

organizing process controller,” Automatica, vol, 15, pp. 15-30, 1979.

[19]M. Sugeno, ed., Industrial Applications of Fuzzy Control. Amsterdam, The Netherlands: North-Holland, 1985.

[20]T. Takagi and M. Sugeno, “Fuzzy identification of systems and its applications to modeling and control,” IEEE Trans. Syst. Man. Cybern., vol. SMC-15, pp. 116-132, 1985.