You are on page 1of 6

WM-5-4

Adaptive Fuzzy-Neuro Control with Application to a Water Bath Process

+Marzuki Khalid, ttSigeru Omatu, and +Rubiyah Yusof

+ Faculty of Elect Eng.


Universiti Teknologi Malaysia Jalan Semarak, 54100 Kuala Lumpur , Malaysia.

f+

Dept of Information Science and Intelligent Systems Faculty of Engineering University of Tokushima Tokushima 770, Japan.

ABSTRACT Recently, the emergence of artificial neural networks has made it conducive to integrate fuzzy logic controllers and neural models for the development of adaptive fuzzy control systems. In this paper, we proposed an adaptive fuzzy-neud control scheme by integrating two neural network models with a basic fuzzy logic controller. Using the backpropagation algorithm, the first neural network is trained as a plant emulator and the second neural network is used as a compensator for the basic fuzzy controller to improve its performance on-line. The function of the neural network plant emulator is to provide the correct error signal at the output of the neural fuzzy compensator without the need for any mathematical modeling of the plant. The difficulty of fine-tuning the scale factors and formulating the correct control rules in a basic fuzzy controller may be reduced using the proposed scheme. The scheme is applied to the temperature control of a water bath process. The perforinance of the adaptive fuzzy-neural controller is compared to the basic fuzzy logic controller and a conventional digital-PI controller under identical conditions of varying complexities in the process. The experimental results show that the adaptive fuzzy-neural control scheme is superior in performance than the other two controllers.

KEY WORDSFuzzy logic control, neural networks,


adaptive, water bath, real-time, perfonnance comparison. INTRODUCTION The idea of applying fuzzy logic to control systems was first conceived hy Maindani and his colleagues 3-6. Based on Zadehs fuzzy set theory 1.2, and the simple conventional proportional-plus-integral-plus-derivative (PID)controller, Mamdani and Assilian ~4 developed what is now referred to ;IS the basic fuzzy logic controller, which is used to regulate the outputs of a process around 3 given set-point using a digital computer. Due to the limitations of memory space and speed of the sequential Von N e u m n computers, fuzzy logic controllers were not very popular in the beginning and much of their applications centred around slow varying processes. Some of the earlier applications of fuzzy logic to process control can be found in Mamdani and Tong x. There are a nuinher of advantages of applying fuzzy logic to the control of industrial processes over traditional controllers. Perhaps one of the main advantages of applying fuzzy logic control is that a controller can be developed along linguistic lines which has close associations with the field of artificial intelligence (AI). One of the aims of AI is to replxe human beings carrying out precise tasks by machines and hence the link between AI and control theory is strong. The fuzzy controller consists of a set of linguistic conditional Statements or rules (referred to fuzzy association matrix rules or FAM rules) which define the individual control situations. These linguistic conditional statements can he easily developed from coininon sense or from engineering judgement of the process to he controlled. Many industrial processes are difficult to be controlled accurately and it has been claimed that fuzzy logic control can deal successfully with such processes which are usually multivariable, inherently nonlinear, and time-varying in nature. In addition, the fuzzy logic controller can also deal with ill-defined
=

systems of unknown dynamics as they do not require a priori mathematical model of the plant for implementation, as required by many traditional adaptive controllers. Another advantage is that fuzzy logic controllers can now be feasibly implemented in digital 9 or analog lo VLSI circuitry where sampled information can be encoded in a paralleldistributed framework. In contrast to the above advantages of fuzzy logic controllers, there are a number of problems in their development. The fuzzy logic controller consists of three scale factors which have to be selected or tuned in prior for its satisfactory operation. The selection of these scale factors is akin to the tuning of a PID-controller parmeters. The width and overlap of the contiguous membership functions of the fuzzy variables also has some effect on the performance of the fuzzy controller. Although the fuzzy conditional statements or rules can he formulated based on empirical knowledge of the process, it is not always easy to select the best set of rules that would make the controller operate satisfactorily for all kinds of conditions. For example, it would he iinpossihle to formulate a set of rules to accommodate unknown load disturhances that would occur during operation of the process. In addition it is also difficult to configure the correct consequents of each of the fuzzy rules forinulated for satisfactory operation, especially those around the steady-state rule. In order to overcome such prohlems, there has been considerable research efforts in developing what is known as adaptive fuzzy logic controllers. One of the first such efforts was the development of the self-organizing fuzzy logic control system of Procyk and Mamdani I I . In this system, the FAM rules can he composed and decomposed based on a mathematical model of the plant. Some other developments of adaptive fuzzy control systems in the past decade can k found in 12-14. Recently, the emergence of artificial neural networks has made it conducive to integrate fuzzy logic controllers and neural models for the development of adaptive fuzzy control systems. Neural networks are trainahle dynamical systems that estimate input-output functions. Their key advantage is their ahility to learn and generalize. The integration of fuzzy and neural models is currently one of the most concentrated research effforts in the development of intelligent control systems. Some of the adaptive fuzzy-neural networks control systems that have been proposed recently with varying complexity can he found in In this paper we present another approach of integrating neural networks into a fuzzy logic control system. The difficulty of fine-tuning the scale factors and formulating the correct control rules in a hasic fuzzy controller may he reduced using the proposed scheme. In this approach the learning and generalization capability of the neural networks is used to compensate on-line for any unsatisfactory performance of the basic fuzzy controller using the back-error propagation algorithm Is. The scheme is applied to the temperature control of a water bath process. We show through simulations how the neural networks improve the perfonnance of a poorly tuned hasic fuzzy controller. Experiments are then conducted on the real-time water bath process. The perfonnance of the adaptive fuzzy-neural controller is compared to a conventiocal digital-PI

