A fuzzy logic controller

A fuzzy logic controller

Journal of Biotechnology, 24 (1992) 1-32 1 © 1992 Elsevier Science Publishers B.V. All rights reserved 0168-1656/82/$05.00 BIOTEC 00755 A fuzzy lo...

1MB Sizes 3 Downloads 102 Views

Journal of Biotechnology, 24 (1992) 1-32

1

© 1992 Elsevier Science Publishers B.V. All rights reserved 0168-1656/82/$05.00

BIOTEC 00755

A fuzzy logic controller Takeshi Yamakawa * Department of Computer Science and Control Engineering, Kyushu Institute of Technology, lizuka, Fukuoka, Japan (Received 28 January 1991; revision accepted 5 September 1991)

Summary

This paper describes a fuzzy sets method which is very useful for handling uncertainties and essential for knowledge acquisition of a human expert. Kinetics of a reactor is often complex and not trivial to describe by mathematical equations. Reactor control by traditional control technology is therefore difficult. A novel technology is presented. In the following a fuzzy inference (approximate reasoning) is used for decision making in analogy to human thinking, facilitating a more sophisticated control. Readers of this paper do not need any advanced mathematics beyond the four basic operations in arithmetic ( + , - , x , - ) and using the maximum and minimum values. This fuzzy inference is introduced to construct a fuzzy logic controller which is suitable for a nonlinear, multivariable and time variant system applied to a bioreactor. Correspondence to: Takeshi Yamakawa, Department of Computer Science and Control Engineering, Kyushu Institute of Technology, Iizuka, Fukuoka 820, Japan. * The author is also the chairman of a new foundation in Japan, Fuzzy Logic Systems Institute (FLSI), 820-1 Yokota, Iizuka, Fukuoka 820, Japan. Abbreviations: C, crispness index; F, fuzziness index; n, control index; C.G., center of gravity; NL, negative large; NM, negative medium; NS, negative small; ZR, approximately zero; PS, positive small; PM, positive medium; PL, positive large; S, small; M, medium; L, large; /ZvH(T) , p.H(T), /ZNH(T) , membership functions of 'very high temperature', 'high temperature' and 'not high temperature';/x(x), ~ membership function; /Xs(X), /~z(X), /zu(x) , /xn(x) , membership functions of S-shape, Z-shape, U-shape and H-shape; x, base variable; W, bandwidth of membership function; a, a center of membership function; a, b, c, d, parameters characterizing a trapezoidal membership function; A1, A 2 . . . . . At, fuzzy linguistic values of antecedents; Bx, B 2..... Br, fuzzy linguistic values of consequents; Pi, signal input from ith input terminal of an artificial neuron; wij, weight assigned to the signal input Pi to the jth cell; 0j, qj, a threshold level and a signal output of the jth cell; h(x), a sigmoid function of a neuron model; N/, the number of labels assigned in ith variable in an antecedent; Mj, the number of labels assigned in jth variable in a consequent; I, O, the number of variables in antecedent and consequent; R, Q, the number of possible rules and combination of rules; re(t), the output of the controller; e(t), an actuating error; Kp, a proportional sensitivity; KI, KD, adjustable constants; ki, k 2..... kn, coefficients of linear combination.

2 Fuzzy set; Membership function; Compatibility; Knowledge acquisition; Summarization; Interpolative inference; Base variable; Fuzzy logic controller

Introduction

Human beings make tools for their use and also think to control the tools as they desire. A feedback concept is a very important concept to achieve the control of the tools. The oldest application of a feedback concept was a float regulation in an oil lamp for maintaining a constant level of fuel oil which was devised by Philon in approximately 250 B.C. The first significant work in feedback application was James Watt's flyball governor developed in 1769 for controlling the speed of a steam engine. As modern plants with many inputs and outputs become more and more complex, the description of a modern control system requires a large number of equations. Classical control theory, which deals only with single-input-singleoutput systems, becomes entirely powerless for multiple-input-multiple-output systems. Since about 1960, modern control theory has been developed to cope with the increased complexity of modern plants and the stringent requirements on accuracy, size, and costs in military, space, and industrial applications. The most recent developments in modern control theory may be said to be in the direction of the optimal control of both deterministic and stochastic systems as well as the adaptive and learning control of time-variant complex systems. These developments have been accelerated by a digital computer, because it facilitates the solution of simultaneous equations with many unknowns. Modern plants are designed for efficient analysis and production by human beings. We are now confronted by a control of living cells, which are nonlinear, complex, time-variant and "mysterious". They cannot easily be mastered by classical or control theory and even modern artificial intelligence (AI) employing a powerful digital computer. These are the reasons for developing new strategies as presented in the following. (1) A mechanism of the reaction is very complicated and is not known well (includes uncertainty). Quality of raw materials and environment vary in each case. Furthermore characteristics of the biomass change with time, so that the biochemical reaction cannot be easily described by mathematical equations. (2) Only rough-and-ready information can be obtained, if it is achieved at all, because sensors of high accuracy have not yet been developed nor is the environment convenient to detect the information. (3) It is impossible to sense the reaction in the cells directly, nor is it possible to actuate the cell directly. Thus control of a bioreactor is an indirect control. Therefore we have to develop another control technology suitable for biochemistry. It is easy to face a human expert who has a variety of know-how and skills extracted from many experiences over a long period and can control the biochemical plants adequately. In order to simulate the human expert, it is necessary to

represent intuition and uncertainty in the know-how and skills. These cannot be included in probability but fuzziness. Probability is based on the estimation of the degree at which the event will easily occur, before the occurrence and is characterized by a probability density function. Thus the probability is meaningless after the occurrence. On the other hand, intuition such as 'she is beautiful', 'it is so hot', etc. includes another type of ambiguity which cannot be clear after the occurrence and depends upon the person. This can be included in fuzzy sets (strictly speaking, fuzzy subsets) and characterized by what is called a membership function. The concept of fuzzy sets was presented by Z a d e h (1965). Fuzzy inference (approximate reasoning) is a simulation of decision making of the human expert. In this paper, fuzzy inference is employed to design a novel controller, 'fuzzy logic controller', which copes with the difficulty of biomass control.

Singleton, crisp sets, and fuzzy sets Linguistic terms and numerical values are classified into three categories in accordance with their meanings which are defined by the characteristic function.

Singleton Deterministic words, e.g. ' m a l e ' and 'female', 'dead' and 'alive', personal name 'John', have truth values 0 or 1 corresponding to NO or YES, respectively. In other words, if one is asked, ' A r e you a male?', ' A r e you alive?', 'Is your name John?', then answer can be made with 'YES' or 'NO'. Exact numerical values, e.g. 'exactly 80°C ', 'concentration of 0.1 mol 1-1, '38 g' etc., are in the same situation. If anyone asks you, ' D o e s it weigh 38 g?', then you can answer 'YES' or 'NO'. These deterministic words and numerical values have neither flexibilities nor intervals. Those meanings are characterized by a characteristic function as shown in Fig. la. The word 'exactly 80°C ' means only one single point of t e m p e r a t u r e at 80°C, so that this type of term or value is called a singleton. A numerical value to be substituted to a mathematical equation representing a scientific law is a singleton. And modern artificial intelligence (AI) also handles a singleton in the knowledge or IF--THEN rule.

