The concept of Fuzzy Theory is described in order to provide the analyst with the means for dealing with vague statements, uncertain observations or the fuzziness of human perceition and interpretation, in general. The applications section demonstrates advantages of Fuzzy Theory methods compared to common mathematical methods.
The concept of Fuzzy Theory is described in order to provide the analyst with the means for dealing with vague statements, uncertain observations or the fuzziness of human perceition and interpretation, in general. The applications section demonstrates advantages of Fuzzy Theory methods compared to common mathematical methods.
The concept of Fuzzy Theory is described in order to provide the analyst with the means for dealing with vague statements, uncertain observations or the fuzziness of human perceition and interpretation, in general. The applications section demonstrates advantages of Fuzzy Theory methods compared to common mathematical methods.
O by Springer-Verlag 1987 1 Department of Mathematics and 2 Department of Chemistry, Bergakademie Freiberg, DDR-9200 Freiberg, German Democratic Republic r Fuzzy Theory in Analytical Chemistry Hans Bandemer 1 and Mat t hi as Ot t o 2,* Abstract. The concept of fuzzy theory is described in order to provide the analyst with the means for dealing with vague state- ments, uncertain observations or the fuzziness of human percep- tion and interpretation, in general. In a theoretical part, basic notions of fuzzy theory are given, such as types of membership functions, operations with fuzzy sets, definitions of fuzzy numbers, points, functions, and relations, and the use of linguistic variables. The difference between fuzziness and probability is outlined. The applications section demonstrates advantages of fuzzy theory meth- ods compared to common mathematical methods with respect to data handling for calibration of analytical methods, to classifica- tion of chromatographic and spectroscopic patterns, to component identification and multicomponent analysis, and to designing fuzzy expert systems for selection of analytical procedures. Key words: fuzzy data analysis, component identification, multi- component analysis, expert system. Analytical chemistry has devel oped into an interdisciplinary science t hat uses techniques and knowl edge f r om chemistry, physics, mat he- matics, material science, engineering, and biology. The increasing needs of analysis request ed by research, i ndust ry and society have added even met hods of l abor at or y organization, dat a management systems and expert i nformat i on systems t o analytical chemistry. Wi t hi n the frame of this devel opment t he analytical chemist is mor e and mor e asked t o solve compl ex probl ems, e. g. t o advise the necessary equi pment for solving the specific analytical probl ems * To whom correspondence should be addressed. 94 H. Bandemer and M. Otto: of a given l abor at or y or of a whol e company, to optimize and rationalize t he performance of the met hods and t o deal wi t h real wor l d cases rather t han wi t h t oy examples. In such situations the chemist becomes awar e of the fact t hat he has to deal wi t h many types of vague or ill-defined statements, wi t h uncertain or i ncompl et e dat a or observat i ons, and wi t h t he fuzziness of human percept i on and interpretation, in general. Ex- amine, for example, the fol l owi ng statements: t he precipitate is washed "several times" wi t h "di l ut ed" sodi um hydroxi de; the meth- od shoul d enable "trace" concentrations to be determined; the "ma- trix" effects are "qui t e st rong"; there are "some deviations" f r om Beer' s l aw; the pl asma t emperat ure shoul d be kept "near t o" 4500 K. Very often one notes t hat the uncert ai nt y of t hose notions, in- structions or statements is inherent and cannot be described by means of statistical terms. This kind of vagueness and uncert ai nt y can however, be t aken into account by the concept of fuzzy t heory as i nt roduced in 1965 by Zadeh [1]. In fuzzy set t heory, the mem- bership of an element or obj ect to a definite set of el ement s/ obj ect s is t aken t o be gradual rat her t han abr upt (1 or 0) revealing a basis for considering uncertainty and impreciseness. In essence, fuzzy t heory is an exact mat hemat i cal t heory and has mat ured into a wi de ranging collection of concepts and tech- niques as well as applications in al most all branches of sciences [2]. As a readabl e monogr aph the book by Duboi s and Prade [3] shoul d be consulted. Books wi t h more tutorial aspects have been present ed by Zi mmer mann [4] and by Kaufman [5]. The concept of gradual membership t o a set - - the concept of fuzzy sets - - aut omat i cal l y raises t he question (especially for a stat- istician) concerning a relationship bet ween fuzziness and probabi l - ity. A closer l ook at the difference bet ween fuzziness and probabi l i t y however, can only be t aken after t he basic not i ons of fuzzy t heory have been given. So we shall ret urn to this subject at t he end of the theoretical section. The idea of fuzzy t heory can perhaps be underst ood from the fol l owi ng example. A spectroscopic line has t o be identified in order t o specify a funct i onal group in infrared spect roscopy or t o decide on the presence of an element in at omi c spectroscopy. This is done by compari ng the line posi t i on wi t h lines appearing in a library of reference lines. Since the experimentally obt ai ned line will surely not mat ch exactly t he t abul at ed line, an interval ar ound the refer- ence line is usually defined in order t o decide whet her the line from t he reference library coincides wi t h t he candi dat e line or not. A value of 1 is assigned t o a line t hat matches the interval ar ound Fuzzy Theory in Analytical Chemistry 95 t he reference line and t he value 0 is assigned to lines outside t he defined interval. So only a yes/ no (1/0) answer is obt ai ned and no difference can be made wi t h respect t o a line t hat comes close to t he boarder of t he interval or to a line t hat matches exactly t he reference line. Wi t h fuzzy t heory t he coincidence of t he t wo lines can be de- scribed much mor e detailed. For example, for a line t hat comes closest to t he candi dat e reference line, a value near to I is assigned, whereas t he mor e t he line position deviates f r om t he exact mat ch t he l ower a value is assigned t o t he match. The out come of t he compari son does not only reveal t he i nformat i on on whet her t he mat ch has been successful or not, but it also gives a rating of t he quality of t he mat ch graduat ed bet ween 0 and 1. Applications of fuzzy t heory in analytical chemistry are still in their i nfancy but have been shown to be wor t hwhi l e for probl em solving in different fields of analytical chemistry. It has been applied for library searching in t he i nfrared [6] and ultraviolet [7] spectral range, for pat t ern classification [8] and clustering [9], for optimiza- tion in case of multi-criteria decisions [10], for calibration of linear and non-l i near signal-concentration dependences [11], for spectro- phot omet ri c mul t i component analysis [7], for judging t he exploit- able i nformat i on of analytical results [12] and most recently for selecting analytical procedures by a fuzzy strategy support ed expert system [13]. In order t o i nt roduce t he reader to t he techniques of fuzzy t heory met hods in analytical chemistry, t he most i mport ant basic notions are outlined and t he advantages of fuzzy modelling and fuzzy pat t ern recognition are demonst rat ed by exploring examples of practical applications. Some Basic Noti ons The mai n idea of foundi ng fuzzy set t heory was t he generaliza- tion of t he common set notion. When defining a common set, say Me, we are given a collection of elements, t he universe X, being of interest in our context. Then Mc is defined by specifying for each element of t he universe, whet her it belongs to Me or not. This can mat hemat i cal l y be expressed by a characteristic function, say rnc, t hat assigns an element x of t he universe X a value of I if it be- longs to M~ and of 0 otherwise: 1 if x e Mc GX, m~ (x) = 0 if x ~ Mc c X. (1) 96 H. Bandemer and M. Otto: If we also al l ow values bet ween 0 and 1 t o be grades of member- ship wi t h respect t o X, we obt ai n a fuzzy set M. Thus, the transi- tion bet ween membershi p and non-membershi p may be described gradually rat her t han abruptly. The funct i on m val ui ng the elements x E X wi t h numbers in the closed interval [0, 1] and thus defining the fuzzy set M, is called membershi p funct i on of M, for short m. f. of M. A common set, for whi ch the m. f. yields only t wo values, 0 and 1, respectively, is called crisp in our context. For interpretation, there can be elements x ~ X for whi ch we do not state whet her t hey belong t o M (i. e. m ( x) =l ) or not (i. e. m ( x) =0) . The value m (x) can be explained as t o whi ch grade or degree the element x belongs t o M. When we consider mor e t han one fuzzy set, say M and N simultaneously, we shall add the name of t he set as an i ndex t o the correspondi ng m. f., e. g. raM, rnN. In all cases of application we have t o start by specifying uni - verses and fuzzy sets in them. Rememberi ng the exampl e in t he i nt roduct ory part - - the compari son of a crisp spect roscopi c line x t o a fuzzy candi dat e reference line - - , the uni verse X whi ch is t o be specified, woul d be the energy or wavel engt h axis and t he un- certainty of the appearance of the line coul d be model l ed by a fuzzy set M having the shape of a bell or of a triangle. So the membership value m ( x) = 1 woul d be assigned only t o t hat element x of the uni verse t hat meets the maxi mum of the membershi p func- tion, i. e. where t he experimental line t aken as being crisp matches t he reference line. Elements ar ound the reference line are charac- terized by the degree t o whi ch the experimental line is compar abl e wi t h the reference line. A special case of a fuzzy set is a fuzzy measurement or fuzzy observation. Her e m (x) indicates the degree by whi ch x is t o be considered as a result of our measurement at hand. It makes sense t o explain the values of m as shades on a scale [0, 1], where 0 means whi t e and 1 black. In this scheme fuzzy sets correspond to grey-tone pictures and coul d be mani pul at ed by image processing equipments. For specifying the membership functions, one must exploit the special knowl edge of the expert together wi t h t he preliminary in- format i on on t he probl em at hand. Frequently, t he specification of a m. f. can in the broadest sense be inspired by statistical material. Fort unat el y, the choice of the specific mat hemat i cal form of the m. f. has, as a rule, onl y little influence on the conclusions t o be dr awn. In general, the guideline is dictated by mathematical con- Fuzzy Theory in Analytical Chemistry 97 venience. We ment i on here t he f ol l owi ng t ypes f or t he one di men- si onal case (Fig. 1): ( 1 "~C I X - - a [ : 0 ) - 1 , exp ( - c I x - a l % [ l - c [ x - a l ~ ] + wi t h [v] += ma x (0, v), 1 - exp ( - c (x - a) ~) f or x > a, (2 ) (3 ) (4 ) (5 ) wi t h sui t abl y chosen const ant s a, c, p, wher e c and p have t o be posi t i ve number s. A si mpl e general i zat i on of t he mul t i di mensi onal case is given by repl aci ng t he di fference I x - a [ bet ween t he num- bers x and a by a di st ance bet ween t he poi nt s x and a. If we have t o t ake i nt o account as ymmet r y in speci fyi ng rn, we can at a connect branches of t he chosen t ype wi t h di fferent par am- eters, and even branches of di fferent t ypes. When usi ng i mage processi ng equi pment , t he choi ce of a suit- able t ype becomes less essential; t he member shi p f unct i on ma y be const r uct ed l ocal l y, e. g. by splines. In or der t o handl e f uzzy sets efficiently, not i ons k n o wn f r om c ommon set t heor y have t o be applied. Besides these, however , ot her not i ons will occur. The support of a f uzzy set M is t he set of all el ement s x of t he universe, whos e gr ade of member shi p is positive, i. e. supp M = (x e X: m~ (x) > 0). (6) In a cor r espondi ng manner , t he e-cut M~ and t he strong e-cut M~ are defi ned by: M=: =( x e X: m~ ( x ) >o ~ ) ; M~ : =( x e X : m~ ( x ) >o O. (7) The cardinality of a c ommon set is t he number of its el ement s (in t he case of a fi ni t e set) or its sui t abl y defi ned cont ent s (in t he case of an i nfi ni t e set). Wi t h respect t o a f uzzy set M, we ma y defi ne, in anal ogy, t he (absol ut e scalar) cardinality by car d M = Z m ( x ) or card M = f. m (x) dP (x) ( 8) x ~X X wi t h a sui t abl e measur e P. For bounded universes we ma y choose dP (x) = dx. In cert ai n cases it ma y be of i nt erest t o compar e (absolute) cardi nal i t i es of di f f er ent f uzzy sets wi t h each ot her. Then we can 7 Mikrochim. Acta 1986 II/1-6 98 H. B a n d e me r a n d M. Ot t o : re(x} 1.O O.8 0.6 0.4 0,2 0 0 re(x) 1. 0- 0. 8- 0. 6- 04 0.2 0 ~ [ . / / ", \ \ ~ < j l ....................... . J" . . . . . . , , I I I , , l 2 4 6 8 I0 12 14 1 6 x 2 1 i l I I 2 ~ , ~ , 2 , 4 , 6 x b. | I 6 8 Fi g. 1 refer t o a s t andar d set V, perhaps t o t he j oi nt universe X, defi ni ng t he relative cardinality tel v card M = (card M) / ( car d V); ( 9 ) Even t he s t andar d set may be fuzzy. The appl i cat i on of t hi s not i on, however , makes sense onl y, if we pr ovi de t hat supp V~ supp M and relr car d M _< 1 f or all M' s whi ch are t o be compar ed. A crisp set Me is included in anot her crisp set Nr (Mr162 if any el ement of M~ is also an el ement of No. For f uzzy sets we say M--_ N, if f or all x e X mM (X) <_ mN (X). (10) Fuz z y Th e o r y i n An a l y t i c a l Ch e mi s t r y 99 re(x) 1.0 0.8 ( 1 6 O.4 0 2 0 rr,(x} 1 . 0 O.8 O.6 0.4 O.2 0 0 x I/ i | - - X Fi g. 1. Ex a mp l e s of me mb e r s h i p f u n c t i o n s f o r t h e o n e - d i me n s i o n a l cas e a c c o r d i n g t o a Eq. (2), b Eq. (3), c Eq. (4), d Eq. (5). Th e c o n s t a n t s a r e as f o l l o ws : c=1, a=lO, p = l ( da s he d l i n e , c ur ve 1), p=2 ( s ol i d l i ne , c ur ve 2), p = 3 ( d o t t e d l i ne , c ur ve 3) The intersection of t wo crisp sets Mc and Nc (M~nNr contains all elements belonging t o bot h sets simultaneously. For fuzzy sets we define (cf. Fig. 2). L =Mn N: mL ( x ) =mi n ( mM( x ) , mN( x ) ) ; x GX . (11) The cardinality of t he intersection wi t h respect t o one of the sets can be used as a grade o~ containment CM (M, N) = (card (M c~N))/ (card M), (12) c2v (M, N) = (card (M nN) ) / ( c a r d N). 7* 100 H. Bandemer and M. Otto: If it does not ma ke sense t o pr ef er one of t he sets, a l i near com- bi nat i on is possi bl e f or this pur pos e: c ( M, N ; fl) = fl CM ( M, N ) + (1 - 13) c~v (M, N) ; /3 c (0, 1). (13) Thi s is not t he onl y possi bi l i t y t o def i ne such grades of cont ai n- ment . In Eqs. (12) and (13), nume r ous but slight vi ol at i ons of (10) ar e consi der ed t o be as i mpor t a nt as onl y f ew but heavy ones . i n ~ ' e r s e d i o n : rnL(x ) u n i o n : inK(X) c o mp l e me n t : rn~{x) Fig. 2. Elementary fuzzy set operations between t wo fuzzy sets M and N. Intersection, union, and complement are formed according to Eq. (11), (14) and (15), respectively Th e u n i o n of t wo c r i s p sets Me and Nr ( Mr 1 6 2 i nvol ves all el ement s bel ongi ng t o at l east one of t he sets. For f uzzy sets we defi ne: K = M ~o N : mK (X) = ma x (raM (X), rnN ( x ) ) ; x ~ X . (14) Fi nal l y, t he compl ement of a c r i s p set Me (Me) cont ai ns all ele- ment s of t he uni ver se n o t bel ongi ng t o Me. For a f uzzy set M we defi ne: M: r n~ (x) =1 - - r n M (x); x e X. (15) Fuzzy Theory in Analytical Chemistry 101 Nat ur al l y, t he defi ni t i ons i n (11), (14), and (15) are not t he onl y possi bl e ones maki ng sense, yet t hey are t he mos t f r equent l y used. For crisp sets, t he oper at i ons are equi val ent t o t hose used i n com- mon set t heor y. To see t hi s, we ma y i nsert t he member shi p func- t i on (1) i nt o t he f or mul ae (11), (14), and (15). For ot her concept s we have t o refer t o t he l i t erat ure [3]. Havi ng def i ned t he basi c rules f or f uzzy sets, we can n o w go on t o general i ze c ommon not i ons as number , poi nt , f unct i on, and rel at i on. A numbe r is an el ement of t he real axis E. Theor et i cal l y we coul d call every f uzzy set on E a f uz z y number. For t he sake of a useful r easoni ng, however , we will rest ri ct t he not i on t o t he case in whi ch t he f ol l owi ng condi t i ons are satisfied: (i) The member shi p f unct i on is convex, i. e. f or every pai r (Xl, x2) wi t h xl , x2 E X and every 2 ~ [0, 1] i t hol ds m (2 xl + ( 1 - 2 ) x~)_> mi n (m (xl), m (x2)). (16) (ii) Ther e is onl y one x0 wi t h m (x0)= 1 (x0 is called t he mean val ue of M). (iii) m is pi ecewi se cont i nuous. Condi t i on (i) is satisfied if t he m. f. decreases monot onous l y t o bot h sides of x0 (or of an i nt erval ar ound x0 wi t h m ( x) =1) . Exampl es are given by t he f unct i ons f r om (2), (3), and (4) wi t h x0 =a , e. g. t he f uzzy number M: "cl ose t o 2" can be given by mM (X) = [1 --5 [X--2[ ]+; X ~ E. (17) A poi nt in any Eucl i dean space E n can be represent ed by a vect or of number s. But we do not defi ne a f uzzy poi nt as a vect or of f uzzy number s. It is mor e conveni ent f or appl i cat i on t o i nt r o- duce a f uz z y poi nt as a f uzzy set on t he uni verse E n sat i sfyi ng t he condi t i ons (i) t o (iii) of (16) when i nt er pr et ed in t he E n. In t he t wo- di mens i onal case we ma y i magi ne a f uzzy poi nt as a c ommon poi nt s ur r ounded by a gr ey- t one zone. Denot e by x = ( x l , . . . , xk)' t he vari abl e and by xi = (xl~ . . . . . xe~)' t he vect or of mean values, and let B~ be some posi t i ve-defi ni t e mat r i x, t hen mi (x; x, , B~ ) = [ 1 - ( x - x , ) ' B~ ( x - x , ) ] + (18) will be such a f uzzy poi nt . The suppor t is a k- di mensi onal hyper- ellipsoid and m is a sect i on of a ( k+l ) - di me ns i ona l elliptical hyper par abol oi d ar ound x/. 102 H. Bandemer and M. Otto: Remarl~. The membership function m according to (18) can be explained as a second-order approximation of a h-dimensional normal density renormalized to the maximum value 1. Fuzzy observations will most frequently be represented by fuzzy points, but other specifications also can make sense, e. g. when there are several or many points x with m (x) = 1, e. g. along a curve. In general, the membership function of a fuzzy observation will decrease monotonously to zero in the neighbourhood of these points, possibly with increasing distance and dependent on direction. A next step can be a fuzzi[ied function, i. e. a family of fuzzy numbers. To be in accordance with the denotation for common functions, we will write y =f (x) where y is now given by a fuzzy number. The fuzzified function is defined by the membership func- tion m (y; x), where x acts as a parameter. In the two-dimensional case we can imagine such a fuzzified function as a common function surrounded by a grey-tone zone (see below Eqs. (25), (26)). The notation "fuzzy function" will be reserved to the case of a function of fuzzy variables which has to be discussed in the sequel. Now, it is useful to remember how a relation can be defined in common mathematics. We consider elements from two universes, say x e X and y e Y. A relation R between X and Y can be spec- ified in the simplest manner listing all pairs (x, y) for which the relation holds. Hence R is a subset of the set of all pairs, called X x Y, the Cartesian product of X and Y. For example, we consider the case where X and Y are the real axes E and X x Y = E ~ is the two-dimensional Euclidean space. The relation R0: "equal" is specified by the set R0 = {(x, y) ~ E~: x = y}. (19) It corresponds to the set {(x, x); x e E } (20) which is the graph of the well-known function y =x, the diagonal line in the first and third quadrant of the plane. Hence we see that common functions are special relations. Another example is supplied by the relation RI: "larger than" specified by the set Rl ={( x, y) eE~: x>y}. (21) This is the lower half space below the straight line y=x. This is the starting point to define restrictions if the elements of the uni- Fuzzy Theor y i n Analytical Chemistry 103 ve r s e a r e c o n s i d e r e d as variables: if y =y o t h e n x mu s t b e l a r ge r t h a n y0. Fuzzy relations a r e f uz z y s u b s e t s o n X Y gi ve n b y me mb e r s h i p f u n c t i o n s d e p e n d i n g o n t w o a r g u me n t s of e q u a l i mport ance, e. g. mR (x, y). I t d e p e n d s o n t h e c o n t e x t wh e t h e r s u c h a f u n c t i o n is t o b e c o n s i d e r e d as de f i ni ng a f u z z y r e l a t i o n o r a f uz z y o b s e r v a t i o n . F o r e x a mp l e , we p r e s e n t a f u z z y mo d i f i c a t i o n of R0, s a y R2: " n e a r l y e q u a l " . T h e me mb e r s h i p f u n c t i o n ma y b e mR2 (x, y) = e x p { - ( x - y ) 2 } ; (x, y) E E 2. (22) I t e qua l s o n e if x = y a n d de c r e a s e s t o z e r o wi t h an i nc r e a s i ng di f - f e r e n c e b e t we e n x a n d y. An o t h e r e x a mp l e is s u p p l i e d i n a n a l o g y t o R1, s a y Ra: " n e a r l y l a r ge r t h a n " . A p o s s i b l e me mb e r s h i p f u n c t i o n f o r R3 wi l l b e mR~ ( x ' Y ) = j [ 0 . 1 - 1 x - y ] ] + if x < y , (23) 1 - e x p { - ( x - y ) + l n O . 9 } if x > y . I n (23) t h e r e l a t i o n R3 tolerates e ve n pa i r s wi t h x < y, b u t o n l y wi t h a v e r y l o w g r a d e of me mb e r s h i p a n d wi t h i n an e x t r e me l y s ma l l r a nge . F o r i nc r e a s i ng x - y t h e me mb e r s h i p f u n c t i o n a l s o i ncr eas es . I f t h e e l e me nt s of t h e universes a r e c o n s i d e r e d as v a r i a b l e s , t h e r e l a t i o n c a n a c t as an elastic constraint, c a l l e d restriction. Ob v i o u s l y , t hi s c o n c e p t c a n be ge ne r a l i z e d t o mo r e t h a n t w o uni ve r s e s , F u z z y r e l a t i o n s c a n b e c o mp o s e d . I n t h e s i mpl e s t c a s e w e h a v e a f u z z y r e l a t i o n R o n X Y a n d a f uz z y r e l a t i o n S o n Y x Z. T h e composi t i on R o S c o n n e c t i n g X a n d Z is d e f i n e d b y t h e me mb e r - s hi p f u n c t i o n mR o s o n X Z mR o s (x, z) = s up mi n (mR (x, y) , ms (y, z) ). (24) x e Y An i nt e r e s t i ng s pe c i a l c a s e of s u c h a c o mp o s i t i o n is t he s o- c a l l e d ext ensi on principle (cf. ref. [3], p. 36) u s e d t o o b t a i n a crisp f u n c - t i o n [ of f u z z y set s, i. e. t h e me mb e r s h i p f u n c t i o n o n t h e r a n g e of f gi ve n b y t h e me mb e r s h i p f u n c t i o n s of t h e a r g u me n t s . F o r e x a mp l e , we c o n s i d e r t h e f u z z y s et Mr o n t h e u n i v e r s e X, t h e f u z z y s e t My o n Y, a n d t h e f u n c t i o n z = f (x, y) . T h e f u z z y s e t Mz o n Z ma p p e d b y [ is t h e n d e f i n e d b y ml (z) = s up mi n (mMx (x), mMy (y)). (25) {(x, y): z =f (x, y)} T h e s u p r e mu m is t o b e c a l c u l a t e d f o r e ve r y z o v e r al l (x, y) f o r wh i c h f (x, y) ha s t h e v a l u e z. 104 H. Bandemer and M. Otto: In such manner the fuzziness of the arguments is ext ended t o the range of any function, whi ch explains the chosen denot at i on. The generalization of the extension principle t o more t han t wo arguments is obvi ous from (25). On the ot her hand, the principle can be simplified for funct i ons of onl y one argument by m1(z) = sup mMx (x). (26) fx: z=f(x)} If the funct i on is one-to-one, t he supremum is superfluous, e. g. f ( x ) =- x : r n j ( z ) =m( - z ) ; f ( x ) =a x ; a>O: mi ( z ) =m( z / a ) ; / ( x) = exp x: ms ( z ) =m (ln x) if x>O and zero elsewhere (m stands for mMx). The not i ons i nt roduced in this section up t o now form the basis for mor e compl i cat ed probl ems and their solutions. For example, we may consider the probl em: To whi ch grade is "near 20 .... essen- tially larger" t han "near 10"? Although this coul d be t reat ed wi t h t he mathematical tools just supplied we consider it beyond the frame of our i nt roduct i on, and refer t o the literature [3, 4]. Finally, we will present the not i on "linguistic variable". This variable can assume several values whi ch are verbal units, wor ds or sentences, in a natural or artificial language. A simple exampl e is given by the variable, "st at ure" as used in a war r ant of apprehension. The values are certain labels, e. g. very tall, tall, medium, short, very short. Each of these labels corresponds t o a fuzzy set on the universe "hei ght ": (0,3) when measured in metres. In specifying the membershi p funct i on belonging t o the different labels, it is not al ways necessary t o think over each label anew. There are suggestions how t o define membershi p funct i ons of all the labels starting wi t h onl y f ew specified membership functions. For instance, let mT (X) be the membership funct i on for the label "tall". Then it woul d be possible t o t ake for the ot her labels very tall short very short medi um m v T : = m T 2 , m s : - ~ 1 - - m T , mrs: = ( 1- mT) ~, mi : = min (mT, 1--roT), (z7) (neither tall nor short). Anot her proposal starts wi t h t wo separately specified member- ship funct i ons; in our exampl e mT and ms. Then mrs: = ms 2 and raM: = (1 - roT, 1 -- ms). Fuzzy Theory in Analytical Chemistry 105 The preceding proposals are to be used wi t h caution. They make sense only in certain special cases. The specification of such modifi- cators should be done in close connect i on wi t h t he probl em at hand. There is a number of furt her proposals for modi fyi ng so-called pri mary terms, for whi ch t he membershi p funct i on has been speci- fied. We ment i on here "opposi t i on" (not), "weakeni ng" (not very tall; mor e or less tall), "intensification" (rather short, extremely tall) and "composi t i on" (in our example: neither tall nor short). This leads to furt her shades o[ values for t he linguistic variable. It is possible, in similar manner, to i nt roduce t he linguistic variables truth, probability, and possibility, for whi ch t he universe is t he unit interval [0, 1]. Havi ng specified t he membership funct i on f or some pri mary terms, say high and l ow, we can come to shades according to t he above ment i oned rules. The i nt roduct i on of linguistic variables is t he starting poi nt for applying a [uzzy logic. Here, we have to value verbally formul at ed fuzzy statements and conclusions, interpreting t hem as relations and compositions of linguistic variables, and valuing their grades of t rut h or possibility. Fuzziness and Probability Now, we are able to explain t he difference bet ween specifying fuzzy settings and modelling by r andom elements. Let X be t he feat ure space for bot h approaches. In order to give a clear idea of what is meant , we consider t he case of a t wo- dimensional universe X x Y. Then m~ (x, y); (x, y) e X x Y; means t hat t he element (x, y) e X x Y is cont ai ned in t he fuzzy set A only to a degree characterized by mA (x, y). The set A corresponds to a grey-tone picture, t he shape of whi ch is blurred. If we i nt roduce a probability, say pA (x, y) for every (x, y) X x Y, it defines a r andom set. We may imagine a collective of floating opaque particles wi t h sharp edges. Then pA (x, y) is inter- pret ed as follows: when observing at poi nt (x, y), we have t he chance of pA (x, y) to meet a poi nt of t he floating particles. For each single observation we can state uniquely whet her a particle was met or not. In t he long run, t he frequency of this event will be about pA (x, y). In t he one-dimensional case, defining a fuzzy observation B, rnB (x); x e X; means t hat t he value x belongs to our observation at hand to t he degree mB (x), whereas a probability density, say [ (x), means t hat we expect a port i on of [ (x) d x ob- servations to lie wi t hi n t he interval [x, x + dx] in t he long run, i. e. when t he number of observations tends to infinity. 106 H. Bandemer and M. Otto: Statistical statements are concerned wi t h a mul t i t ude of obser- vations. Fuzzy statements deal only wi t h t he observations at hand. Applications C a l i b r a t i o n o ~ A n a l y t i c a l M e t h o d s The modelling of response-concent rat i on relationships (or of ot her dependent variables, such as signals, rates, or objective func- tions, on i ndependent variables, such as t emperat ure, pH, fl ow rate etc.) is performed in analytical chemistry by statistical met hods, mainly t he least-squares approach. Very often, bot h t he dependent and i ndependent variables are prone to error, e. g. in t he case of calibrating noisy responses to st andard concent rat i ons t hat have been validated by several analytical methods. Statistical met hods account i ng for errors in bot h responses (y) and concentrations (x) [14] can be disadvantageous if only a small sample size is available and thus t he statements concerni ng t he actual properties of t he estimates become poor. Furt hermore, t he i ncorporat i on of prior knowl edge or subjective aspects with respect to t he uncert ai nt y of the dat a is carried out more easily by fuzzy met hods t han by Bayesian procedures, since t he application of t he latter can be a doubt ful mat t er if st andard model assumptions do not hold. By using t he fuzzy approach, t he error in observations is modelled by t he concept of membershi p to t he set of possible ob- servations, and t he predicted concent rat i on values can be v a l u e d by a membership funct i on wi t hout i nt roduci ng probability based assumptions as necessary in t he case of statistical methods. Here we consider an exampl e for a straight-line calibration of responses (y) versus concent rat i on (x) [11]. The error in t he observations is t aken into account by an ellip- tical domai n of influence as t he support of a fuzzy set (cf. Eq. (6)). The membership funct i on of t he specified fuzzy observation, say M~, is t hen chosen as a section of an elliptical hyperbol oi d in t he fol- l owi ng manner rnt (x, y) = [1 - ( ( x - x ~ ) 2 / u ~ 2 + ( y - y ~ ) 2 / v l 2 ) ] + (28) where ui and v~ are t he lengths of t he half-axis of t he supporting ellipses for M/ a n d for [v] + see Eq. (4) (cf. Eq. (18) and see Fig. 3). Then we t ake the u n i o n M of t he m. f. of our fuzzy o b e r s v a - t i o n s M ~ according to Eq. (14), i. e. M : r n M (x, y) : max mi (x, y) (29) i Fuzzy Theory in Analytical Chemistry 107 a n d w e c h o o s e a s a reference set t h e s u b s e t X 0 o f t h e r e a l axi s E w h e r e t h e r e i s a t l e a s t o n e p o i n t ( x , y) w i t h r n ~ ( x , y) > 0 , i . e . X 0 = { x e E: s u p m~ (x, y) > 0 } . ( 30) y e E T h e s e t X 0 i s t h e s e t w h e r e w e h a v e ( f u z z y ) i n f o r m a t i o n c o n c e r n i n g o u r c a l i b r a t i o n p r o b l e m . ( I n f u z z y t h e o r y X 0 w o u l d b e c a l l e d t h e s u p p o r t o f t h e f u z z y p r o j e c t i o n o f M o n t o t h e x - a x i s . ) arbi trar, uni~ Y 0.6 q5 ~4 0.3 0.2 0.1 1 I ' ~ I 0 . 1 0 . 2 0 . 3 0 . 4 0 . 5 x arbitrary units Fig. 3. Calibration of responses (y) versus concentrations (x) based on the concept of fuzzy observations. Both y and x are given in arbitrary units. The elliptical support of the memberhsip functions is marked black; the white point represents a membership value belonging to the fuzzy observation of 1. The parameters for the straight lines (Eq. (31)) are as follows: 1: a0=0.020, a1:=0.92, m~=0.77; 2: ao=O, a1=1.12, mc=0.58; 3: ao=-O. 03, a1=1.32, mc=0.32 108 H. Bandemer and M. Otto: Now, we i nt roduce the family of straight lines y = a o + a l x; x ~ E; (a0, al) e E 2 (31) and consider t he graph of t he straight line {(x, a0 + al x); x ~ E} (32) for every (a0, al) E E 2. The relative cardinality of M along this graph can be used as a measure of fit for t he observation M to t he straight line wi t h (ao, al ) . Taki ng X0 as the st andard set V and d P ( x ) = d x , we obtain, ac- cording t o Eqs. (9) and (8) relx0 card M (along t he graph (32)) = ~ mM (x, ao +a l x) d x / . [ d x . (33) X0 X0 As a funct i on on (a0, al) this relative cardinality defines a fuzzy set on t he par amet er space E 2 indicating t he measure of fit for every (a0, al) e E 2. To make this clear, we will wri t e rn~o (ao, a l ) = S mM ( x, a o +a l x) d x / S d x . (34) Xo Xo In order to enable different families of functions to be applied for modelling a calibration dependency, we suggested [11] compari ng t he comput ed relative cardinality wi t h local approxi mat i ons of t he functional relationships. The relative cardinality for t hose local approxi mat i ons mR0 (f) are calculated in analogy to Eq. (34), i. e. mR~ (f) = 5 sup m z ( x, y) d x / S d x . (35) Xo y ~ Y Xo The difference is that, at every x-position, t he y-values where t he funct i on mM (x, y) assumes t he supremum are considered. The degree of approxi mat i on t hat is reached by t he straight line compared wi t h t he local approxi mat i on is t hen obt ai ned by: mc (a0, a l ; / ) : = mR~ (ao, al)/mRo (f). (36) Examples of mE-values for t he straight lines are given in Fig. 4. As t he opt i mum degree of approxi mat i on a membership value of rn~ (ao, a l ; f ) = 0 . 7 7 was derived wi t h a0=0. 20 and al - - 0. 92 [11]. The fuzzy set me (a0, al ; f) can be regarded as a fuzzy set over t he par amet er set A. This, so-called fuzzy estimate of t he un- known parameters, can be used to comput e fuzzy predictions for a given y0-value. In fuzzy t heory terms, t he fuzzy predictions can be derived f r om t he extension principle according to Eq. (26). Des- Fuzzy Theor y in Analytical Chemi st ry 109 ignating the m. f . for the predi ct ed x-value at t he measured y0- value wi t h m0 (x; y0), t he fuzzy predi ct i on for x reads m0 (x; y0) -- sup mc (a0, al ; f). (37) {(ao, ax): yo=ao+azx} Not e t hat the mi mi num t o be t aken in Eq. (25) becomes super- fl uous in our case because t he paramet ers (a0, al) bel ong t o t he j oi nt fuzzy set A. mo( x , y o } 5 { I I I X C o n c e n t r a f i o n , a . u . Fig. 4. Membership curves for fuzzy predictions of concentration x by the straight line model (Eq. (31)) at signal values of y0 of 1.48 (1), 3.17 (2), and 4.68 (3) Examples of fuzzy predictions for y0-values of 1.48, 3.17 and 4.68 are outlined in Fig. 4. These fuzzy predictions do not only reflect t he error in the observat i ons used for their calculation (as confidence intervals woul d do in a statistical approach) but reveal also a detailed valuation of the predi ct ed concent rat i ons along the x-axis. In our exampl e the intuitive expect at i on t hat the predic- tions at high concent rat i ons are less certain t han at l ower ones due t o t he outlier at t he 5th x-posi t i on is reflected by the br oader membershi p curves at higher concent rat i ons compar ed wi t h l ow concentrations. Classification of Chromatographic and Spectroscopic Patterns A classification of sampl e pat t erns is necessary for assuring t he qual i t y of a final product , e. g. by compari ng t he metal pat t ern of a steel sampl e wi t h t hat of a certified st andard, or for judging the 110 H. Bandemer and M. Otto: ori gi n of a compl exl y composed envi r onment al or bi ol ogi cal sampl e by usi ng its chr omat ogr aphi c profi l e as a chemi cal fi ngerpri nt . The general pr obl em arises out of pat t er n recogni t i on met hods based on supervi sed l earni ng t echni ques, wher e a sampl e pat t er n has t o be assi gned t o a set of sampl es wi t h equal or si mi l ar feat ures measur ed on t he samples. The met hods used so f ar are essent i al l y "i nt er pat t er n di st ance" classifications, such as t he k-nearest nei gh- bout met hod, met hods t hat descri be t he di scr i mi nat i on bet ween t he classes by a f unct i onal rel at i onshi p of t he feat ures, e. g. t he l i near l earni ng machi ne, or i ndi vi dual class model l i ng t echni ques, such as t he SI MCA met hod and probabi l i st i c di scr i mi nat i on t echni ques [15]. Though t he newer t echni ques al l ow t o over come l i mi t at i ons of classical pat t er n recogni t i on met hods, t here is no s t r ai ght f or war d st rat egy for handl i ng dat a sets whi ch s how a hi gh vari abi l i t y i n t he dat a pat t er ns as, f or exampl e, chr omat ogr aphi c dat a obt ai ned on compl ex tissue samples wher e t he number of peaks i n a pyrol - ysis gas chr omat ogr am can var y bet ween 105 and 147 [16]. Such C h ro m a to q r_ a p h ic F in g e _ r p r in fin g _ i l I I c , a 1 I I I c , a s s 2 i n ll mi x 0 2 4 6 8 Retention time, x Class 3 j fuzzyfied class 3 lOmin'/2 Fig. 5. Chromatographic patterns based on the retention time as the universe. For all peaks measured in the samples of one class, a membership value of 1 has been assigned. The line patterns are then used for fuzzifying the retention time data within a class as exemplified for the class 3 pattern at the bottom of the figure Fuzzy Theory in Analytical Chemistry 111 pa t t e r ns can a dva nt a ge ous l y be h a n d l e d by t he f uzzy a p p r o a c h be- cause, wi t h f uzzy set me t h o d s , sets r a t he r t h a n vect or s are c ompa r e d. Th e pr i nci pl e of f uzzy p a t t e r n cl assi f i cat i on is her e expl ai ned f or j udgi ng t he or i gi n of c h r o ma t o g r a p h i c pr of i l es wi t h r espect t o t hei r r e t e nt i on o r / a n d i nt ens i t y pa t t e r ns [8]. Typi cal r e t e nt i on t i me pa t t e r ns f or t hr ee classes of ur i ne s ampl es anal yzed f or pr ot e i ns by HP LC are s h o wn i n Fig. 5. Th e pa t t e r ns c ons t i t ut e t he t r ai ni ng set a nd we r e o b t a i n e d by over l ayi ng t he pa t t e r ns of r e t e nt i on t i mes x0~; i = 1 , . . . , n; of t he t r ai ni ng s ampl es avai l abl e. Since t he ocur - r ence of a chemical compound at a def i ni t e r e t e nt i on t i me is r a t he r uncer t ai n, t he r e t e nt i on da t a are fuzzi fi ed, e . g . by a bel l - shaped m. f. of t he f ol l owi ng f o r m: m~ (x) = exp { - ( x -xoi)2/2b2}, (38) whe r e i = 1 , . . . , n, wi t h n r epr es ent i ng t he n u mb e r of peaks i n t he t r ai ni ng class, a n d b me a ns t he p a r a me t e r of br oa dne s s of t he bell- shape. Fig. 5 gives an e xa mpl e f or class 3. F u z z y f i e d c l a s s 3 p a t t e r n : 1 m u ( ] OJ Sample p a t t e r n ~ ( c r i s p ) 1 m m X l Fuzzy i n t e r s e c t i o n r e s u l t Retention t i m e , x Fig. 6. Intersection of a fuzzified class pat t ern wi t h the sample pat t ern t aken as being crisp. The result of the fuzzy intersection is obt ai ned by the intersection of the membership values mu (x) of the crisp sample pat t ern wi t h the membership function rn (x) of the fuzzified class pat t ern according t o Eq. (39) 112 H. Bandemer and M. Ot t o: The classification of an unknown sample pat t ern is now per- formed by intersecting (cf. Eq. (11)) its ret ent i on time pat t ern - - being crisp wi t h mu ( x) = 1 at t he actual ret ent i on value and zero elsewhere - - wi t h t he fuzzy set of t he training samples as follows (cf. Fig. 6) mm (x) = min {m (x), mu (x)} (39) where m (x) = max mi (x). i This gives a vector of sympathy values mm (xj); j - - l , . . . , p ; t hat can be aggregated t o one final value by calculating t he cardi- nality p card M = Z' mm (xj) i =1 (cf. Eq. (8)) giving the "grade of cont ai nment " of t he unknown sample pat t ern to t he class pat t erns according to Eq. (12) cvu (M, Mu) = (card (M n M~) )/(card M~) (40) wi t h card Mu=p. Mat chi ng selected sample patterns against t he three training classes reveals values for t he grade of cont ai nment as shown in Tabl e I A. As expected, t he samples are correctly classified wi t hi n t he classes from whi ch t hey originate. The grades of cont ai nment of samples not belonging to t he class, range bet ween 0.32 and 0.84. Ta bl e I. Cl assi f i cat i on of Chr oma t ogr a phi c Pat t er ns Based on Fuzzi fi ed Cl ass Pat t er ns a nd Cri sp Sampl e Pat t er ns (see Figs. 5 a nd 6) Class Gr ade of c ont a i nme nt (Eq. (40)) obt a i ne d by ma t c hi ng agai nst or i gi n class n u mb e r 1 2 3 A. Based on r e t e nt i on t i me dat a 1 1 0.55 0. 32 2 0.41 1 0. 84 3 0.56 0.73 1 B. Based on r e t e nt i on t i me and si gnal r es pons e dat a 1 1 0.33 0.085 2 0.083 1 0. 39 3 0. 26 0.35 1 Fuzzy Theory in Analytical Chemistry 113 The discrimination ability of t he fuzzy met hod can be i mproved when t he signal responses measured at different ret ent i on times are i ncl uded into t he classification scheme. The m. f. can be t he same as stated for t he calibration probl em (Eq. (28)) where y represents t he signal response (absorbance) and x is t he ret ent i on variable. The results of fuzzy classifications in t wo dimensions are added to Tabl e I (IB) showi ng a clearer difference bet ween samples of t he same class origin and of a different one compared to classifications using only t he retention time dat a (Tab. I A). The met hod has also been successfully used for assuring t he quality of pain-relieving tablets by recordi ng their UV-spectra and mat chi ng t he fuzzified whol e class spect rum against t he sample spect rum [8]. Samples wi t h changing component concent rat i ons within a tolerated limit of _+2%, revealed grades of cont ai nment near to 1.0 qualifying t hem as correctly composed tablets. Ill-composed tablets were clearly detectable as outliers having grades of cont ai nment of less t han 0.2. Component Identification and Multicomponent Analysis Closely related to pat t ern classification are met hods of identifi- cation where unknown spectroscopic pat t erns are compared to a library of candi dat e reference spectra. Indeed, t he identification of chemical individuals by their i nfrared (IR)-spectra was t he first application of fuzzy set t heory in analytical chemistry [6]. Fuzzy mat chi ng of spectra may be advant ageousl y used if t he true line positions are distorted by unknown variations and if t he spect rum contains missing lines or ext ra lines f r om additional un- known component s and f r om unresolved doublets t hat spoil t he correct order of lines in a list. Blaffert [6] based his library compari son on fuzzifying t he line positions of either the sample or t he candi dat e reference spectrum, the compl ement ary spect rum being considered as crisp. An exten- sion of t he met hod to band intensities is also given in ref. [6]. The necessary mat hemat i cs are t he same as outlined in t he above dis- cussion on pat t ern classification. A mor e sophisticated met hod is needed if spectra are to be identified in t he ultraviolet/visible spectral range, e. g. for on-line identification in liquid chromat ography. This is reasoned by a part l y strong modi fi cat i on of spectra due to solvent effects t hat may pro- duce quite different spectra in t he library of candi dat e reference spectra compar ed to t hose obt ai ned in t he chromat ographi c run. 8 Mi krochi m. Acta 1986 II/1-6 114 H. Bandemer and M. Otto: The situation becomes even more compl i cat ed if a solvent gradient is applied to the mobile phase during the separat i on since then t he spectra in the experiment cannot be recorded under the same condi- tions as st ored in the library f r om the beginning. f1 . o o ; > / 1 0 Wove[ength, x b mb< Wavelength, x Fig. 7. Example of UV-spectra considered as a fuzzified sample spectrum and b fuzzified candidate reference spectrum To account for such changing conditions, the fuzzy met hod for spectra identification was ext ended by us [7] t o enable the com- pari son of bl urred experimental spectra wi t h bl urred candi dat e reference spectra of t he library (see Fig. 7). Using fuzzy t heory the solution of the pr obl em can be stated as subt ract i ng t he suitably normalized t wo spectra, i . e. subt ract i ng fuzzified functions, and comput i ng a measure of t he quality of coincidence by exploiting the resulting membershi p funct i on assigned t o t he obt ai ned residuals. Fuzzy Theory in Analytical Chemistry 115 F o r p e r f o r mi n g f u z z y a r i t h me t i c of f u z z y n u mb e r s ( a nd h e n c e of f uz z i f i e d f u n c t i o n s ) t h e m. f . ' s a r e b e s t r e p r e s e n t e d b y t h e s o- c a l l e d L R- r e p r e s e n t a t i o n ( l ef t - r i ght ) si nce, b y t hi s c o n c e p t , t h e a r i t h me t i c o p e r a t i o n s c a n b e f a s t e n e d . We c o n s i d e r f u n c t i o n s L a n d R o n E t o b e s y mme t r i c t o z e r o (i. e. L ( z ) = L ( - z ) ) , e q u a l t o o n e f o r z = 0 , a n d n o n - i n c r e a s i n g o n [0, oo]. I n t h e LR- r e p r e s e n t a t i o n , t h e s a mp l e s p e c t r u m a (x) a t x c a n b e wr i t t e n as : L ( a ( x ! - y ) f o r y < a ( x ) , r n r \ ~0 ( x ) ' (41) R(Y-a(x))~o(x) ' f o r y > _ a ( x ) , wh e r e t h e s pe c i f i e d e0 ( x ) > 0 a n d fl0 ( x ) > 0 r e p r e s e n t t h e l ef t a n d r i ght s p r e a d s of t h e d o ma i n of i nf l ue nc e , r e s pe c t i ve l y, a n d y is t h e a b s o r b a n c e (cf. Fi g. 8). 1 m [ z ) 0 z k R Fig. 8. LR-representation (left-right) of a fuzzy number z. The membership values m (z) range from 0 to 1. The z-value with the maximum membership value of 1 has been positioned at z =0, i. e. at the zero mean value T h e f uz z i f i e d r e f e r e n c e s p e c t r u m is e x p r e s s e d l i k e wi s e b y mb (y; x) = L ( b ( x ) - Y ) , for ~ ) y_<b (x), R ( Y ~ b(~) ) for y>_b(x), (x) ' (42) wi t h gi ve n ~ (x) > 0 a n d fl (x) > 0. T h e a r g u me n t s of L a n d R c a n t h e n b e di r e c t l y i n s e r t e d i n t o t h e e q u a t i o n of t h e m. f . , us i ng t h e f u n c t i o n L (z) = R ( z ) = [ 1 - z 2 ] *. (43) 8* 116 H. Ba nde me r a nd M. Ot t o: The difference bet ween spectra wi t h respect to the resulting m. f. is obt ai ned quite easily by a fast fuzzy operat i on: L ( a ( x ) - b ( x ) - y ) ~o (x) + fl (x) ma-b (y; x) = (44) R ( Y - ( a ( x ) - b (x)) ) . f l o ( x ) + o~ ( x ) As a suitable criterion for characterizing the quality of coinci- dence the fol l owi ng expression was pr oposed [7]: x n y~ (x) x h 0 N=[. y ym~- b( y; x) d y d x - y ~ yrn~-b(y;x) d y d x . (45) This is a measure whi ch characterizes up t o whi ch degree the dif- ference fits the "zero-function" in a fuzzy sense. The criterion is f or med by integrating the pr oduct of the residual value y and its membershi p value rn~-b over the whol e spectral range (with x~=-x l ow and xt~ =x high) and over the whol e absorbance range as well. A minimum N characterizes the best fit. Additionally, a param- eter for the quality of the compari son can be calculated by t he degree of similarity, ms, ms = [1 - N/Nma +, (46) where Nmax is the criterion N comput ed for the case where no at t empt has been made of overlaying the reference spect rum wi t h the sampl e spectrum. As an example, the identification of phenace- tin dissolved in met hanol / wat er (10/90 v/v) is shown in Tabl e II. The spect rum had t o be compared wi t h experimentally obt ai ned spectra recorded at a varying solvent composi t i on from 10% t o 40% met hanol in water. The membershi p value ms (Eq. (46)) de- creases from 0.950 to 0.879, reflecting t he increasing difference be- t ween t he spectra but keeping t he membershi p-val ue at a reason- able absol ut e level. In general, the fuzzy criterion revealed member- ship values higher t han 0.8 if the component s were identical but blurred due t o solvent effects or noise [7], and membership-values of less t han 0.8 if different identities (components) were present (cf. Tabl e II, columns 1 and 3). In t he second col umn and in the fourt h col umn of Tabl e II, results are given t hat were obt ai ned by use of a distance measure, i. e. the Euclidean distance. The values of t he Euclidean distance range from 0 to 0.387. Similar values are obt ai ned if the phenacet i n spect rum is compared wi t h spectra of t he same component dis- Fuzzy Theory in Analytical Chemistry 117 Table II. Component Identification in the Ultraviolet Spectral Range by Using a Fuzzy Criterion According to Eq. (46) and by Use of the Euclidean Distance Measure Candidate reference component Phenacetin Phenobarbital Fuzzy a Euclidean b Fuzzy ~ Euclidean~ criterion distance criterion distance Against Against phenacetin in phenobar- % methanol (v/v) bital 10 0.950 0.00 barbital 20 0.914 0.20 codeinium 30 0.889 0.29 phosphate 40 0.879 0.33 0.823 0.00 0.206 0.203 0.359 0.387 The fuzzy criterion is based on the membership value m8 according to Eq. (46). b Calculated according to IX (a ( xi ) - b (x,))2] ~/~. i solved in mobile phases of different met hanol cont ent (Table II, col umn 2) and if phenobarbi t al is compared wi t h spectrally similar but chemically different identities (components), such as barbital or codei ni um phosphat e (Table II, col umn 4). Therefore, t he dis- t ance criterion is not suited for judging the quality of compari son and it may reveal uncorrect identification, since f r om a distance value of about 0.3, it cannot be stated exactly whet her t he candi dat e reference spect rum is blurred due to solvent conditions, or a dif- ferent component is present. The fuzzy met hod for component identification can easily be ext ended to t he case of mi xt ure analysis. At every band position x, t he sample spect rum is considered to be composed of t he concen- t rat i on (cs') weighed component spect rum (bj (x)) according to Beer's l aw a (x) = Z cj bj (x), (47) / =i where r is t he number of component s. The m. f . for t he sample spect rum is t hen L X c3' ej (x) ' rnzc~ b~ (x) (Y; x) = (48) [ R ( Y - Z c j b ' ( x ) . ) . Z cj f l j (x) 118 H. Bandemer and M. Ot t o: Tabl e III. Thr ee- Component Analysis of UV-Li ght Absorbi ng Species by t he Fuzzy Theor y Met hod Caffei ne Pr opyphenazone Phenacet i n Act ual concn. , ~tg/ml 6 12 9 Mean predi ct ed conch, a, #g/ml Fuzzy 6.07 13.65 9.02 OLS c 9.14 8.01 11.68 Averaged prediction r ~ Fuzzy 2.4 ]3.88 1.05 OLS c 52.38 33.32 29.79 Calculated from 3 samples. Averaged prediction error for one component = = 100 [~Y' (6~ -- Ct, act.) 2/ ~ ' C~ 2, act.] 1/2. i i OLS: or di nar y least squares. giving as difference bet ween sample and reference spect rum d- - a ( x ) - X c j b j ( x) t he following membership funct i on: ( a ( x) - X cj b , (x) - y ) L (x) + Z ' rna (y; x) = (49) R ( Y - ( a ( x ) - X c , bJ ( x) ) ) /~o ( x ) + 2: c j ~j ( x ) " The coincidence of t he spectra is comput ed according to Eqs. (45) and (46). In order to find t he opt i mum combi nat i on of t he concent rat i ons c~ with respect to minimizing N or maxi mi zi ng m~, the modified simplex met hod can be used [17]. Results of analysing a mi xt ure f r om caffeine, propyphenazone and phenacetin are given in Tabl e III and are compared wi t h ordi nary least squares regression (OLS) on t he pure component spectra by means of t he Cholesky algorithm. The superiority of t he fuzzy met hod compared to t he OLS met hod is clearly evidenced. The failure of t he OLS met hod is explained by t he facts t hat (i) t he spectra in t he library are blurred in compari son to t he experimental spectra and (ii) t he additivity of component spectra is not obeyed. Fuzzy Theory in Analytical Chemistry 119 The deviations f r om Beer' s l aw cause t he OLS met hod to give quite erroneous results whereas t he fuzzy met hod, whi ch was de- signed to handl e bl urred spectra, can cope wi t h it. Expert Systems One field of potential applications of fuzzy t heory met hods in analytical chemistry, whi ch is extensively explored at present, con- cerns t he managi ng of i ncompl et e or uncert ai n i nformat i on in ex- pert systems. Whereas t he first expert system, Dendral [18], origi- nates in chemistry, t he published number of expert systems in ana- lytical chemistry is rat her small [19, 20]. Expert System K n o w l e d g e ~ _ qui si t i on J t Knowledge Base Inference Engine Fig. 9. General structure of an expert system according to ref. [4], p. 154 The mai n advantages of using fuzzy t heory in an expert system have recently been given by Zi mmer mann [4] and can be sum- mari zed as follows (cf. Fig. 9): 1. Since communi cat i on wi t h an expert system seems most ap- propri at e when carried out in a "nat ural " way, i. e. by language, linguistic variables should be applied. 2. Since much of t he knowl edge t hat is t o be stored in t he knowl edge base is usually imprecise, vague or uncertain, t he storage of knowl edge by fuzzy concepts and symbol i sm can be mor e ade- quat e t han a crisp knowl edge representation. 3. If fuzzy knowl edge and rules have to be i ncorporat ed into an expert system, t he "management of uncert ai nt y" f r om t he premises to conclusions must be feasible as it is possible wi t h fuzzy t heor y which, in addition, reveals some "measure of uncert ai nt y whi ch is underst andabl e and properl y interpretable by t he user" [4]. 120 H. Bandemer and M. Otto: Expert systems t hat i ncorporat e fuzzy algorithms beside deter- ministic and statistical models are known in medicine, e. g. CADIAC-2 for medical diagnosis [21], or in engineering, e. g. Speril [22] a damage assessment system for building structures sub- jected to eart hquakes excitation. A decision system for selecting an analytical procedure has been proposed by Kuf~ and Wiinsch [23] based on Boolean logic, i. e. on 1 and 0 decisions. The system operates by checking a list of quality criteria, such as sample state, cost and time of analysis. The sequence of yes/ no answer indicates whet her t he analytical probl em can be solved by t he available, i. e. stored, procedures or not. Hence t he decision system can successfully cope with situa- tions only if t he analytical procedure in question has already been used for solving t he definite analytical task. In order to broaden t he performance of such a decision system, we designed a fuzzy expert system for selecting an element ana- lytical procedure [13] ai med at t he following objectives: 1. Prior information (exact, incomplete, inconsistent or uncert ai n information) on bot h t he sample and t he analytical procedure should be exploitable. 2. The relation bet ween sample and method knowledge should not be limited to Boolean logic but might be fuzzy. 3. If no identical case history in t he knowl edge base is avail- able for analysing a given sample, t he system should be able to suggest approxi mat e solutions or create novel ones for t he prob- lem at hand. 4. From items 2 and 3 it follows t hat the act of reasoning should include common-sense and approxi mat e reasoning and not only logical reasoning [24]. So far t he i mpl ement ed expert system [13] can mainly deal wi t h items 1 to 3. By extending t he system to also i ncorporat e fuzzy reasoning, it will, however, be possible to apply t he well established t heory to this subject [25]. In our expert system for procedure selection t wo basic sets were defined: t he sample set: S= {S1, S~ . . . . , Sin}, ( s o ) t he procedure set: /5 = (/51,/52, 9 9 These sets are fuzzy sets representing t he different quality criteria j, such as concent rat i on range, error range, matrix, or physical state Fuzzy Theory in Analytical Chemistry 121 of sample. The fuzzy sets are considered having their respective m. f.' s ms or mp, e. g. of t he form O, x ma b- a' mM ~ 1~ x - d c - - d' O, for x < a , for a<_x<_b, for b <x <c , for c<x<_d, for x>d. (51) Fig. 10 gives examples of m. f.' s for the quality criteria "concent ra- tion range" and "range of error". In the latter case t he m. f. remains const ant if x (relative error) is less t han c = 5 % (Fig. lOb). 0 , . b . 1 m I a b c O n c e n t r o t i o n , x~ ' l 0 c d \ \ \ 5 10 15 re[. errOr ( %) , x2 Fig. 10. Membership functions for characterizing the quality criteria a "concen- t rat i on range" and b "error range" Even discrete or linguistic variables can be evaluated by the fuzzy appr oach as already shown in the theoretical part. Fig. 11 gives an exampl e for judging the suitability of the "physical state of sample" for analysis by different analytical met hods. The most suitable physical state, such as a solution in spect r ophot omet r y or a disk of pr oper dimension for x-ray fluorescence analysis, are as- signed a membershi p value of 1 whereas less suited states are labelled wi t h l ower values. A modi fi cat i on of t he pri mary terms by using linguistic vari- ables is demonst rat ed for the m. f . over the variable "range of error". If one demands t hat t he error shoul d be "small", i. e. less 122 H. Bandemer and M. Otto: t han 10%, t hen this demand can be weakened for l ow concentra- tions (since normal l y t he met hod' s relative error is always higher at l ow concentrations) or this preposition can be intensified at higher concentrations. To express t he fuzzy set for t he upper con- centration range, where t he error should be "very small", t he m. f. me might be modified by (Eq. (27)) r o v e : = r n e 2. (52) For t he l ower concent rat i on range, t he error could likewise be "mor e or less small" (Fig. 10b) m m ~ : = me 1/2. ( 5 3 ) After having i mpl ement ed t he knowl edge about t he quality cri- teria i nformat i on about t he sample t hat is to be analyzed are i nput into t he system and t he search for a solution is performed by com- bining t he knowl edge on t he candi dat e analytical procedure (set P) and t he prior knowl edge on t he sample (set S). .._Spect rap hotornet ry__ 1 ol l l '~ 2 3 4 5 X - r a y fluorescence Qnaiysis 1 1 2 3 4 5 6 Fig. 11. Membership functions for discrete variables describing the "physical state of sample" 1 powder, 2 disk, 3 wire, 4 liquid, 5 gas, 6 shavings The intersection of bot h fuzzy sets (Eq. (11)) is carried out most easily. Fr om t he resulting fuzzy set t he relative cardinality (Eq. (9)) is comput ed giving one membership value for every criterion; t hey have to be aggregated to a final value, e. g. by averaging over all criteria whi ch have been considered. Finally t he expert system provides a list of candi dat e procedures t hat are valued by t hei r correspondi ng membership values. Fuzzy Theory in Analytical Chemistry 123 Conclusions T h e out l i ne d appl i cat i ons d e mo n s t r a t e t ha t f uzzy t he or y based me t h o d s can hel p t o sol ve t he f ol l owi ng pr obl e ms of c o n t e mp o r a r y anal yt i cal chemi s t r y: (i) h a n d l i n g unc e r t a i n a n d i nc ompl e t e da t a sets i n s pe c t r os c opy or i n c h r o ma t o g r a p h y ; (ii) mode l l i ng da t a i n cases whe r e t he a s s ume d model , e . g . Beer' s l a w, is n o t exact l y val i d or whe r e onl y we a k st at i st i cal as- s u mp t i o n s can be o b t a i n e d f r o m t he e xpe r i me nt a l da t a ; (iii) i dent i f yi ng bl ur r e d spect r a as exempl i f i ed by t he c o mp a r i s o n of ul t r avi ol et s pect r a; a nd (iv) i n c o r p o r a t i n g a nd ma n a g i n g uncer t ai n, i ncons i s t ent , a nd i n- c ompl e t e i n f o r ma t i o n i n exper t syst ems. I t s houl d be n o t e d t h a t f uzzy t he or y is n o t t o be r e ga r de d as an al t er nat i ve t o st at i st i cal me t h o d s , b u t f uzzy me t h o d s s houl d serve as c o mp l e me n t s t o ma t h e ma t i c a l st at i st i cs. F r o m t he basi c not i ons of f uzzy t he or y gi ven i n t he t heor et i cal p a r t i t can be con- cl uded t hat , at pr es ent , onl y a smal l pa r t of f uzzy t he or y has al- r eady been c ons i de r e d f or anal yt i cal appl i cat i ons . Fur t he r appl i ca- t i ons i n anal yt i cal chemi s t r y can be expect ed i n fi el ds, s uch as f uzzy r o b o t cont r ol , i ma ge pr ocessi ng, deci si on ma k i n g a n d especi al l y i n art i fi ci al i nt el l i gence areas. T h e anal yt i cal chemi s t s houl d be awar e of t he f act t h a t t he c o mp u t a t i o n a l pr oc e dur e s f or ha ndl i ng f uzzy me t h o d s are s o me wh a t di f f er ent f r o m c onve nt i ona l st at i st i cal or nume r i c a l me t hods . A f i nal deci s i on o n t he mo s t a ppr opr i a t e com- p u t e r l a ngua ge has, howe ve r , n o t yet been ma de , a n d l anguages , s uch as F O R T R A N or Pascal are successful l y used. References [1] L. A. Zadeh, Fuzzy Sets, in: In[orm. Control 1965, 8, 338. [2] J. Maiers, Y. S. Sherif, IEEE Trans. Sys. Man Cybernetics 1985, SMC-I5, 175. [3] D. Dubois, H. Prade, Fuzzy Sets and Systems: Theory and Applica- tion, Academic Press, New York, 1980. [4] H. J . Zi mmermann, Fuzzy Set Theory and Its Applications (Interna- tional Series in Management Sciences/Operations Research), Kluwer Nijhoff, Bo s t o n - Dor dr e c ht - Lancaster, 1986. [5] A. Kaufman, Introduction to the Theory o[ Fuzzy Subsets, VoI. 1: Fundamental Theoretical Elements, Academic Press, New York, 1975. [6] T. Blaffert, Anal. Chim. Acta 1984, 161, 135. [7] M. Otto, H. Bandemer, Anal. Chim. Acta 1986, I91, in press. 124 H. Bandemer and M. Otto: Fuzzy Theory in Analytical Chemistry [8] M. Ot t o, H. Bandemer, Anal. Chim. Acta 1986, 184, 21. [9] K. E. Thrane, IIIrd CAC-Meeting of the Chemometrics Society, Lerici, Ma y 25- - 30, 1986. [10] M. Ot t o, Hauptvortriige COMPANA, Jena, Sept ember 1985, p. 97. [11] M. Ot t o, H. Bandemer, Chemom. Int. Lab. Syst. 1986, 1, 71. [12] K. Eckschlager, V. Stepfinek, COBAC IV, Graz, Sept ember 1986. [13] M. Ot t o, M. Geit~ler, K. -H. Barth, Kolloquium ,,100 Jahre Germa- nium", Bergakademi e Freiberg, Juli 1986. [14] P. J. Br own, J. R. Statist. Soc. 1982, B44, 287. [15] D. Coomans, I. Broeckaert , Potential Pattern Recognition in Chemical and Medical Decision Making, Wiley, Ne w York, 1986. [16] J . A. Pino, J . E . Mur r ay, P. C. Jurs, B. K. Lavine, A . M. Har per , Anal. Chem. 1985, 57, 295. [17] P. F. A. Van der Wiel, R. Maasen, G. Kat eman, Anal. Chim. Acta 1983, 153, 83. [18] R. K. Lindsay, B. Buchanan, E. A. Fei genbaum, J. Lederberg, Appli- cation of Artificial Intelligence for Organic Chemistry, the Dendral Project, Mc - Gr a w Hill, Ne w York, 1980. [19] R. E. Dessy, Anal. Chem. 1984, 56, 1200A and 1312A. [20] H. Gunasi ngham, B. Srinivasan, A. L. Ananda, Anal. Chim. Acta 1986, i82, 193. [21] K. P. Adlassnig, in: Approximate Reasoning in Decision Analysis, (M. M. Gupt a, E. Sanchez, eds.), Nor t h- Hol l and, Ams t e r d a m- Ne w Yo r k - Ox f o r d , 1982, p. 203. [22] M. Ishizuka, K. S. Fu, J. T. P. Yao, in: Approximate Reasoning in Decision Analysis (M. M. Gupt a, E. Sanchez, eds.), Nor t h- Hol l and, Ams t e r d a m- Ne w Y o r k - Oxf or d, 1982, p. 261. [23] H. M. Kug, G. W~insch, Fresenius" Z. Anal. Chem. 1984, 319, 492. [24] L. Wos, R. Overbeek, E. Lusk, J. Boyle, Automated Reasoning- In- troduction and Applications, Prentice-Hall, Engl ewood Cliffs, NJ, 1984. [25] L. A. Zadeh, in: Machine Intelligence 9 (J. E. Hayes, D. Michie, L. I. Mikulich, eds.), Wiley, Ne w York, 1979, p. 149. Received September i5, 1986. Revision January 15, 1987.