0-7803-1872-2/94/$4.00 1994 IEEE 0

173

controller and the hasic fuzzy controller under identical conditions of varying complexities in the process.

where 0 and S denote the outputs and inputs of a neuron, respectively. and i denotes the input layer. Using chain rule,
6;=
.-

ADAPTIVE FUZZY-NEURAL CONTROL SCHEME The adaptive fuzzy-neural control scheme consists of two multilayered neural network models configured in the architecture as shown in Fig. 1. The first neural network is a plant emulator and the second neural network is used as a compensator to improve the performance of the basic fuzzy logic controller. The developmenr of this system consists of three phases. The first phase is developing a basic fuzzy logic controller for the The second phase invgilves training a neural network model the forward dynamics of the plant to be controlled. T ~ K training of this neural plant emulator can be done off-line as well as on-line depending on the type of plant For fast-acting plants. such as robotic-manipulators o r servo-inotors. it is possihle to train the neural nerwork to emulate the plant in an on-line way. However. if the plant is a slowly varying process, the neural plant einulator needs to he trained off-line 3s convergence Is rather slow. The function of the neural network plant emulator is to provide the correct error signal at the output of the neural fuzzy compensator without the need for any mathematical inodeling of the plant. The Lhird phase involves on-line learning of the neural fuzzy compensator. The perfonnance error which is the error between the desired output and the actual plant output is hackpropagated through the neural plant elnulator to adapt the weights of the neural fuzzy compensator on-line. The performance of the neural plant emulator can be further improved on-line by backpropagation of the error between the neural plant emulator and the actual plant output. Learning of the Neural Fumy Compensator The function of the neural fuzzy compensator is to coinpensate for any unsatisfactorq performance of the basic fuzzy controller. The model structure of the neural fuzzy compensator is similar to the neural plant einulator which has one layer of hidden neurons The hidden layer neurons have sigmoid functions and the rest of the neurons in the input and output layers have linear functions. The neural fuzzy compensator is trained in an on-line way by backpropagation c?f the performance error through the neural plant emulator. The h m z d propagation of the neural fuzzy compensator is similar to the forward propagation of a single neural network and this can he referred to in iy. In this section, the learning algorithm of the neural fuzzy compensator is derived in the following way. The weights of the neural fuzzy coinpensator between the hidden and output layers are adapted using the perfonnance error Er as follows aEP aEP
A W ~a ,

asp aof
'

3s; aEp (5)

and where ;8 is the error signal between the input and hidden layers of the neural plant emulator19. Hence, the error signal of the neural fuzzy compensator hetween the hidden and output layers is

The error signal between the hidden and output layers of the neural fuzzy emulator is derived as follows

where hence

f (SIC)

o;[l - 0;)
U ; , '

2 = 5 ;

04 1 - 0;)

(9)

In this scheme. the weights of the neural plant emulator are not kept constant but are further iinproved on-line. This is done by backpropagation of the following error equation at every sample where yo and 7 are the outputs of the actual plant and emulator, respectively

- -r) = '%J awiJ

where c denotes the neural fuzzy compensator and p denotes the neural plant emulator, and yr and yo are the desired and actual plant outputs, respectively. Using chain rule, the error signal of the neural fuzzy compensator between the hidden and output layers may be- derived as follows
=&

a%,
where