Crisp sets Even in the scientific analysis, where exact values are preferred, numerical intervals are sometimes used to represent flexible values. For instance, ' T h e water should be heated at 70-90°C to produce a stable chemical reaction'. T e m p e r a tures, 70.1°C, 80°C and 89.999°C are compatible with the proposition, but 69.999°C and 90.001°C are not in this case. Thus the characteristic function representing a numerical interval '70°C-90°C ' is shown in Fig. lb. Truth values for any temperatures are YES or NO in this case as well as in a singleton. In other words, the truth value of the interval changes abruptly and the boundary of the interval is very

~(T) "EXACTLY . . . . . . . . . . . . . . . . . .

8 0 o C '' •

(a)

0

I

0

I

I

T (*C)

~.

20 40 60 80 I00 120 TEMPERATURE

v(T) " 7 0 0 C ,v 9 0 ° C "

(b)

0

I

0

i

I

;_ T (°C)

I

20 40 60 80 TEMPERATURE

i00

"AROUND

80°C

120

~(T) "

m~

((:)

~

0.5

BANDWIDTH

T (°C)

0

20

120

40

Z

Z

0 m.

0

0 c~

O

0

U

Fig. 1. Characteristic functions of (a) a singleton, (b) an interval and (c) a fuzzy linguistic term.

clear. This interval can be regarded as a set of numerous singletons. This type of deterministic interval is called crisp sets. Crisp sets are also adopted to represent linguistic terms in knowledge in AI. Fuzzy sets In our daily life, linguistic terms, whose definitions are not so clear, are used for easy and efficient communication. 'Be careful when you carry important documents'. 'High accuracy is a measure of the technology'. 'Cool it a little bit more and a solid will be deposited'. Equivalent expressions with well-defined terms or numbers are very difficult to achieve, if not impossible. Intuitive and vague terms are very easy to select for practical use, although they include some kinds of uncertainties. And the meanings of the terms can be understood by the common sense which is assigned between communicating persons. The meaning of a vague or fuzzy linguistic term is defined by a characteristic function as shown in Fig. lc. This function is specifically called membership function, because it indicates a grade of membership (also compatibility or truth value) of each element (or physical value in the horizontal axis) in a fuzzy linguistic term of interest. For instance, a fuzzy linguistic term 'around 80°C ' is characterized by a membership function as shown in Fig. lc. According to common sense, a grade of membership of 80°C in 'around 80°C ' is undoubtedly 1. In other words, you can answer 'YES' to the question, "Is a temperature of 80°C included in 'around 80°C'? '' On the other hand, how about 20°C, 40°C, 120°C, etc.? You may answer 'NO' to this question, i.e. grades of membership of 20°C, 40°C, 120°C in 'around 80°C ' are 0. How about 70°C and 77°C? You cannot give the answer of 'NO' or 'YES' to this question. The grades will be answered to be 0.5 and 0.9 corresponding to 70°C and 77°C, respectively. Of course, strictly speaking, these grades are given by intuition or common sense, so that the shape of membership function changes a little from person to person. In any way, a fuzzy linguistic term can be defined by a membership function and the membership function exhibits a continuous curve changing from 0 to 1 or vice versa. And this transition region represents a fuzzy boundary of the term. If the fuzzy linguistic term includes a numerical value, e.g. 'around 80°C ', 'much higher than 30%', it is called a fuzzy number. These fuzzy linguistic terms can be regarded as sets of singletons, the grades of which are not only 1 but also ranging from 0 to 1. Therefore, these fuzzy linguistic terms are called fuzzy sets. Fuzzy sets are defined by labels (e.g. high pressure, around 80°C, a little, usually) and membership functions. While a modern artificial intelligence (AI) achieves only a symbolic processing with labels, a fuzzy information processing of a future artificial intelligence achieves both a symbolic processing with labels and a meaning processing with membership functions. Fuzzy linguistic terms, elements of which are ordered, are fuzzy intervals. A typical fuzzy interval is shown in Fig. lc. Elements giving grades of membership to be 0.5 are crossover points. A n interval between these crossover points is a

bandwidth of this fuzzy linguistic term. An interval on the horizontal axis where the grades of membership are not zero is called support. Elements of fuzzy linguistic terms such as, 'robust gentleman', 'beautiful lady', 'important documents', are discrete and also disordered. This type of term cannot be defined by a continuous membership function as shown in Fig. lc, but defined by vectors, the magnitudes of which are the grades or degrees of elements obtained from normal membership functions. For instance, ROBUST = (height, weight, chest, gripping force, jumping force, etc.).

Description of fuzzy linguistic information

Knowledge acquisitions of modern artificial intelligence and human being Two major operations of an artificial intelligence are knowledge acquisition and inference. Knowledge is usually represented by the relation from causes to results in the form of 'If . . . . then ... ,' or W--THEN rules. The intelligent system (modern AI) gains much useful knowledge from numerous experiences and stores them in a large scale memory. This knowledge is constructed with singletons or crisp sets. The information processing is achieved in the symbolic manner. In other words, an inference is achieved by exact matching between input data and antecedents in the knowledge base (or variables in if-clause in the knowledge base). In order to infer the conclusion from input data in any cases, the knowledge base of the system is necessarily of a large scale,

o

Cb

@

+ J~.

~

~

SUMMARIZATION

WITH

FUZZIFICATION

EXPERIENCES numerous (crisp

including

clear

facts

KNOW-HOWS (fuzzy

informations)

informations)

Fig. 2. Knowledge acquisition by human beings. Summarization and ~zzification of experiences includingnumerousc|car~clscausccffcct~ercduclionofknow-howstobestorcd.

because boundaries of all the linguistic terms used are clear. If the knowledge base does not include the knowledge, the antecedent of which exhibits exact matching with input data, then it cannot produce the conclusion. On the other hand, human beings can gain a much smaller amount of useful knowledge from numerous experiences by summarization. What is summarization? Summarization is to cut off a less important portion from the raw information, to emphasize a more important point and to extract the essence of the information. Summarization process converges much similar information obtained from experiences to one simple piece of information which includes a very important essence. This allows us to store a small amount of know-how efficiently as shown in Fig. 2. It is also remarkably significant that know-how obtained by summarization is usually represented by fuzzy linguistic terms. Otherwise, the know-how is the expression of only one experience and reduction of know-how cannot be guaranteed. Thus efficient knowledge acquisition is based upon summarization and fuzzification. And as illustrated previously, a fuzzified term (fuzzy linguistic term) is defined with membership function and its label. More precise aspects are described in the following.

Typical shapes of membership functions Physical meaning of a fuzzy linguistic term is characterized by a so-called membership function which is intuitively assigned by a person intending to use this term. Typical shapes of membership functions are shown in Fig. 3. Qualification of temperature gives us five typical labels: 'low', 'medium', 'more or less high', 'high' and 'very high', which are shown in Fig. 3a-e. A membership function of 'low' temperature is called a Z-shaped function because of its shape. 'Medium' and 'more or less high' temperature exhibits a membership function similar to the shape of a bell and is thus called a H-shaped function. 'High' temperature and 'very high' temperature are monotonic nondecreasing functions and are called an S-shaped function. The membership function of 'very high' temperature is usually obtained as: /zvH(T ) = / z 2 ( T )

(1)

P.vH(T) =/ZH(T-- 10)

(2)

where/zH(T) is a membership function of a term 'high' temperature. Fig. 3f shows a membership function of 'not high' temperature. It is a fuzzy logic complement (or negation) of 'high' temperature ~H(T), and is defined as: /ZNH(T ) = 1 --/ZH(T )

(3)

where #H(T) is a membership function of 'high' temperature. Readers can understand that the membership function of 'not high' temperature is not necessarily equal to that of 'low' temperature. It is quite reasonable in an intuitive respect.

uM(T)

UL(T)

"LOW"

__

I

0

20

40

60

80

100

It..- T (°c)O

0

20

40

(a)

60

-~T (°C)

UH(T) "MORE OR LESS HIGH"

..... .

20

-

~

40

60

~

80

i00

"HIGH"

r

,1

T t°C)0 0