(3

where Si is the input to the output layer neuron of the neural fuzzy compensator. As the input and output neurons of the neural fuzzy Compensator and neural plant emulator are linear functions, thus

DESCRIPTION OF THE WATER BATH TEMPERATURE CONTROL SYSTEM The proposed scheme is applied to a water hath temperature control system which is an example of an important component in batch reactor processes. A schematic diagram of the the experimental setup is shown in Fig. 2. A Yamato Science Inc. laboratory water bath (BT-15 model) is the main component of this temperature control system. The system c n be divided into five main components: (i) a the water bath, (ii) the sensor module, (iii) the programmable input-output (PIO) interface board, (iv) the microcomputer, and (v) the actuator. A brief description of the five components follows. The capacity of the water bath is 8 litres with dimension 250x290~100 (mm3). The water bath is heated by a 600W base heater which is connected to a thyristor (SI6G12S12) circuit. To ensure even temperature distribution, a stirrer is used which can rotate at 120 rpm. The sensor module has heen developed using diodes (lS1588) and high gain amplifiers (A741). It consists of 3 two step amplification circuit and can transform the measured temperature over the range of 0 "C to 100 O C into the corresponding voltage range of 0 volt to 10 volt with a resolution of 0.24 OC. The PI0 interface circuit bovd consists of an analog-todigital ( A D ) converter, a digital-to-analog (DIA) converter and a programmable peripheral interface device (PD8255A). An external clock is designed to operate the AID and D/A converters. The clock circuit is designed using crystal oscillator and JK flip flops. The microcomputer used in this experiiuent is the NEC PC 9801F having an Intel 8086 16-bit CPU with a 10

174

MHz clock speed. A simple control routine is written using Microsoft-C to provide the control input to the actuator through the D/A and also to measure the output temperature. i A thyristor (S16G12S-12) is used x an actuator for the heater and is switched on and off according to the following constraints where u(kT) is the output of the neural controller, T , is the sampling interval, k is the sampling number (kd.1.2.3 ...1 and Vi is the input voltage to the actuator:
if u(kT)s 0.0, then Vi-0.0 volt. heater off if u ( k T k 5 . 0 . then Vi-5.0 volts. heater on and if O.O<u(kT)<5.0. thenVi-u(kT) volts. heater on

REAL-TIME EXPERIMENTS AND COMPARISON WITH A PI-CONTROLLER The proposed adaptive fuzzy-neural control scheme is implemented in real-time for the temperature regulation of the water bath process of Fig. 2. The neural water bath plant emulator was developed off-line in a similar way as was done in the simulation case and the neunl fuzzy coinpensator l e m s in an autonomous way on-line. The basic fuzzy logic controller was configured using the FAM rules of Fig. 3 and the membership functions of Fig. 4. To measure the degree of reliability of the adaptive fuzzy-neural control scheme, we conducted several experiments on the water bath process and compared its performance with that of the basic fuzzy logic control and a conventional discrete-time PI-control schemes. The following velocity-form discrete-PI algorithm was used

where Au(t) is the increment of the control input, e([) is the performance error, & is the controller gain or proponional band (PB), and Ti is the integral or reset time. The tuning method of Takahashi et. al. 2B was used in the experiments to tune the PI-controller. Four groups of experiments were conducted for each of the three control schemes. Each experiment was conducted over 100 samples using a sampling time of 30 seconds which resulted in a 50-minute duration. The first set of experiments was conducted to observe how well each control scheme perfonned in tracking changes in the system set-points. The PIcontmllefs best performance was observed as shown in Fig. 5-a, when the parameters were finetuned to 2.3 and 80 seconds for & and Ti, respectively. For the basic fuzzy logic controller, after some trial and error of tuning the scale factors, the system's hest performance was observed as shown in Fig. 5-h when the scaling factors were selected as follows: GM.16,GC4.83, and GU4.20. The performance of the adaptive fuzzy-neural control system is shown as in Fig. 5-c. It was also observed that the performance of the basic fuzzy controller deteriorated when Jtrong consequents were chosen in the rules database, especially, those around the steady-state FAM rule. However, in the adaptive fuzzy-neural control system, a wrong choice in the consequents of some of the rules did not impair its performance drastically. As expected, the PI-controller performed well for one operating point, i.e., in this case the upper setpoint but deteriorates at another (lower setpoint). On the whole, it can be observed that the adaptive fuzzy-neural control scheme performed better than the other two control schemes in tracking the set-points. In many practical applications, load disturbances occur unexpectedly and thus affected system's performance on-line. The second set of experiments was carried out with the purpose of studying the ability of the controllers in rejecting unwanted load disturbances. In order to make identical comparisons among the controllers, impulse load disturbances of values 4.0 O C and 2.0 Dc were added to the process output a the 53rd and t 75th sampling instants, respectively. A set-point of 50 O was C given in these experiments. The same scale factors and controller parameters were used for the three control schemes as in the first set of experiments. The effects of the load disturbances using the three schemes are shown as in Fig. 6 a-c. For clarity, only the performances of the systems at the sampling period of interest are shown in the figures.

It can be observed all the three systems were affected after the first disturbance as the disturbance was rather large in magnitude and, in addition. it happened drastically and unpredictahly. However, it can be ohserved that the adaptive fuzzy-neural controller reacted much quickly in rejecting the disturbance than the hasic fuzzy logic controller. The neural fuzzy compensator is able to reduce the larger offset produced by the basic fuzzy controller. The basic fuzzy controller cannot cope with the large load disturbance as such unpredictable disturbance cannot be incorporated into the fixed fuzzy control rules. However, both the adaptive fuzzy-neural controller and the basic fuzzy controller were able to overcome the smaller magnitude disturbance. Urlike the two controllers, the performance of the PI-controller was affected badly during both occasions as it is rather slow and cannot adjust quickly and automatically in rejecting unpredictable load disturbances. One inherent characteristic of many process control systems is that their parameters tend to change in an unpredictable way. To test the robustness of the controllers. a value of 0.8u(k-2) was added to the process output after the 60th sample in each of the experiments, which represents a change in the process parameters. It is seen that these changes in dynamics are large and although it is difficult to imagine a real plant behaving in such a drastic way in practice, the experiments were conducted to illustrate the relative rohustness and adaptivity of the algorithms. The hehaviours of the controllers under this influence are shown in Fig. 7 a-c. As expected, the PI-controller behaved worst. Despite the integral action, offset is seen at the plant output due to persistent control saturation. However, the integral action did help in removing the offset eventually. Both the adaptive fuzzyneural controller and the hasic fuzzy logic controller showed considerahle robustness as they were still able to track the setpoints even when there was a large change in the plant dynamics. Unlike the load disturbance, this change in plant dynamics is not as drastic. The basic fuzzy controller is able to transform information regarding the process error and rate of change of error into the appropriate control actions which resulted in little fluctuations at its output. However, it can be observed that the adaptive fuzzy-neural control system was able to improve its performance with time through learning. We conducted a final experiment to test the controllers performance when the deadtime of the process changed. In the fourth set of experiments, anificial time delays of 1 sample between 01kS30, and 2 samples between 30ckS100 were introduced in the control loop in addition to the original one sample deadtime of the plant. In these experiments two setpoints were given as 35 OC between % e 3 0 and 55 OC between 3odLl00 and only the deadtime of the plant between WS30 was assumed known in prior. The PIcontroller was re-tuned where K, and Ti were increased to 3.0 and 100 seconds, respectively. The scaling factors of the basic fuzzy controller were re-scaled where GE=O.ll, GC=0.70 but GU remained the same. The performances of the controllen on the process with a variable deadtime are shown as in Fig. 8 a-c. It c m be observed that the adaptive fuzzy-neural controller performed best and the on-line learning of the neural fuzzy compensator help to improve the system performance with time. The basic fuzzy logic controller also performed satisfactorily as the nonlinear defuzzification algorithm help to reduce overshoots in the system. The PIcontroller performed poorly during the second set-point as its output oscillated adversely. This is because the tuning method used relies on the plant's deadtime and its open loop step response.

CONCLUSIONS An adaptive fuzzy-neural control scheme has been proposed where two neunl networks are integrated with a basic fuzzy controller. The first neural network is trained to emulate the plant to be controlled and the second neural network is used as a compensator for the basic fuzzy logic controller. The function of the n e u d p h t emulator is to allow a more accurate method of backpropagating the performance error to get the equivalent error at the output of the neural fuzzy compensator without the need for any mathematical modeling of the plant. The neural fuzzy compensator can be used to compensate for unsatisfactory performance of the basic fuzzy logic controller.

175

It is a fact that there a nuinkr ot parameters that have to he tuned and selected correctly before the basic fuzzy logic controller can perform satisfactorily which are difficult and laborious. The performance of the system can be improved even when the width and overlap of the inemhership functions are incorrectly configured, the scale factors poorly tuned, and some of the FAM rules consequents are wrongly chosen (see 1 9 ) . In this paper, we have also applied the proposed scheme for the teinpenture regulation of a real-time water bath process. The adaptive fuzzy-neural controller w s compand to the basic fuzzy logic controller and the conventional PI-controller under idt+mtical conditions of varying complexities in the process. The experimental results show thar the adaptive fuzzy-neural water bath system performed better than the other two systems. The adaptive learning and generalization capability of the neural networks help to compensate and iinprove the performance of the basic fuzzy logic controller on-line.

REFERENCES Zadeh L.A. Fuzzy sets. I n f o m u t i o n utrd Conrrol. 8 . 338I 352 (1965). Zadeh L.A. Outline to anew approach to the analysis 2 complex systems and decision processes. I Trans on Sys. Man and Cybernerics. SMC-3 28-44 (1973). Mamdani E.H. Applications of fuzzy algorithms for a 3 simple dynamic plant. Proc. I. 121 (12). 1585-1588 ( 1973). 4 Mamdani E.H. and Assilian S . An experiment in linguistic synthesis with a fuzzy logic controller. Itit. J. of Man Muclr. Studies. 7 ( I ) 1-13 (1975). Mamdani E.H. Advances in the linguistic synthesis of 5 fuzzy controllers. ZE Truns Computer. C-26 (12). 1182-1 191. (1 977). Kine P.J. and Mamdani E.H. The anolication of fuzzy 6 conGol systems to industrial processks. Auromurica. I j ( 3 ) .235-242 (1977). Mamdani E.H. Application of fuzzy set theory to control 7 systems: a survey. Fuzzy Autonirrtn u r d Decisioti Proceses (Gupta M.M., Sardis G.N.. and Gaines B.R.. Eds.) Amsterdam: North-Holl~d. (1977). Tong R. M. A control engineering review o f fuzzy 8 systems. Aurumnticu. 13 ( 6 ) .559-569 (1977). 9 Togai M. and Watanabe H. Expert system on a chip: an engine for real-time approximate reasoning. I Expen. 1 (3).55-62 ( I 986). IO Yainakawa T. Fuzzy microprocessors - le chip and defuzzificalion chip. Proc. o Inrl. Workshop on Fuzcy f qstenrs A~pricuiions..lizuka-88. Japan. 51-52 (1988). I1 Procyk T.J. and Maindani E.H. A linguistic selforganizing process controller. Auromuticu. 15 (1) 15-30 (1979). 12 Daley S. and Gill K. F. A design study of a selforganising fuzzy logic controller. Proc. I. Mecli ,. 200 (CI). 59-69 (1986). 13 Lee C. C. Fuzzy logic in control systems: fuzzy logic controller - P y t I. I E E E Tiuns. on Sysrems. Man, and 18 Cybernetics. 20 (2).404-4 ( 1990). 14 Lee C. C. Fuzzy logic in control systems: fuzzy logic controller - Part 11. I Truns. on Systems, Man. and Cybernerics. 20 ( 2 ) .419-435 (1990). IS Moore C.G. and Harris C. J. Indirect adaptive fuzzy control. h f . 1.Control. M (2). 441-468 (1992). 16 Kong S.G.and Kosko B. Adaptive fuzzy systems for backing up a truck-and-trailer. I Truns on Neurul Nenvorks.3(2).211-223(1992). 17 Berenji H. R. and Khedkar P. Laming and tuning fuzzy logic controllers through reinforcements. IE Tram. on NeuruI Nenvorks. 3 (5!. 724-740 (1992). 18 Rumelhart D.E., Hinton G.E. and Williams R.J. Learning internal representations by error propagation. in Purullel Disrribufcd Processing: Explorutiotis iti the Microsrrucrure of Cognitioii Vol.I , MIT Press, Cambridge, MA. 318-362 (1986). 19. Khalid M., Omatu S., and Yusof R. Adaptive fuzzy control of a water bath process with neural networks. Int. Journal of Eng. Appl. of Ai, 7 (1). pp. 39-52, 1994. 20. Takahashi Y . , Chan C.S. and Auslander D.M. Parametereinstellung bei Linearen DDC-Algorithmen. Regelungsfechnik und Prozep- Dutenverarbeirung. 19 237-244, (1971).

176

MARLUKI K H A U D c t d : FUZZY CONTROL OF A W A E R BAT14 PROCLSS

YQ

\
PL

NL

NM

NS

Error, e ZE PS

PM

PL

- 7

I
StiW

PM
0

NL
h g . 3. A FAM hank matrix for thc tcmpcraturc control id walcr h l h
system. Thc anteccdcntsare the error and thc riltc of changc of error. and the consequent of each rule is given i n the box.

-3

...

4
NM

-3

NL

NS

7Z

PS

PM

PL

. 3

-2

-1

Fig.+. Configuration o thc luny sct valucs for error (e). rate of change of crror (c). and change In control input ( U ) Thc overlap and width o f f fuuy subsets arc heunstically configured. Minor adjustment to each f u u y subsct 1s done hy trial and error for thc best pcrformancc

177

:-???E
0 0 0 0

0 OI

0 J

178