....__.-S 20

40

(c)

t

80

100

80

I00

T (°C)

~NH (T) "VERY

"NOT HIGH"

HIGH"

....................

i

.,/-,"<; 71.,o

20

60

(d)

UvH(T)

0

100

(b)

UML (T)

0

80

40

60

(e)

80

100

0

:20 40

60

:-T(°C)

(f)

Fig. 3. Typical membership functions of fuzzy linguistic terms: (a) cow, (b) MEDIUM,(C) MOREOR LESS HmH, (d) HmH, (e) VERYHIGHand (f) NOT mGH.

Implementation of a membership function in the software and hardware systems In practical fuzzy information processing, membership functions should be implemented in a program on a digital computer or in an electronic circuit of a fuzzy hardware system. How it should be done?

1 u(x)

=

l+exp[-n(x-a)] n=~ tl

)

o.5

(

x

n ~-t~o

Fig. 4. Membership functions of S-shape and Z-shape.

In the software programming, the author assigns the membership function of S-shape or Z-shape, as shown in Fig. 4, by the equation: 1

/z(x)

l +expfn(x, ,

-a]~,,

(4)

where a stands for the crossover point and n the control index. When n is positive, Eq. (4) stands for an S-shaped membership function ~s(X). When n is negative, (4) stands for a Z-shaped membership function /Xz(X). To change the sign of n means to take a fuzzy logic complement (or 'not') of the word of interest. In other words: /*s(X) = 1 - / , z ( X )

(5)

When n is zero, Eq. (4) becomes 0.5 independent of x, in other words, (4) means 'unknown'. Since index n can control the meaning of the membership function, it is called a control index.

10 Let a fuzziness index F and a crispness index C be defined as: 1

F-

(6)

v'ln + 1

C = 1

(I n I + 1

(7)

If n = _+0% then F = 0 and C = 1. It means crisp semi-intervals or crisp sets. As n decreases, the fuzziness increases and the crispness decreases. If n = 0, then p.(x) = 0.5 = constant, and F = 1 and C = 0. It m e a n s ' u n k n o w n ' as described above. This p a p e r defines [I-shaped and U - s h a p e d m e m b e r s h i p functions as shown in Fig. 5a, b by the equation:

/z(x)=

1+

2(x-a)w

"

(8)

where a and W stand for the center and the bandwidth of the fuzzy interval, respectively. W h e n n is positive, Eq. (8) stands for a H - s h a p e d m e m b e r s h i p f u n c t i o n / ~ n ( X ) . W h e n n is negative, (8) stands for U - s h a p e d m e m b e r s h i p function p~u(x). In the similar sense to the S- and Z - s h a p e d functions, changing the sign of n m e a n s taking ' n o t ' of the word of interest. That is: /Zn(X ) = 1 - / Z u ( X )

(9)

W h e n the control index n is zero, Eq. (8) b e c o m e s 0.5 i n d e p e n d e n t of x, and means 'unknown'. Let a fuzziness index F and a crispness index C be defined as:

F = ~/]n] + 1

(10)

C=I

(11)

[~n~ + 1

If n = _+o% then F = 0 and C = 1 which m e a n crisp intervals or crisp sets. As n decreases, the fuzziness increases and the crispness decreases. If n = 0, then /z(x) = 0.5 = constant, and F = 1 and C = 0. It m e a n s ' u n k n o w n ' as described above. Curvature as shown in Figs. 4 and 5 is not essential to represent fuzziness of the word, but the gradual c h a n g e of the truth value from 0 to 1 or from 1 to 0 is essentially important, because it means that the b o u n d a r y of the word is fuzzy. In

1

~(x)=

u(x)

W=4

a=5

~

0. i

~. . . . . . . . . . . . . . . .

n=23 46

(a)

0.5

J I

-2

J -1

0

1

2

3 I F

4

5 w

6

7

8

9

I0 ii

I

--I

uCx)

...........

~:~ .... ::2 .......... n=-8

(b)

~-,

-2

i-1 0 '-il .... ....... .......... : .... 2 3 4 5 6 7 I_ I-

w

-4

~--8

9

10

-2 11

~1

Fig. 5. Membershipfunctionsof (a) H-shapeand (b) U-shape. other words, membership functions shown in Figs. 4 and 5 can be modified to Fig. 6 for simplicity without significant change of the meaning. These piece-wise linear membership functions can be characterized by specific parameters a, b, c and d, and are much easier to implement in hardware programming (electronic circuits especially in analog mode) rather than membership functions with curvature shown in Figs. 4 and 5.

12

"HIGH"

"LOW"

........................

c

T

d

(°C)

a

(a)

T -( ° 0

b

(b)

i

1

"MEDIUM"

1

"MEDIUM"

i

a

c

d

¢(°C)

0

a

b

d

,

T (~C)

c

(c)

(d)

Fig. 6. Characterization of fuzzy linguistic terms employing piece-wise linear functions. (a) LOW, (b) HIGH, (C) MEDIUM (trapezoidal), and (d) MEDIUM(triangular).

In software programming, a trapezoidal membership function, for example, can be represented as '0

(x < a) 1

p.(x) =

(b<~x<~c)

1

(12)

1

--d~_c ( X - d )

(c <~x
0

(d~x)

This equation facilitates calculation of higher speed rather than Eq. (8). Alternatively, a membership function can be stored in the program as a data set which is a set of grades sampled from the membership function. In other words, a membership function can be represented as vector of n elements, For instance: /Zn(X ) = (0, O, O, O, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1, 1, 1, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, O, O, O, O)

(13)

13 This is a vector of 30 elements, each grade of which has the resolution of the vector and should be assigned to represent the fuzziness of the boundary of the word. So that more than 10 000 elements with 1/1000 resolutions, for instance, are meaningless. In ordinary cases, data sets of 250 elements with 1/100 resolutions are enough to implement the membership functions.

Modelling of the system In order to control the system of interest, we have to describe the precise behavior of the system to design the controller. In order to use the knowledge, we have to describe the knowledge effectively. There are three ways to describe the system or knowledge: mathematical equations, linguistic rules and artificial neural networks.

Mathematical equations The traditional sciences have been based on this way. Natural scientific phenomena and physical behavior of the artificial system can be modelled with relational equations or differential equations. These equations describe the dynamics or kinetics of the systems or the knowledge about the system in a very simple form. If the relation between the input x and the output f(x) of the system or the relation between the cause x and the result f(x) is obtained as shown in Fig. 7a from experiments, f(x) is described as:

f ( x ) = ½(x - 2) 2

(14)

By substitution of the numerical value of x (input value, the fact or the premise) to this equation, the numerical value of f(x) (the output value or the conclusion) is obtained. Description of the system with this type of equation exhibits significant simplicity. It is, however, very difficult to identify an exact equation from the given relation, especially in the case of many variables. Furthermore, it is also very difficult to reassign this equation, when the relation between x and f(x) is changed. So that this description is not so suitable for complex systems. As the complexity of the system increases, the possibility to describe the system with mathematical equations diminishes.

Linguistic rules A relation between x and f(x) can be described with a set of linguistic rules, typical form of which is: Rule No. 1

I f x is A 1,

then f ( x ) is B 1

Rule No. 2

If x is A 2,

then f ( x ) is B 2

Rule No. 3

I f x is A 3,

then f ( x ) is B 3

Rule No. r

If x is A r,

then f ( x ) is Br

14

t(x) 6

(a)

-2

0

-i

i

2

3

4

5

6

t(x) 6

5 4

(b) •

3

2 I

1

-i-lo

f(x) "."



*

,

.

'.

"-° i..,.... ..'.

'

".

5

•'

(c) ,- e°

i;i::i..

4

.-;~:.

"~,...~.

F -2



~'-'.,

-1 ol " i " ~ : - ~ ' ' ~ '

4

v

5

6

15 where x and f ( x ) are independent and dependent variables, and B i ( i = 1.... ,r) are linguistic constants. These rules 1F--Th'EN rules because of their form. An if-clause is referred and a then-clause a consequent. Linguistic rules can be classified to two categories with constants A i and B i.

respectively, and A i are referred to as to as an antecedent respect to linguistic

Linguistic rules with well-defined languages (crisp rules).

In this category, all the linguistic constants are represented by well-defined languages (crisp information or exact numerical values), e.g. male, female, 80°C, 60-80°C, 98 g, etc. Modern artificial intelligence (AI) belongs to this category. H e r e we have an example shown in Fig. 7b, which gives the following crisp rules: Rule No. 1

I f x is - 2 , t h e n f ( x )

is16/3

Rule No. 2

I f x is - 1 , t h e n f ( x )

is 3

Rule No. 3

I f x is

is 4 / 3

Rule No. 4

I f x is + l , t h e n f ( x )

is

Rule No. 5

I f x is + 2 , t h e n f ( x )

is 0

Rule No. 6

I f x is + 3 , t h e n f ( x )

is

Rule No. 7

Ifxis

Rule No. 8

I f x is + 5 , t h e n f ( x )

Rule No. 9

I f x is + 6 , then f ( x ) i s 1 6 / 3

0, t h e n f ( x )

1/3 1/3

+ 4 , then f ( x ) is 4 / 3 is 3

The relation between x and f ( x ) shown in Fig. 7b includes information similar but not exactly equal to that of Fig. 7a. A set of rules No. 1 - 9 are a so-called

knowledge base. W h e n the fact x = + 1 is given, the conclusion can be obtained from the data-matching between the fact and the antecedents (if-clauses) of rules. This procedure to produce the conclusion is called inference. However, the fact x = + 1.5 cannot give the conclusion from the rules, because there is no antecedent which is exactly matched to the fact x = + 1.5. This shows that the inference with crisp rules is very weak against a defect of knowledge, a fact of defect, a noisy defect or a variation of a fact, and that it needs a large-scale knowledge base for significant performance. Therefore, this type of inference wastes time because of a sequential data matching between the fact and a large data base. Furthermore, this inference system should not include contradictory rules in a knowledge base. Otherwise, it will produce two contradictory conclusions from one fact. These disadvantages a p p e a r in the m o d e r n AI system as well. This type of inference is based only on symbolic processing but not on the processing of the meaning of linguistic terms.

Fig. 7. Three descriptions of relationship between the cause and the result. (a) mathematical equation, (b) crisp rules, and (c) fuzzy rules.

16

Linguistic rules with ill-defined languages (fuzzy rules).

In this category, all the linguistic constants are represented by ill-defined languages (fuzzy information, uncertain words, approximate numerical values, etc.), e.g. beautiful lady, high temperature, heavy, low power, around 45 kg, etc. The linguistic rules (fuzzy rules) can describe the relation between x and f(x), for example, as shown in Fig. 7c, and are given in the following form. Rule No. 1 Rule No. 2 Rule No. 3 Rule No. 4

If x is around - 2, then f ( x ) IS around 1 6 / 3 If x is around - 1, then f ( x ) is around 3 If x is around 0 then f ( x ) is around 4 / 3

Rule No. 7

If x Is around + 1 then f ( x ) 1s around If x is around + 2 then f ( x ) is around If x is around + 3 then f ( x ) is around If x is around + 4 then f ( x ) is around

4/3

Rule No. 8

If x is around + 5 then f ( x ) is around

3

Rule No. 9

If x is around + 6 then f ( x ) is around 16/3

Rule No. 5 Rule No. 6

1/3 0 1/3

A crisp relation between x and f ( x ) in Fig. 7b is fuzzified to make it continuous as shown in Fig. 7c. This continuous fuzzified relation (fuzzy relation) gives reasonable conclusions for any fact, e.g. x = - 1 . 5 , +3.2, +4.3, etc., through fuzzy inference and defuzzification, which are precisely described in the section 'Algorithm of fuzzy inference and defuzzification'. In other words, fuzzy inference and defuzzification facilitate a reasonable interpolation. So that the fuzzy inference is called interpolative inference. This fuzzy inference with fuzzy rules exhibits the similar function to that of a mathematical equation. It is much easier to reassign the fuzzy rules rather than the mathematical equation, when the characteristics of the system are changed. In other words, only one or more rules should be added or revised independently of other rules, while the order and the numerous coefficients of the mathematical equation should be recalculated from simultaneous equations. Fuzzy rules can be described with intuitive words of human experts as well as fuzzy numbers. The following is an example of two inputs and two outputs: ' I f TEMPERATURE OF CHAMBER grows up higher

and PRESSURE becomes a little bit higher, then OPENING RATE OF VALVE should be reduced significantly and FUEL should be reduced a little.' The distinctive features of this description are: (1) It is suitable for describing a complicated system with a small amount of knowledge. (2) It is easy to select the words to be used in fuzzy rules among the categorized few words. (3) It is easy to r e m e m b e r the knowledge. (4) It is easy for designers to communicate with others by using fuzzy words.

17 While ordinary inference (modern AI) is based on symbolic processing, fuzzy inference or approximate reasoning is based on both of symbolic processing and meaning processing. Linguistic rules (crisp rules and fuzzy rules) can represent the algorithm of inference explicitly, while an artificial neural network represents it implicitly. So that linguistic rules are called structured and an artificial neural network is unstructured.

Artificial neural network

(Hecht-Nielsen, 1990)

An architecture of a neural network is a simple iteration of simple aggregating elements. This aggregating element is a model of a physical neuron in the neural network in the living body. Fig. 8a shows a symbol of an analog threshold element, where wij (i = 1 , . . . , n) is a weight assigned to the signal input pi (i = 1. . . . . n) to the jth cell and 0r and qr are a threshold level and a signal output of the jth cell. The signal output is characterized by

where h is a sigmoid function and it is typically described by

h(x)

1 = 1 + exp(-x)

(16)

When wij is positive, input Pi acts as excitatory signal to the jth cells. When wij is negative, input p~ acts as inhibitory signal to the jth cell. By employing this neuron model, the relation between x and f(x) can be characterized by the artificial neural network as shown in Fig. 8b. The input layer includes only one neuron, which has only one input x with weight of 1, and the output of which is connected to six neurons in the hidden layer (second layer), jth neuron in the hidden layer accepts only one input y from the input layer neuron with weight wj and produces one output zj. The output layer includes only one neuron, which has six inputs zl, z2, z3, z4, zs, z 6 with weights W'l, w~, w~, wE, w~, w~, respectively, and produces one output f(x). The system (or distribution of weights) can be plasticized by learning with nine pairs of (x, f(x)) = ( - 2 , 16/3), ( - 1 , 3), (0, 4/3), (1, 1/3), (2, 0), (3, 1/3), (4, 4/3), (5, 3), (6, 16/3). After the learning, when x = - 0 . 5 is applied to the input, f(x)---2.08 is obtained at the output. It means the artificial neural network facilitates interpolation between given i n p u t - o u t p u t pairs. If the system has four inputs and three outputs, it can be described by a more complicated artificial neural network as shown in Fig. 8c, which has two sets of distributed weights [wir] and [wrk], and three sets of threshold levels [Oi], [0r] and [Ok], where i = 1. . . . . 4, j = 1. . . . . 5 and k = 1 . . . . . 3. In this complicated system, numerous times of cyclic adjustments of distributed weights for given input-output pairs are needed.

18

= qj P41j~/ P5

qi=h(Zwi.Pi-8.) i J J

(a)

INPUT

HIDDEN

OUTPUT

LAYER

LAYER

LAYER

=

f(x)

W!

K..Y z6 [wjl

[Ojl

[w~l

(b) INPUT

HIDDEN

OUTPUT

LAYER

LAYER

LAYER

xI

fl(xl,x2,x3,x4 )

x2

:

f2(xl'x2'x3'x4 )

x3

f3(xl,x2,x3,x4)

x4

[Oi ]

[wij]

[Oj]

(c)

[Wjk]

[Ok ]

19

w

~ ~ I

IF x is X 1 THEN y is Yl Z O

IF x is X 2 THEN y is Y2 w3 IF

x is X 3 THEN y is Y3

IF

-

y

e~

Z



x

is

Xn

i

,

w

i

THEN y is Y n I

yJ

-

Fig. 9. Architecture of fuzzy inference with a weight for each rule and defuzzification.

The architecture of an artificial neural network is a simple iteration of simple aggregation elements. Four or more layers are essentially needed for practical use, e.g. pattern recognition, description of complicated (nonlinear) systems, etc. This multilayer structure causes numerous distributed weights to be assigned by long term learning and does not guarantee the convergence of calculation of weights. Thus an artificial neural network has the disadvantage of difficult identification of weight distribution for many input and output variables, although it has the advantage of easy extension of architecture. The common feature of fuzzy rules and an artificial neural network is an ability of interpolation. When an input signal x is applied to the input neuron, the firing paths (or activated paths) generally distribute over the related connections in the neural network as shown in Fig. 8b. On the other hand, the firing paths in fuzzy inference (approximate reasoning) are concentrated to a few rules and the aspect depends upon the input signal x. Activities of paths are determined by degrees of soft matching between antecedents and the given fact, and in some cases by weights (degrees of importance) of fuzzy rules as shown in Fig. 9. Comparison of characteristics between four descriptions is summarized in Table 1. Processing signals or information by mathematical equations and an artificial neural network is numerical, while that by crisp rules is symbolic. Information processing by fuzzy rules is numerical with respect to grades of membership as well as symbolic with respect to labels. A long term learning and no guarantee of convergence cause an artificial neural network to be difficult to design or preprogram. When the system is given (the relationship between input variables and output variables are given), the system identification or the reassignment of parameters

Fig. 8. (a) An analog threshold element as a model of a neuron, (b) a neural network of three layers characterizing one input and one output, and (c) a neural network of three layers characterizing four inputs and three outputs.

20 TABLE 1 Comparison of characteristics between four descriptions Mathematical equations

Linguisticrules Crisp rules Fuzzy rules

Artificial neural network

Processing

Numerical

Symbolic

Symbolic and numerical

Numerical

Designability

Designable

Designable

Designable

Undesignable

System identification

Difficult

Easy

Easy

Difficult

Reassignment after the change

Difficult

Easy

Easy

Difficult

Suitability for complicated systems

Unsuitable

Unsuitable

Very suitable

More or less suitable

after the change of the system is not so easy in mathematical equations and an artificial neural network, because the designer has to solve simultaneous equations of many unknowns, or achieve numerous adjustments of distributed weights for given i n p u t - o u t p u t pairs. Thus, fuzzy rules are the most suitable for describing complicated systems. It is illustrated in detail in the section 'Fuzzy logic controller' by giving a typical example.

Implementation of fuzzy inference

Algorithm of fuzzy inference and defuzzification Fuzzy inference is achieved to produce a conclusion by referring a fact to a knowledge base which is described with fuzzy linguistic terms as given in the section 'Linguistic rules with ill-defined languages (fuzzy rules)' (Rule No. 1-No. 9). When an antecedent variable (if-clause variable) is given as a fact to obtain a conclusion of consequent variable (then-clause variable), it is called forward inference and it is usually applied to fuzzy logic control:

f(x)

Rule No. 1

If x is around - 2 , then

Rule No. 2

If x is around - 1 , then f ( x ) is around 3

Rule No. 9 Fact

If x is around + 6 , then x is X '

Conclusion:

f ( x ) is ?

f(x)

is around 1 6 / 3

is around 1 6 / 3

21 When a consequent variable is given as a fact to obtain a conclusion of antecedent variable, it is called backward inference and it is usually applied to diagnostic decision making: Rule No. 1

If x is around - 2 , then f ( x )

Rule No. 2

If x is around - 1 , then f ( x ) is around 3

Rule No. 9

If x is around + 6 , then f ( x )

Fact Conclusion:

f(x)

is around 16/3

is around 16/3 is Y'

xis?

Here we consider a fuzzy forward inference for a fuzzy logic control which is suitable for a control of complicated systems such as a biomass reactor. A fact is given a s_a deterministic value, which is usually an output signal of a sensor. The algorithm of a fuzzy forward inference is described in the following. Let us consider the example, the rules of which are given in 'Linguistic rules with ill-defined languages (fuzzy rules)' and a fact of which is x = 3.3. Fig. 10 illustrates how the conclusion of deterministic value is obtained. Rules No. 5, No. 6, No. 7 are rewritten and fuzzy linguistic terms are represented by membership functions. Compatibility of x = 3.3 with the antecedent of rule No. 6 (around 3) is 0.9, so that the consequent of rule No. 6 (around 1 / 3 ) should be adopted as the conclusions at the same grade 0.9. Thus the membership function of consequent is truncated at the same grade 0.9. If the antecedent includes more than one variable such as: If x is X 1 and y is Y1 and z is Z~, then p is

P1

then we can get three compatibilities of facts x is X ' , y is Y', and z is Z ' with antecedents x is X~, y is Y1 and z is Z r The minimum value among these three compatibilities can be regarded as the grade of soft matching between a fact x is X ' and y is Y ' and z is Z ' and the antecedent of the rule x is X 1 and y is Y1 and z is Z~, And, at this grade, the consequent membership function is truncated. Thus, a compatibili~ ranging from 'NO (0)' tO 'YES (1)' is considered in fuzzy inference, while only a compatibility of 'NO (0)' or 'YES (1)' is acceptable in modern artificial intelligence (modern AI), In a similar manner, rule No, 7 gives the conclusion after the truncation of the consequent membership function, Rule No. 5 cannot give the conclusion, because the compatibility of x = 3.3 with a fuzzy linguistic term 'around 2' is 0. Other rules also do not give any conclusions. Thus two conclusions are obtained from two rules (No. 6 and No. 7) individually. All the rules are implicitly combined with connectives 'also' or 'or' in the knowledge base. Therefore, two individual conclusions should be combined to obtain the final conclusion. Implicit connectives 'also' can be interpreted to get the envelope of overlapped membership functions of two individual conclusions. This procedure is called m a x composition.

22

RULE NO.5

A

IF x i s around 2,

I

THEN f ( x ) i s around 0

/

1

RULE NO.6

,~nd 3,

IF x i . . . . 1

t THR"

0.9

~

0 0

,

2

3t

IF x i . . . .

RULE NO. 7

4

/

o

and 4,

1

• 2

:~(x;

1

,.,

~

3

THEN f ( x ) i . . . . .

1

1

~

around 1 t

f(x)is

1 ~

.

d 4 j

i ( o~, /

x

, 2

CENTEROF GRAVITY (DETERMINISTIC VALUE)

o:2 .

.

.

.

.

0 0

1

2

3 I

4

0

1

2

3

/

3.3 Fig. 10. Mechanism of fuzzy inference with defuzzification.

The final conclusion obtained by max composition is represented by a membership function as shown in Fig. 10. A controller should not produce a fuzzy value to the system under control but a deterministic value such as electric power of 1.5 kW, 23% opening of the valve, movement of 18 cm and so on. Therefore, we have to squeeze the essence out of the final conclusion to get a deterministic value. The procedure is called defuzzification. T h e r e are some methods to achieve defuzzification. In the fuzzy logic control, a center-of-gravity method (C.G. method) is quite popular and the validity has been verified by many practical applications in industry. A center of gravity of a final membership function can be obtained from ?7

~ i lz(i) C.G.

i=1n E/x(i) i=l

(17)

23 for discrete expression of a membership function such as Eq. (13), w h e r e / z ( i ) is a grade of ith element. Alternately, it can be obtained from: C.G.

filx(i) di

(18)

flz( i ) di

for continuous expression of a membership function, where i is a base variable and corresponds to f ( x ) in Fig. 10. In the fuzzy forward inference, a consequent is truncated to produce a conclusion. The alternative way of getting an individual conclusion is to multiply a membership function of consequent by a compatibility of a fact with an antecedent. A deterministic value defuzzified from a final conclusion in this case is almost the same as that in case of truncation. If each rule has different importance to describe a fuzzy logic controller, a consequent membership is multiplied by the weight of the rule ranging from 0 to 1 to produce an individual conclusion. A block diagram of a typical fuzzy logic controller, which has one input x and one output y, is shown in Fig. 9. The number and distribution of fuzzy linguistic terms should be determined by a designer of a fuzzy logic controller or a human expert who usually operates the system under control. In other words, labels such as approximately zero, very small, small, medium, large, very large, etc., are assigned by the intuition of the human expert. A shape of each membership function, which is characterized by a support, crossover points, a peak point, a center and so on, is also assigned by the intuition of the h u m a n expert. As the grade of nonlinearity of the controller increases, the n u m b e r of labels increases and thus their supports decrease. The number of possible rules R is determined by the number of variables in an antecedent (or control inputs) I and the number of variables in a consequent (or control outputs) O as follows:

R =N 1.N2.Na...Ni...N,.O

(19)

where N / s t a n d s for the n u m b e r of labels assigned in ith variable in an antecedent. Thus the n u m b e r of combination of rules Q is:

Q = M N'N2"''N' "MNI'N2""NI... MNI'N2""N'... M NIN2"''N'

(20)

where Mj stands for the n u m b e r of labels assigned in j t h variable in a consequent. W h e n we design a fuzzy logic controller having two inputs and three outputs, and assign 7 labels for each input and output variable, I = 2, O = 3, N 1 = N 2 = 7, M l = M 2 = M 3 = 7. Therefore, the n u m b e r of possible rules is: R = 7 × 7 × 3 = 72 x 3 = 147

(21)

and the n u m b e r of combination of rules is: Q = 77×7 × 77x7 x 77×7

= 7 49 X 7 49 X 7 49 = 7 147

(22)

Consequently, this fuzzy logic controller is characterized by 147 rules at most and freedoms of description at most. Of course, for a simple system, much less n u m b e r of labels and rules are enough to describe it.

e x h i b i t s 7147

24

Software implementation A digital computer is a universal machine, so that fuzzy inferences, max composition and defuzzification described in the above section can be achieved on the digital computer by a program executing the algorithm as shown in Fig. 10. It is usual that the number of statements in this program and the memory occupation are drastically reduced in comparison with that in the traditional program and the traditional memory occupation for equivalent control, respectively. Thus a personal computer is sufficient for bioindustry use. Furthermore, assignment and reassignment of labels and membership functions of fuzzy linguistic term and rules are very easy. Consequently, a fuzzy inference facilitates a sophisticated control of a biochemical system at low cost.

Hardware implementation The operation of a digital computer is sequential and all the instructions are executed sequentially. Therefore, as the number of variables and rules increases, the inference speed decreases. Thus a software implementation of fuzzy inference takes a long time to obtain a final conclusion or a deterministic value. An inference time ranges from several tens of milliseconds to several tens of seconds. An ignition control of a gasoline engine should be achieved at the speed of less than 0.1 ms. Therefore, the ignition control cannot be accomplished by a software implementation of fuzzy inference. For high speed fuzzy logic inference, a new type of solid state fuzzy microprocessor has to be developed. Fig. l l a and b are two kinds of fuzzy microprocessors developed by the author and they are now on the market (Yamakawa, 1988). Fig. l l a is a rule chip fabricated by monolithic BiMOS technology. This chip includes about 600 transistors and about 800 resistors. It is embedded in an 84-pin plastic package of 3 cm x 3 cm x 3 mm. Its weight is 6 g and it is driven by bipolar DC supply voltages of + 10 V and - 10 V. It can achieve one fuzzy inference of

Fig. 11. Two types of fuzzy microprocessors: (a) a rule chip and (b) a defuzzifier chip.

25 three antecedent variables and one consequent variable. Membership functions assigned for this chip are restricted to four piece-wise linear shapes (Z-shaped, S-shaped, triangular, trapezoidal). One of eight labels (Negative Large (NL), Negative Medium (NM), Negative Small (NS), Approximately Zero (ZR), Positive Small (PS), Positive Medium (PM), Positive Large (PL) and Not Assigned (NA)) is assigned by an external 3-bit digital signal. Only analog signals (but not digital signals) are acceptable in this rule chip. An inference time is 1 /xs (10 -6 s). Fig. 11b is a defuzzifier chip which achieves a max composition and a defuzzification in itself. It is fabricated in hybrid form on a ceramic base and embedded in a 44-pin plastic package of 3 cm × 3 cm × 6 mm and its weight is 11 g. A response time is about 5/xs (5 x 10 -6 s). Therefore, the total response time is less than 10 /xs (10 -5 s). This defuzzifier chip accepts one final conclusion, a membership function which is represented by 25 elements, and produces one deterministic value. Thus the number of rule chips needed to construct a fuzzy logic controller is equal to the number of rules, the antecedent variables (input variables) of which are less than three. A fuzzy inference of more than three antecedent variables can be achieved by connecting two or more rule chips in parallel. The number of defuzzifier chips needed to construct a fuzzy logic controller is equal to the number of output variables of the controller.

Fuzzy logic controller In this section, a fuzzy logic controller employing fuzzy forward inference is described and compared with a traditional PID controller.

Traditional PID controller (Dorf, 1980; Ogata, 1970) A typical control system (1-input and 1-output) employing a PID controller is shown in Fig. 12. The output state of the system under control is detected by a sensor. It is compared with the input signal (reference input) to derive an error signal e(t), where the input signal is externally given and represents a desired state of the system. The error signal is delivered to a controller to produce an appropriate manipulating signal m(t), which changes the state of the system under control. In a control system, there are two main objectives. The first one is to make the state (or output) of the system to be very close or equal, if possible, to the reference input (or set point). In other words, a small steady-state error e(t) or a high steady-state accuracy is desired. The second one is to maintain the transient performance of the system within reasonable limits. The following three basic control actions should be considered to design a controller for practical use in industrial automatic control.

26 de

INPUT

PREPROCESSO~

CONTROLLER

m(t)

SYSTEM UNDER CONTROL

~.

T

Fig.12.A typicalfeedbackcontrolsystemwitha traditionalPIDcontroller. Proportional control action. For a controller with proportional control action, the relationship between the output of the controller re(t) and the actuating error e(t) is: m(t) =K v e(t)

(23)

where K v is termed a proportional sensitivity or a gain. The proportional controller is essentially an amplifier with an adjustable gain. The steady-state error of many feedback systems may be decreased by increasing the amplifier gain in the forward channel. However, the resulting transient response may be totally unacceptable, if not even unstable. Therefore, it is often necessary to introduce a compensation action in the forward path of a feedback control system in order to provide a sufficient steady-state accuracy (negligible steady-state error). The compensation action is an integral control action.

Integral control action. In a controller with integral control action, the value of the controller output re(t) is changed at a rate proportional to the actuating error signal e(t). Namely: am(t) dt - KI e ( t )

m(t) =

K,fe(t)

dt

(24) (25)

where K~ is an adjustable constant. The integral control action is sometimes called reset control.

Derivative control action. In a controller with derivative control action, the magnitude of the controller output re(t) is proportional to the rate of change of the actuating error signal e(t): de(t)

m(t)=KD

at

(26)

where K D is an adjustable constant. The derivative control action has an anticipatory character. As a matter of course, however, the derivative control action can never anticipate any action that has not yet taken place.

27

While the derivative control action has an advantage of being anticipatory, it has the disadvantages that it amplifies noise signals and may cause a saturation effect in the actuator. It should be noticed that the derivative control action can never be used alone because this control action is effective only during transient periods. In order to design a controller of high steady-state accuracy and high speed settling, we need a linear combination of three control actions described above. It is called a PID control and characterized by the following equation.

m(t)=Kpe(t)

+ Kxfe(t ) dt+K D

de(t)

(27)

dt

This controller has three inputs and one output. The simplest relationship between the output and n inputs is a linear combination as follows:

f ( x , , x 2 .... , x , ) = k l X 1 + k2x2 +

.

.

.

+knx n

to which a PID controller of three inputs e(t), re(t)dt

f(xl,x

(28) and d e ( t ) / d t

belongs.

2)



~-

X2

X1 Fig. 13. I n p u t - o u t p u t c h a r a c t e r i s t i c s of the system, the o u t p u t of which is c h a r a c t e r i z e d by a l i n e a r 1 c o m b i n a t i o n of two i n p u t s . x I and x 2 such as a PI c o n t r o l l e r or a P D controller, f ( x l , x 2) = ~x 1 + ~x 2.

28 E q u a t i o n (28) exhibits a hyperplane. Fig. 13 shows the visual relationship in case of two inputs, where:

f ( x~, x2) = .~xj 2 + ~x 2

(29)

Fig. 13 shows that the linear combination of some input variables such as a P I D controller (Eq. 27) does not allow us to design a complicated controller.

Fuzzy logic controller (Yamakawa, 1989) I n p u t - o u t p u t characteristics of a fuzzy logic controller can be described by a set of fuzzy rules, a n t e c e d e n t s and consequents of which c o r r e s p o n d to inputs and outputs of the controller, respectively. I n p u t signal(s) applied to the controller and the fuzzy rules designed by the system designer provide the output signal(s) t h r o u g h fuzzy inferences and defuzzification(s) as described in the section ' I m p l e m e n t a t i o n of fuzzy inference'. H e r e is presented an example of characteristics of a fuzzy controller which has two inputs x~ and x 2 and provides one output (manipulating signal) f(xl, x2). Fuzzy rules are given in the following: Rule No.

1

If x~ is Z R

and x 2 is Z R ,

then

Rule No.

2

If x 1 is Z R

and x 2 is S,

then

Rule No.

3

If x 1 is Z R

and x 2 is M,

then

Rule No.

4

If x~ is Z R

and x 2 is L,

then

Rule No.

5

If x I is S

and x 2 i s Z R ,

then

Rule No.

6

If x I is S

and x 2 is S,

then

Rule No.

7

If x

is S

and x 2 is M,

then

Rule No.

8

If x

is S

and x 2 is L,

then

Rule No.

9

If x

is M

and x 2 is Z R ,

then

Rule No. 10

If x

is M

and x 2 is S,

then

Rule No. 11

If x

is M

and x 2 is M,

then

Rule No. 12

If x

is M

and x 2 is L,

then

Rule No. 13

If x

is L

and x 2 i s Z R ,

then

Rule No. 14

If x

is L

and x 2 is S,

then

Rule No. 15

If x

is L

and x 2 is M,

then

Rule No. 16

If x 1 is L

and x 2 is L,

then

f ( x l , x2) f ( x l , x2) f ( x l , x2) f ( x l , x2) f ( x l , x2) f ( x l , x2) f(x~, x2) f ( x l , x2) f ( x l , x2) f ( x l, x2) f ( x l , x2) f ( x l, x2) f ( x 1,x2) f ( x 1, x2) f ( x l , x2) f(Xa, x2)

is L is M is S is S isM is M is Z R is M is Z R is S is S is M isS is Z R is M is L

where four labels of 'approximately zero (ZR)', 'small (S)', ' m e d i u m (M)' and 'large (L)' are used. This rule set is rewritten in a control rule m a p as shown in Table 2. M e m b e r s h i p functions for these four labels are defined in Fig. 14a where two types of m e m b e r s h i p functions are defined for a fuzzy linguistic term ' m e d i u m ' in

29 TABLE 2 A rule map of f(x 1, x e) X1

ZR S M L

X2

ZR

S

M

L

L M ZR S

M M S ZR

S ZR S M

S M M L

ZR, approximately zero; S, small; M, medium; L, large. order to examine the effect of support (base of triangle) to the i n p u t - o u t p u t characteristics. After fuzzy inference and defuzzification, the resultant i n p u t - o u t put characteristics of the fuzzy logic controller are obtained. The simulation result is shown in Fig. 14b. The solid mesh is the inference result from fuzzy rules employing solid membership function for ' m e d i u m ' as shown in Fig. 14a. When the left slope of the membership function of ' m e d i u m ' is reassigned as a dotted line illustrated in Fig. 14a, then the circumference of the mesh is changed as illustrated by dotted lines in Fig. 14b. Let us consider the case of x 1 = 1 and x 2 = 0.25. When the membership function of ' m e d i u m ' is defined as the dotted line in Fig. 14a, then (x~, x 2) = (1, 0.25) fires only one rule of 16 rules above. That is Rule No. 14. So that after the inference followed by defuzzification, f(1, 0.25) = 0 is obtained, i.e. (1, 0.25, 0) in Fig. 14b. This point is the typical conclusion from Rule No. 14. On the other hand, when the membership function ' m e d i u m ' is defined as solid line in Fig. 14a, then (x 1, x 2) = (1, 0.25) fires two rules No. 14 and No. 15. The degree of soft matching between (1, 0.25) and the antecedents of Rule No. 14 and No. 15 are 1 and 0.5, respectively. Therefore, the conclusion f(1, 0.25) is not exclusively obtained from Rule No. 14, but is affected by Rule No. 15 to produce a nonzero value. This means that at the typical point (for example, x = 0.25 in 'x is small'), grades of membership of other fuzzy linguistic terms should be zero for getting a typical conclusion. In any way, Fig. 14b exhibits a very complicated and curved surface which can never be described by a linear combination of input variables such as Eq. 28. Thus fuzzy rules are very suitable for describing a sophisticated system by fuzzy linguistic terms (intuitive terms). If x~ and x 2 are assigned to be an error signal e(t) and an integral of the error re(t) dt, respectively, this controller behaves as a fuzzy logic PI controller. On the other hand, if x 1 and x 2 are assigned to be an error signal e(t) and a derivative of the error d e ( t ) / d t , respectively, this controller behaves as a fuzzy logic PD

controller. Finally, the author emphasizes the following. In the simplest case such as a linear system, all the descriptions exhibit almost the same difficulty. However, as the system becomes complicated or sophisticated, a mathematical equation, an artificial neural network and crisp rules exhibit more significant difficulty of description, while the difficulty of description by fuzzy rules does not depend upon

30

ZR

(a)

S

M

L

/

f Dr

0.25

-0.25

0.5

1.0

1.5

x1

f(xl,x 2 )

o •-----.--m1

x2

¢5 .

1

.

.

(1,0.25,0)

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

(1,1,0)

x1 Fig. 14. (a) Membership functions used for Rule No. 1-No. 16. Four typical fuzzy linguistic terms, approximately zero, small, medium and large. (b) I n p u t - o u t p u t characteristics described by fuzzy rules No. 1-No. 16.

31

// o

7, b=d me rg~

2

O

c.9 r..

FUZZY

RULES

COMPLEXITY OF SYSTEM Fig. 15. Difficulty of each description.

the complexity of the system. This is qualitatively illustrated in Fig. 15. Another distinctive feature of fuzzy rules is easy handling of compound information by intuition. For example, gustatory stimulus synthesized by some chemical species makes us feel salty, sweet, bitter or sour. And a human expert in cooking makes a decision on the amount of condiments to provide good taste. Although a traditional control needs precise information on all chemical species to control the taste, a human expert needs only compound information which is intuitively interpreted.

Concluding remarks This paper discussed four types of descriptions of a system, among which fuzzy rules are the most suitable for describing a complicated system. Therefore, a fuzzy logic controller employing fuzzy rules is very easy to design to control a complicated system such as a biomass reactor. A fuzzy rule based controller is also easy to reprogram, when the system under control is changed for some reason. The operator has only to change or add one or more intuitive rules to the rule set according to the system change. The fuzzy logic controller can accept compound information obtained from incomplete and cheap sensors, which is processed by fuzzy inference to produce a reasonable conclusion.

32

If you have the knowledge about the four operations in arithmetic (summation, subtraction, multiplication and division) and Min and Max operations in fuzzy logic, then you are capable of designing a sophisticated fuzzy logic controller which is very useful in biochemistry. In other words, fuzzy inference with fuzzy rules is a very easy approach to realize the thought of human experts in biotechnology through practical equipment.

Acknowledgements

The author would like to express his sincere thanks to Prof. Ayaaki Ishizaki in Kyushu University for his giving him the opportunity to present this paper and for his encouraging discussion about applications of fuzzy logic to biochemistry.

References Dorf, R.C. (1980) Modern Control Systems, Addison-Wesley, London. Hecht-Nielsen, R. (1990) Neurocomputing, Addison-Wesley, Amsterdam. Ogata, K. (1970) Modern Control Engineering, Prentice-Hall, Englewood Cliffs, NJ. Yamakawa, T. (1988) Fuzzy Microprocessors: Rule Chip and Defuzzifier Chip. Proceedings of the International Workshop on Fuzzy System Applications, pp. 51-52. Yamakawa, T. (1989) Stabilization of an Inverted Pendulum by a High-Speed Fuzzy Logic Controller Hardware System, Fuzzy Sets and Systems, 32, pp. 161-180. Zadeh, L.A. (1965) Fuzzy Sets, Information and Control, 8, pp. 338-353.