You are on page 1of 99

# Fuzzy logic

UNIT – VI:Classical & Fuzzy Sets: Introduction to classical sets - properties, Operations and relations; Fuzzy sets, Membership, Uncertainty, Operations, properties, uzzy relations, cardinalities, membership unctions! UNIT VII:Fuzzy "o#ic System Components: Fuzzi ication, Membership \$alue assi#nment, de\$elopment o rule base and decision ma%in# system, &e uzzi ication to crisp sets, &e uzzi ication methods! U'I( )III:*pplications: 'eural net+or% applications: ,rocess identi ication, control, ault dia#nosis and load orecastin#!Fuzzy lo#ic applications: Fuzzy lo#ic control and Fuzzy classi ication!
U'I(-)I Classical & Fuzzy Sets: Introduction to classical sets: ,roperties: Operations: -elations: Introduction to Fuzzy sets: ,roperties: Operations: -elations: Cardinalities: Membership Functions: U'I(-)II Fuzzy "o#ic System Components: Fuzzi ication : Membership \$alue assi#nment: -ule base system: decision ma%in# system: &e uzzi ication methods: U'I( )III *pplications: 'eural net+or% applications: ,rocess identi ication: Control: ault dia#nosis: load orecastin#: Fuzzy lo#ic applications: Fuzzy lo#ic control: Fuzzy classi ication:

Introduction:
Description of Fuzzy Logic In recent years, the number and \$ariety o applications o uzzy lo#ic ha\$e increased si#ni icantly! (he applications ran#e rom consumer products such as cameras, camcorders, +ashin# machines, and micro+a\$e o\$ens to industrial process control, medical instrumentation, decision-support systems, and port olio selection!

Why Use Fuzzy Logic?

Here is a list of general observations about fuzzy logic: Fuzzy lo#ic is conceptually easy to understand! (he mathematical concepts behind uzzy reasonin# are \$ery simple! Fuzzy lo#ic is a more intuiti\$e approach +ithout the ar-reachin# comple.ity! Fuzzy lo#ic is le.ible! /ith any #i\$en system, it is easy to layer on more unctionality +ithout startin# a#ain rom scratch! Fuzzy lo#ic is tolerant o imprecise data! 0\$erythin# is imprecise i you loo% closely enou#h, but more than that, most thin#s are imprecise e\$en on care ul inspection! Fuzzy reasonin# builds this understandin# into the process rather than tac%in# it onto the end! Fuzzy lo#ic can model nonlinear unctions o arbitrary comple.ity! 1ou can create a uzzy system to match any set o input-output data! (his process is made particularly easy by adapti\$e techni2ues li%e *dapti\$e 'euro-Fuzzy In erence Systems 3*'FIS4, +hich are a\$ailable in Fuzzy "o#ic (oolbo. so t+are! Fuzzy lo#ic can be built on top o the e.perience o e.perts! In direct contrast to neural net+or%s, +hich ta%e trainin# data and #enerate opa2ue, impenetrable models; uzzy lo#ic lets you rely on the e.perience o people +ho already understand your system! Fuzzy lo#ic can be blended +ith con\$entional control techni2ues! Fuzzy systems don5t necessarily replace con\$entional control methods! In many cases uzzy systems au#ment them and simpli y their implementation! Fuzzy lo#ic is based on natural lan#ua#e! (he basis or uzzy lo#ic is the basis or human communication! (his obser\$ation underpins many o the other statements about uzzy lo#ic! 6ecause uzzy lo#ic is built on the structures o 2ualitati\$e description used in e\$eryday lan#ua#e, uzzy lo#ic is easy to use! (he last statement is perhaps the most important one and deser\$es more discussion! 'atural lan#ua#e, +hich is used by ordinary people on a daily basis, has been shaped by thousands o years o human history to be con\$enient and e icient! Sentences +ritten in ordinary lan#ua#e represent a triumph o e icient communication!

When Not to Use Fuzzy Logic Fuzzy lo#ic is not a cure-all! /hen should you not use uzzy lo#ic7 (he sa est statement is the irst one made in this introduction: uzzy lo#ic is a con\$enient +ay to map an input space to an output space! I you ind it5s not con\$enient, try somethin# else! I a simpler solution already e.ists, use it! Fuzzy lo#ic is the codi ication o common sense 8 use common sense +hen you implement it and you +ill probably ma%e the ri#ht decision! Many controllers, or e.ample, do a

neurocomputin#. and #enetic al#orithms may be \$ie+ed as the principal constituents o +hat mi#ht be called so t computin#! Unli%e the traditional.ploits the tolerance or imprecision and thereby lo+ers the cost o solution!*nother basic concept in F". that is. and partial truth to achie\$e tractability. their use is closer to human intuition! Furthermore. it is e ecti\$ely one o its principal constituents! In most o the applications o uzzy lo#ic.ploit the tolerance or imprecision. uzzy lo#ic is a lo#ical system. robustness. althou#h the modern and methodical science o uzzy lo#ic is still youn#. such systems play a particularly important role in the induction o rules rom obser\$ations! *n e ecti\$e method de\$eloped by &r! -o#er =an# or this purpose is called *'FIS 3*dapti\$e 'euro-Fuzzy In erence System4! (his method is an important component o the toolbo.. in reality. is that o a uzzy i -then rule or. uncertainty. +hich plays a central role in most o its applications. computin# +ith +ords e. so t+are.plained \$ery clearly and insi#ht ully in the Introduction! /hat mi#ht be added is that the basic concept underlyin# F" is that o a lin#uistic \$ariable.. in a +ider sense uzzy lo#ic 3F"4 is almost synonymous +ith the theory o uzzy sets. i you ta%e the time to become amiliar +ith uzzy lo#ic. you5ll see it can be a \$ery po+er ul tool or dealin# 2uic%ly and e iciently +ith imprecision and nonlinearity! (o understand +hy use o uzzy lo#ic has #ro+n. a uzzy lo#ic solution is. +hich is an e. leadin# to neurouzzy systems! /ithin uzzy lo#ic. uzzy lo#ic. and lo+ solution cost! In the uture. uzzy lo#ic in its narro+ sense is a branch o F"! 0\$en in its more narro+ de inition. uzzy rule! *lthou#h rule-based systems ha\$e a lon# history o use in *I. +hat is missin# in such systems is a mechanism or dealin# +ith uzzy conse2uents and uzzy antecedents! In uzzy lo#ic. a translation o a human solution into F&C"!* trend that is #ro+in# in \$isibility relates to the use o uzzy lo#ic in combination +ith neurocomputin# and #enetic al#orithms! More #enerally. uzzy lo#ic in its +ide sense! (he basic ideas underlyin# F" are e. much o F" may be \$ie+ed as a methodolo#y or computin# +ith +ords rather than numbers! *lthou#h +ords are inherently less precise than numbers.plicitly in the toolbo. so t computin# could play an increasin#ly important role in the conception and desi#n o systems +hose MI< 3Machine I<4 is much hi#her than that o systems desi#ned by con\$entional methods!*mon# \$arious combinations o methodolo#ies in so t computin#. you must irst understand +hat is meant by uzzy lo#ic! Fuzzy lo#ic has t+o di erent meanin#s! In a narro+ sense. uzzy lo#ic is both old and ne+ because. simply. uzzy lo#ic should be interpreted as F". uzzy lo#ic di ers both in concept and substance rom traditional multi \$alued lo#ical systems!In Fuzzy "o#ic (oolbo.tension o multi \$alued lo#ic! :o+e\$er. so t computin# accommodates the imprecision o the real +orld! (he #uidin# principle o so t computin# is: 0. hard computin#.!Fuzzy lo#ic is all about the relati\$e importance o precision: :o+ important is it to be e. the concepts o uzzy lo#ic relies on a#e-old s%ills o human reasonin#! .ine 9ob +ithout usin# uzzy lo#ic! :o+e\$er. a theory +hich relates to classes o ob9ects +ith un sharp boundaries in +hich membership is a matter o de#ree! In this perspecti\$e. that is.actly ri#ht +hen a rou#h ans+er +ill do7In this sense. a \$ariable +hose \$alues are +ords rather than numbers! In e ect. the one that has hi#hest \$isibility at this 9uncture is that o uzzy lo#ic and neurocomputin#. this mechanisms pro\$ided by the calculus o uzzy rules! (he calculus o uzzy rules ser\$es as a basis or +hat mi#ht be called the Fuzzy &ependency and Command "an#ua#e 3F&C"4! *lthou#h F&C" is not used e.

.

.

.

.

Classical & Fuzzy Sets: .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

and the +ord tall +ould correspond to a cur\$e that de ines the de#ree to +hich any person is tall! I the set o tall people is #i\$en the +ell-de ined 3crisp4 boundary o a classical set.D the membership unction tall should already ta%e into account +hether you are re errin# to a si. you mi#ht say all people taller than B eet are o icially considered tall! :o+e\$er. but one is si#ni icantly less tall than the other!Sub9ecti\$e interpretations and appropriate units are built ri#ht into uzzy sets! I you say DShe5s tall. the i#ure ollo+in# sho+s a smoothly \$aryin# cur\$e that passes rom not-tall to tall! (he output-a. the uni\$erse o discourse is all potential hei#hts. say rom @ eet to A eet. it is unreasonable to call one person short and another one tall +hen they di er in hei#ht by the +idth o a hair!I the %ind o distinction sho+n pre\$iously is un+or%able. such a distinction is clearly absurd! It may ma%e sense to consider the set o all real numbers #reater than B because numbers belon# on an abstract plane. then +hat is the ri#ht +ay to de ine the set o tall people7 Much as +ith the plot o +ee%end days.amples o a uzzy set is the set o tall people! In this case.-year-old or a #ro+n +oman! Similarly.Me !ership Functions: * membership unction 3MF4 is a cur\$e that de ines ho+ each point in the input space is mapped to a membership \$alue 3or de#ree o membership4 bet+een > and ?! (he input space is sometimes re erred to as the uni\$erse o discourse. but +hen +e +ant to tal% about real people. a ancy name or a simple concept!One o the most commonly used e. the units are included in the cur\$e! Certainly it ma%es no sense to say DIs she tall in inches or in meters7D(he .is is a number %no+n as the membership \$alue bet+een > and ?! (he cur\$e is %no+n as a membership unction and is o ten #i\$en the desi#nation o C! (his cur\$e de ines the transition rom not tall to tall! 6oth people are tall to some de#ree.

tremes +ith a rise in the middle!(here is a \$ery +ide selection to choose rom +hen you5re selectin# a membership unction! 1ou can also create your o+n membership unctions +ith the toolbo. G . all named because o their shape! (he unction zm is the asymmetrical polynomial cur\$e open to the le t. +here each element o J is mapped to a \$alue bet+een > and ?! (his \$alue.is represents the uni\$erse o discourse. the +eather is rather hot4!(he de#ree an ob9ect belon#s to a uzzy set is denoted by a membership \$alue bet+een > and ?! 3e!#!.panded membership unctions seems too complicated.4 is called the membership unction 3or MF4 o . called membership \$alue or de#ree o membership. and e iciency! * classical set mi#ht be e.! :o+e\$er. H BI * uzzy set is an e..pressed as * E F.pansi\$e membership unctions are not necessary or #ood uzzy in erence systems! Finally. 7 JI C*3. unctions does not add more precision! 6elo+ is a list o the membership unctions +e +ill use in the practical section o this . usin# more comple. +hereas the y a. in *! (he membership unction maps each element o J to a membership \$alue bet+een > and ?!.4 G . Friday is a +ee%end day to the de#ree >!L4!* membership unction associated +ith a #i\$en uzzy set maps an input \$alue to its appropriate membership \$alue! M"M#"\$%&I' FUN(TI)N% &e inition: a membership unction or a uzzy set * on the uni\$erse o discourse J is de ined as C*:J M N>.?O.only condition a membership unction must really satis y is that it must \$ary bet+een > and ?! (he unction itsel can be an arbitrary cur\$e +hose shape +e can de ine as a unction that suits us rom the point o \$ie+ o simplicity. 9ust remember that you could probably #et alon# \$ery +ell +ith 9ust one or t+o types o membership unctions. or e.is represents the de#rees o membership in the N>.plore the possibilities. then a uzzy set * in J is de ined as a set o ordered pairs! * E F. but e. C*3.ample the trian#le and trapezoid unctions! (he selection is +ide or those +ho +ant to e.i cur\$es. and . S. con\$enience.! (hree related membership unctions are the K.tension o a classical set! I J is the uni\$erse o discourse and its elements are denoted by . +ee%end days4!* uzzy set admits the possibility o partial membership in it! 3e!#!. ast runner.olynomial based cur\$es account or se\$eral o the membership unctions in the toolbo.?O inter\$al! Simple unctions are used to build membership unctions! 6ecause +e are de inin# uzzy concepts. and pim is zero on both e. Friday is sort o a +ee%end day. hot +eather.. remember that more details are a\$ailable on all these unctions in the re erence section! Summary o Membership Functions Fuzzy sets describe \$a#ue concepts 3e!#!. speed. sm is the mirror-ima#e unction that opens to the ri#ht. i a list based on e. 2uanti ies the #rade o membership o the element in J to the uzzy set *! Membership unctions allo+ us to #raphically represent a uzzy set! (he x a.

an upper limit d. +here a P b P c P d! . and an upper support limit c.tutorial! (rian#ular unction: de ined by a lo+er limit a. a lo+er support limit b. and a \$alue m. +here a P m P b! (rapezoidal unction: de ined by a lo+er limit a. an upper limit b.

unctions and "unctions: • -.(here are t+o special cases o a trapezoidal unction.Q • "-Functions: +ith parameters c E d E R Q . +hich are called -.unctions: +ith parameters a E b E .

the narro+er the TbellU is! .Saussian unction: de ined by a central \$alue m and a standard de\$iation % H >! (he smaller % is.

S .6 ?!> >!@ >!> >!> >!> >!> >!> >!Y >!Y >!> >!> >!> >!> >!> >!@ ?!> >!@ >!> >!> >!> >!> >!> >!Y >!Y >!> >!> >!> >!> >!> >!@ ?!> >!@ >!> >!> >!> >!> >!> >!Y >!Y >!> >!> >!> >!> >!> >!@ ?!> >!@ >!> >!> >!> >!> >!> >!Y >!Y >!> >!> >!> >!> >!> >!@ ?!> >!@ >!> >!> >!> >!> >!> >!Y >!Y >!> >!> >!> >!> >!> >!@ ?!> >!@ Jn≦-@!W -@!W＜Jn≦-?!B -?!B＜Jn≦->!L ->!L＜Jn≦->!Z ->!Z＜Jn≦->!W ->!W＜Jn≦->!? ->!?＜Jn≦R>!? R>!?＜Jn≦R>!W R>!W＜Jn≦R>!Z R>!Z＜Jn≦R>!L R>!L＜Jn≦R?!B .M .U'I(-)II Fuzzy "o#ic System Components: Fuzzi ication : Membership \$alue assi#nment: -ule base system: decision ma%in# system: &e uzzi ication methods: VFuzzi ication Methods ?! &iscrete case 3numerical4 µ3 X 4 = ∑ I µ3 Ai 4 xi Quantization and Primary Fuzzy Sets Using a Numerical Definition "e\$el 'O! -B -X -Z -@ -W -? > ? W @ Z -an#e '6 'M 'S K0 .

4  (rapezoidal membership unction! .6  (rian#le membership unction! .M .S .artition Style or Fuzzy Models ?! Sird partition  'eed only small number o membership unction or each input!  Can be used +hen in\$ol\$es only se\$eral state \$ariables as inputs!  Curse o dimensionality! 1 大 中 小 小 中 （a） 大 J .  Suassian membership unction! µ 3 x4 µ3 x4 = e −3 x −c σ 4W C σ µ 3 x4 J  Seneralized bell membership unction! µ3 x4 = ?+ ? x −c a Wb X .4 . [#3.X B R?!B＜Jn≦R@!W @!W≦Jn >!> >!> >!> >!> >!> >!Y >!Y >!> >!> >!> >!> >!> >!@ ?!> Fuzzi ication Methods W! Continuous case 3 unctional4 '6 'M 'S K0 [#3.

ponentially increase in the number o rules!  More membership unction or each input are needed! （ b） @! Scatter partition  6y co\$erin# a subset o the +hole input space that characterizes a re#ion o possible occurrence o the input \$ectors!  "imit the number o rules to a reasonable amounts! （c） Source o Fuzzy Control rules .W! (ree partition  0ach re#ion can be uni2uely speci ied alon# a correspondin# decision tree!  0.

press their +or%s in +ords! 0\$en i they can. .perience and control en#ineerin# %no+led#e!  0.perience!  Sel or#anizin# controller! Fuzzy TI -(henU -ules I . '% '% 'M 'M 'M 'M '# '# '# '# '# '# the matri. and "rror +here all the o abbre\$iations used abo\$e mean: . control! (he .pressed 2ualitati\$ely in +ords!  Fuzzy partitions o the input space must be determined throu#h inter\$ie+s +ith operations and by usin# the instincts o control en#ineers! W! 6ase on operation\s control action!  (he operation o complicated process is not al+ays easy to put their %no+-ho+ into lo#ical orm!  0. '% 'M '# N# N# N# MN MN N% . error.perience o s%illed operators and %no+led#e o control en#ineers is e.press thin#s incompletely!  *n e ecti\$e desi#n method in this type o case is a model o the unctions carried out by the operators! Source o Fuzzy Control rules @! 6ase on uzzy model o a process!  /hen the ob9ect is a process +ithout e. is * and y is 6 then z is C! Antecedent (premise) R = N A ∩ BO → C Consequent (conclusion) µR = N µA 3 x4 ∧ µB 3 y 4O → µc 3 z 4 (h*nge of "rror N# '# 'M '% ') N) N% NM N# entries NM N% NM NM N) '% '% 'M '# '# sets uzzy + N# N# N# N) N) 'M '# o '#error.pert e. 'M chan#e o. are N# N# N# N# N# N# N% MN N% MN N) N% 'M . .perts may not be able to e. there are instances +hen their +ords e. .perts or human operators!  * better methods is based on a uzzy model o the process or the desi#n o a controller aimed at the hi#h 2uality control! Z! 6ase on learnin#  :as ability to create uzzy control rules and modi y them based on e.?! 0. .

. is and yA is W . is and y is .ositi\$e Medium .ositi\$e Small .remise W .S : .then z is B? .ositi\$e Kero 'O : . is and yA is B′ A ? .remise @ .M : .ositi\$e 6i# .6 : .remise ? .then z is BW Conclusion C? CW z is C? C = 3 A′ ∩ B′4  N3 A? ∩ B? 4 → C? O ∪ N3 AW ∩ BW 4 → CW O = 3 A′ ∩ B′4  N3 A? ∩ B? 4 → C? O ∪ 3 A′ ∩ B′4  N3 AW ∩ BW 4 → CW O ′ = C?′ ∪ CW In erence Mechanisms ?! Mamdani uzzy in erence model! W! "arsen uzzy in erence model! @! (su%amoto uzzy in erence model! Z! Su#eno uzzy in erence model! Mamdani Fuzzy In erence Model .O : .ositi\$e Kero 'S : 'e#ati\$e Small 'M : 'e#ati\$e Medium '6 : 'e#ati\$e 6i# -e\$ie+ o Fuzzy -easonin# -easonin#: ′ .

-product operation! µ ci′ 3 z 4 = α i ∧ µ ci 3 z 4 αi = µ A 3 x4 ∧ µ B 3 y 4 i i µc′ 3 z 4 = µc′ ∨ µc′ ? W = Nα? ⋅ µc? 3 z 4O ∨NαW ⋅ µcW 3 z 4O (su%amoto Fuzzy In erence Model Monotonical membership unction 3A and areB not re2uired.-easonin# ma. but i i is4 Ci αi = Ci 3 zi 4 Z= α? z? + α W zW α? + α W .-min operation! µ ci′ 3 z 4 = α i ∧ µ ci 3 z 4 αi = µ A 3 x4 ∧ µ B 3 y 4 i i µc′ 3 z 4 = µc′ ∨ µc′ ? W = Nα? ∧ µc? 3 z 4O ∨ NαW ∧ µcW 3 z 4O "arsen Fuzzy In erence Model -easonin# ma.

µ *? µ min or product 6? µ C? α ...fR 2i y R r i i Z> = α z +α z z= α +α ? ? W W ri ? W α? f? 3 x> . then z E 3. y> 4 + αW f W 3 x> . is and y is . y4 E pi.. y y Su#eno Fuzzy In erence Model W zW weighted average z -easonin#: : I . is and y is . y4 is polynomial unction f i AW B fi  Kero-order polynomial Wunction : 3. .. y4 f? : I . y ? µ *W µ 6W µ z? CW z α . y> 4 α? + αW 'ote : zero-order polynomial unction can be \$ie+ed either as a special case o Mamdani model in +hich each rule\s conse2uent is speci ied by a uzzy sin#leton or a special case od (su%amoto model. y4 E  First-order polynomial unction : 3.. y4 f W A B? ? 3. then z E 3. in +hich each rule\s conse2uent is speci ied by an membership unction o a step unction crossin# at the constant! .

criterion Method  "ar#est o Ma.imum! W!Mean o Ma.&e uzzi ication Methods ?! Ma.imum!  Smallest o Ma.imum method 3MOM4! Z MOM = ∑ i =? n zi n Ki E support \$alue at +hich n E number o such zi! reaches ma.imum \$alue! µzi @! Center o *rea method 3CO*4! Z COA = ∫ Zµ 3 z 4zdz ∫ Zµ 3 z 4zd c′ c′ or n n E number o 2uantization le\$els o output  Center o :ei#ht C f µ∗ = ∑ ∑f Z COA = µ 3z ∑ i = ? c′ c′ n i 4 zi i µ 3z ∑ i = ? 4 C : Core f : height W ? @ C?  Center o the "ar#est *rea CW C@ .

middle 0. Middle o Ma.amples o Fuzzy Control          Fuzzy car! F"C hard+are systems! Fuzzy *utomatic (rain Operation 3*(O4 systems! Fuzzy automatic container crane operations Fuzzy lo#ic chips and uzzy computers! Fuzzy +ashin# machine! Fuzzy \$acuum cleaner! Fuzzy air conditioner! Fuzzy camcorder! .

.

.

.

.

.

.

.

.

ample. but the concepts are the same as those used by Mamdani! I your application is more demandin# than the ollo+in# e.ample. but only because +e are +or%in# +ith a simple system. directed by a 6*SIC uzzy lo#ic control pro#ram in a personal computer! . ollo+in# is one e.ample system has been reduced in comple. controlled by a stand-alone con\$erter-controller.ample: (his is a uzzy lo#ic speed control e.FUKK1 "OSIC FO. usin# the same techni2ues as used by .perience +ith uzzy lo#ic control! I recommend you do build some %ind o system! I ound I be#an more and more to understand +hat uzzy lo#ic +as all about as I tried to ma%e the system +or%! (he ollo+in# e.arts "ist . that you can build or yoursel to #et e. only one input and no discontinuities or aberrations re2uirin# patchin#! Follo+in# is a system dia#ram.ro essor Mamdani. Fi#ure @. or a D#ettin# ac2uainted +ith uzzyD pro9ect that pro\$ides speed control and re#ulation or a &C motor! (he motor maintains Dset pointD speed. it may be obser\$ed that control could ha\$e been e ected +ithout #oin# throu#h the uzzy control e.ity e.ercise +e are about to #o throu#h! (his +ould be correct."*I' FO"]S D Fuzzy "o#ic Control System 6uildin# a System to Sain Understandin# and Familiarity (he easiest and 2uic%est +ay to understand uzzy lo#ic control is to build a uzzy lo#ic control system.ample.ity to ma%e it easier to understand. you do not ha\$e to learn ne+ thin#s or chan#e the approach! In considerin# this reduced comple. you add inputs and DrulesD.D=US( .

rairie &i#ital instruction boo% has sample pro#rams sho+in# ho+ to do this! (hrou#h a 6*SIC pro#ram. Inc! 3W4 Controller 3see belo+4! 3@4 Si#nal conditioner 3transistor ampli ier to ad9ust le\$els as needed4! 3Z4 (ransistor . but is di icult and time consumin#.pensi\$e approach! /hat is needed is an analo# to di#ital con\$erter. usin# the Z>-L controller. in the ran#e o `?>> to buy the Z>-L! .periment. and a di#ital to analo# output de\$ice rom the . Chapter ?>4! *ddin# trian#les can be done. then tell the Z>-L to output a pulse-+idth-modulated si#nal! 6y controllin# the pulse +idth o the Z>-L output. ?>> ma!.C \$ia a standard -S-W@W serial port! (he serial port connects to the Z>-L controller \$ia a serial cable! * 6*SIC pro#ram is used to communicate +ith the Z>-L controller! (he . +hich connects to a . is lo+ cost. and compatible #enerator! (he abo\$e speed control system is lo+ cost and suitable or learnin# at home +here bein# ri#orously. resultin# in an ine. technically correct application o uzzy lo#ic! (he di erence is in the act that this approach does not add trian#les to compute center o mass as speci ied by &r! 6art ]os%o 3Fuzzy (hin%in#. connectin# to the . ?!X ) to @!> ). rather than the L bit unit! (his +ould pro\$ide impro\$ed control! (his approach.lu# in the * to & and & to * con\$erter in the .C to the transistors and &C motor-#enerator bein# controlled! O ten this is all in one plu#-in card that #oes inside the . you can read the analo# \$olta#e le\$el on one o the Z>-L analo# input lines.urchasin# the items .pensi\$e and +as not used in this case! For this e.&I_/ebsite^.W'@>X@! 3X4 &C motor. the controller +as a Z>-L controller manu actured by .3?4 I6M or compatible personal computer e2uipped to run Microso t <uic% 6*SIC! I6M is a re#istered trademar% o I6M Corporation! Microso t and <uic% 6*SIC are re#istered trademar%s o Microso t.ternal to the computer. ho+e\$er that is the +ay a truly pro essional application +ould be desi#ned! (here are IC\s that do it all and commercially a\$ailable uzzy lo#ic controllers that do e\$erythin# correctly! (his uzzy lo#ic controller pro9ect +as done under pressure o \$ery limited money a\$ailable. mathematically correct is not re2uired! It is important to be a+are that this speed controller is only an e.rairie &i#ital o ers to accompany the .C and +rite a pro#ram to measure the input and control the output accordin# to uzzy lo#ic principles! (his approach can be some+hat e. * to & unit should be used.rairie &i#ital!4 (he Z>-L controller is e. a ?W bit.C.perimental controller to #et amiliar +ith the uzzy lo#ic concept! It is not +hat en#ineers call a ri#orous.C! .rairie &i#ital Company! Clic% on the ollo+in# /eb pa#e to see this controller! http:^^+++!prairiedi#ital!com^.&I_ModelZ>!htm 3(he author has no connection at all +ith . ??>> -pm to @@>> -pm. the a\$era#e \$alue o the output is the e2ui\$alent o \$aryin# the le\$el o the output in an analo# ashion! I not constrained by cost.

tra.ibility and chan#es do+n the road are in\$ol\$ed. +ere used or the si#nal conditioner pro\$idin# input to the motor-#enerator! (he &C motor and &C #enerator +ere small. or +hich +e are #oin# to re#ulate the speed! See Fi#ure @ abo\$e! Speed error bet+een the speed measured and the tar#et speed o . etc!. a uzzy lo#ic anti-loc% bra%in# system 3see DFuzzy "o#ic. uzzy lo#ic control is also a\$ailable utilizin# microchips manu actured by Motorola! (hese microchips are suitable or uzzy control applications. +++!mcu!motsps!com! One +ould use this approach i de\$elopin#. cost o the 'ational Instruments system is considerably abo\$e the `?>> ran#e! One +ould use the 'ational Instruments approach or a lar#e.e is a \$isual pro#ram that sho+s the crisp inputs and outputs as +ell as the uzzi ied inputs and the uzzi ied outputs! 1ou can chan#e the input and obser\$e the output ! ]6S??C!0J0 is the !asm ile or the BLhc?? uzzy en#ine! I you open this +ith notepad you can actually see the code or the uzzi ication process! In FU&S0 clic% on H6alance! d# then clic% on H0\$aluate. but this in ormation could be \$ery use ul! FU&S0 is a uzzy lo#ic de\$elopment tool or the Motorola BLhc?? microcontroller that enables the user to #raphically desi#n a uzzy system. +++!natinst!com. simple and e ecti\$e! (he po+er supply or e\$erythin#.ample. and #enerate C and assembly source code! FU&S0 can be do+nloaded rom the Internet: http:^^users!sdsc!edu^adecastro^home^pro9ects^ ud#e^ Fud#e!e. W>>L!4 (he steps in buildin# our system are: ?! &etermine the control system input! 0. that is the connector. 'o\$ember ?AAY. input is the speed in -pm o the &C motor. W>>L: * reader sent the ollo+in# in ormation! (he author has not personally pursued this. system +here le. +++!circuitcellar!com4! 3. cables. etc!. Circuit Cellar I'] ma#azine. di#ital^analo# out con\$erters or your application and pro\$ide a mathematically correct so t+are pro#ram to produce uzzy control action! (heir system also pro\$ides attracti\$e screen display color #raphics! 'eedless to say. sells a uzzy lo#ic system +here the uzzy control action is accomplished by the so t+are! 'ational Instruments applications en#ineers recommend one o their se\$eral analo#^di#ital in. capacitors. or e.controller. then clic% on H Fuzzy "o#ic 0\$aluator! Input and output is displayed #raphically and all the input and output membership unctions are sho+n as +ell as the rules. such as automatin# a processin# plant! /here usin# a personal computer is not practical because o space and +ei#ht limitations.lease note. but is +ell +orth it! /ith re#ard to the other hard+are. this note added =anuary ?. all on one screen! 0nd o note added =anuary ?.amples: (he temperature is the input or your home air conditioner control system! Speed o the car is the input or your cruise control! In our case. is recommended! It costs \$ery little e. so t+are. +as a ?W )olt &C po+er supply remo\$ed rom an old *pple computer! 'ational Instruments. resistors. only lo+ cost transistors. cheap. run uzzy lo#ic simulations. -e\$olutionizin# *utomoti\$e 0n#ineerin#. comple. includin# the Z>-L. lo+ po+er units purchased rom a surplus catalo#! (he motor output sha t +as connected to the #enerator input sha t +ith a small section o shrin% insulation tubin#.

.ositi\$e 6i# . or B> Miles per hour or your car! In our case. +e ha\$e 9ust one control output! (his is the \$olta#e connected to the input o the transistor controllin# the motor! See Fi#ure @! @! &etermine the tar#et set point \$alue. the output is the openin# and closin# o the s+itch that turns the an and compressor on and o ! For a car5s cruise control. or e. the tar#et set point is W.W. includin# appropriate so t+are! W! &etermine the control system output! For a home air conditioner.ositi\$e Small *lmost 'o 0rror 'e#ati\$e Small 'e#ati\$e Medium 'e#ati\$e 6i# Our system is much less complicated.ample Y> de#rees F or your home temperature.ZW> -pm! Z! Choose +ord descriptions or the status o input and output! For the steam en#ine pro9ect. or output: Output *ction /ord &escriptions Speed up 'ot much chan#e needed Slo+ do+n .ositi\$e Medium . so let us select only three conditions or input: Input Status /ord &escriptions (oo slo+ *bout ri#ht (oo ast *nd.ro essor Mamdani used the ollo+in# or input: . +here it is measured by the analo# to di#ital con\$erter and the pesonal computer.ZW> -pm is determined in the pro#ram! Speed error may be positi\$e or ne#ati\$e! /e measure the &C output \$olta#e rom the #enerator! (his \$olta#e is proportional to speed! (his speed-proportional \$olta#e is applied to an analo# input channel o our uzzy lo#ic controller. the output is the ad9ustment o the throttle that causes the car to return to the tar#et speed! In our case.

as in Fi#ure Z. but other shapes.-U"0S (ranslate the abo\$e into plain 0n#lish rules 3called Dlin#uisticD rules by &r! Kadeh4! -ules +ill appear in the 6*SIC computer pro#ram as DI -(henD statements: -ule -ule -ule (hese ?: I the motor is runnin# too slo+. belo+! (he chart is made +ith trian#les.t three steps use a chartin# techni2ue +hich +ill lead to a computer pro#ram! (he purpose o the computer pro#ram is to determine the \$olta#e to send to the speed controlled motor! One unction o the chartin# techni2ue is to determine the Dde#ree o membershipD 3see Ch! ?4 o the (oo slo+. there are three trian#les. then not much chan#e is needed! @: I motor speed is to ast. the chartin# techni2ue helps ma%e the continuous control eedbac% loop easier to \$isualize. hence three trian#les4! . or a #i\$en speed! Further. at the set point 3the tar#et speed4! For our e.ample. then speed it up! W: I motor speed is about ri#ht. pro#ram and ine tune! X! *ssociate the abo\$e inputs and outputs as causes and e ect +ith a -ules Chart. the use o +hich +ill be e. then slo+ it do+n! (he ne.plained! (rian#les are used. *bout ri#ht and (oo ast trian#les. as can be seen in Fi#ure Z 3three rules. could also be used! (rian#les +or% 9ust ine and are easy to +or% +ith! /idth o the trian#les can \$ary! 'arro+ trian#les pro\$ide ti#ht control +hen operatin# conditions are in their area! /ide trian#les pro\$ide looser control! 'arro+ trian#les are usually used in the center. such as bell cur\$es.

but this calculation ta%es only thousandths o a second +hen done by a computer! . as +e +ill do belo+.B! Fi#ure Z 3abo\$e4 is deri\$ed rom the pre\$iously discussed -ules and results in the ollo+in# re#ardin# \$olta#e to the speed controller: a! I speed is *bout ri#ht then 'ot much chan#e needed in \$olta#e to the speed controller! b! I speed is (oo slo+ then increase \$olta#e to the speed controller to Speed up! c! I speed is (oo ast then decrease \$olta#e to the speed controller to Slo+ do+n! Y! &etermine the output. that is the \$olta#e that +ill be sent rom the controller^si#nal conditioner^transistor to the speed controlled motor! (his calculation is time consumin# +hen done by hand.

belo+! (he 'ot much chan#e trian#le has a hei#ht o !Z and the Slo+ do+n trian#le has a hei#ht o !@. because these +ere the intersect points or their matchin# DcauseD trian#les.Z@Y!Z -pm speed line does not intersect the (oo slo+ trian#le. abo\$e! .ZW> -pm to W. that is the \$olta#e to send to the speed control transistor! (he result is a ected by the +idths +e ha\$e #i\$en the trian#les and +ill be calculated! See Fi#ure B. abo\$e! (he trian#les to be dra+n are determined by the rules in Step B! Since the \$ertical W.ZW> -pm! Intuiti\$ely +e %no+ +e need to reduce the \$olta#e to the motor a little! (he DcauseD chart and \$ertical speed line appear as ollo+s. ?Y!Z -pm abo\$e the 5set point!D *ction is needed to DpullD the speed bac% to W. see Fi#ure X belo+: (he \$ertical line intersects the *bout ri#ht trian#le at !Z and the (oo ast trian#le at !@! (his is determined by the ratio o sides o con#ruent trian#les rom .t step is to dra+ De ectD 3output determinin#4 trian#les +ith their hei#ht DhD determined by the \$alues obtained in Step Y. see Fi#ure Z. +e do not dra+ the Speed up trian#le! /e dra+ the 'ot much chan#e and the Slo+ do+n trian#les because the \$ertical speed line intersects the *bout ri#ht and (oo ast trian#les! (hese De ectD trian#les +ill be used to determine controller output.*ssume somethin# chan#es in the system causin# the speed to increase rom the tar#et speed o W.lane Seometry: Intersect point ^ ? E ??!B^WA E !Z Intersect point ^ ? E ?Y!Z^XL E !@ L! (he ne.Z@Y!Z -pm.

is +here the D+ei#htD 3area4 o the trian#les +ill balance! *ssume all the +ei#ht o the 'ot much chan#e trian#le is at W!Z> )dc and all the +ei#ht o the Slo+ do+n trian#le is at W!@B )dc! /e are loo%in# or the balance point! Find the position o the controller output \$olta#e 3the balance point4 +ith the ollo+in# calculation: 302! ?4 !>>L J &? E !>?W J &W 3&? is the ulcrum distance rom W!Z )! &W is the ulcrum distance rom W!@B )!4 302! W4 &? R &W E !>Z 3 rom Fi#ure B4 &? E !>Z . is determined by calculatin# the point at +hich a ulcrum +ould balance the t+o trian#les. +ith a resultin# controller output \$olta#e. a. as seen in Fi#ure B 3abo\$e4. the controller is samplin# se\$eral times each second +ith a resultin# DcorrectionD output ollo+in# each sample! (he abo\$e system +as tested +ith chan#in# loads on the rotatin# sha t.(he output. abo\$e! ]eep in mind that +e are only discussin# one sample at one instant in time. and returned the speed o the motor to +ithin W b o the W.ZW> -pm set point in less than ?!X seconds! (he accuracy +ith . )dc. and this is the \$olta#e +hich +e ha\$e determined should be applied to return speed to the tar#et \$alue! See Fi#ure B. there ore the balance point is a \$olta#e o W!@YB )dc.&W Sol\$in# the abo\$e by substitutin# 3!>Z-&W4 or &? in 02uation ? #i\$es &W E !>?B and &? E !>WZ. as ollo+s: (he *rea o the 'ot much chan#e trian#le is: ?^W J 6ase J :ei#ht E !X J !>Z J !Z E !>>L! *rea o the Slo+ do+n trian#le is !X J !>L J !@ E !>?W! Compute the controller output \$olta#e by indin# the point on the output \$olta#e.

directed by a microcontroller chip! (he microcontroller has to ma%e decisions based on bra%e temperature. soundin# e2ui\$alent to Dhal -ba%ed lo#icD or Dbo#us lo#icD! Some other nomenclature mi#ht ha\$e been pre erable. or >!Y nominal and >!@ cool. the Dtruth \$alueD o the bra%e temperature +ill almost al+ays be in some de#ree part o t+o membership unctions: >!B nominal and >!Z +arm. the term itsel inspires a certain s%epticism. such as: DcoldD. that mo\$e throu#h a continuous ran#e o \$alues. that is.ample. D\$ery hotD! &e inin# the bounds o these states is a bit tric%y! *n arbitrary threshold mi#ht be set to di\$ide D+armD rom DhotD. speed. to a di#ital computer. DhotD.>AB increments! *n Introduction (o Fuzzy Control Systems I!"RO#\$C"IO! "O %\$ZZ& 'O(IC ) %\$ZZ& CO!"RO' c DFuzzy lo#icD has become a common buzz+ord in machine control! :o+e\$er. DmoderateD. but it5s too late no+. as the temperature chan#es. but this +ould result in a discontinuous chan#e +hen the input \$alue passed o\$er that threshold! (he +ay around this is to ma%e the states D uzzyD. the input \$ariable5s state no lon#er 9umps abruptly rom one state to the ne. WXB increments! :i#her cost D?W bitD units pro\$ide Z. D+armD.+hich the set point speed can be maintained is determined by the resolution o the analo# to di#ital and di#ital to analo# con\$ersion circuits in the uzzy lo#ic controller! (ypical Dlo+ costD resolution is DL bitD. DcoolD. and uzzy lo#ic is actually \$ery strai#ht or+ard! Fuzzy lo#ic is a +ay o inter acin# inherently analo# processes. it loses \$alue in one membership unction +hile #ainin# \$alue in the ne.t! Instead. allo+ them to chan#e #radually rom one state to the ne. and other \$ariables in the system! (he \$ariable DtemperatureD in this system can be di\$ided into a ran#e o DstatesD. consider an antiloc% bra%in# system.t! *t any one time. and so on! . that li%es to see thin#s as +ellde ined discrete numeric \$alues! For e.t! 1ou could de ine the input temperature states usin# Dmembership unctionsD such as the ollo+in#: /ith this scheme.

pert (his combination o systemD! (raditional control systems are based on mathematical models in +hich the the control system is described usin# one or more di erential e2uations that de ine the system response to its inputs! Such systems are o ten implemented as Dproportional-inte#ral-deri\$ati\$e 3.(he input \$ariables in a uzzy control system are in #eneral mapped into by sets o membership unctions similar to this. lo+-resolution analo#-to-di#ital con\$erters.ist. and a system based on empirical rules may be more e ecti\$e! Furthermore. but the scheme can deal +ith them as simpli ied uzzy unctions that are either one \$alue or another! Si\$en Dmappin#sD o input \$ariables into membership unctions and truth \$alues. the t+o input \$ariables are Dbra%e temperatureD and DspeedD that ha\$e \$alues de ined as uzzy sets! (he output \$ariable. or DO'-OFFD. inputs alon# +ith its analo# inputs. Dbra%e pressureD. and so on! (his rule by itsel is \$ery puzzlin# since it loo%s li%e it could be used +ithout botherin# +ith uzzy lo#ic. each o the orm: IF bra%e temperature IS +arm *'& speed IS not \$ery ast (:0' bra%e pressure IS sli#htly decreased! In this e. and such s+itch inputs o course +ill al+ays ha\$e a truth \$alue e2ual to either ? or >.I&4D controllers! (hey are the products o decades o de\$elopment and theoretical analysis.ample. uzzy lo#ic is +ell suited to lo+-cost implementations based on cheap sensors. Dsli#htly increasedD. a procedure %no+n as Dde uzzi icationD! uzzy operations and rule-based Din erenceD describes a D uzzy e. is also de ined by a uzzy set that can ha\$e \$alues li%e DstaticD. usin# the membership unctions and truth \$alues obtained rom the inputs. Dsli#htly decreasedD.pensi\$eD in terms o computer processin# po+er and memory. +hy bother +ith uzzy control7 It has some ad\$anta#es! In many cases. the mathematical model o the control process may not e. but remember the decision is based on a *et o rules: • • • A++ the rules that apply are in\$o%ed. %no+n as D uzzy setsD! (he process o con\$ertin# a crisp input \$alue to a uzzy \$alue is called D uzzi icationD! * control system may also ha\$e \$arious types o s+itch. and Z-bit or L-bit one-chip microcontroller chips! . the microcontroller then ma%es decisions or +hat action to ta%e based on a set o DrulesD. and are hi#hly e ecti\$e! I .I& and other traditional control systems are so +ell-de\$eloped. or may be too De. the actual bra%e pressure. to determine the result o the rule! (his result in turn +ill be mapped into a membership unction and truth \$alue controllin# the output \$ariable! (hese results are combined to #i\$e a speci ic 3DcrispD4 ans+er.

thou#h the de initions can \$ary considerably bet+een di erent implementations! D)eryD. DtooD. the processin# sta#e is based on a collection o lo#ic rules in the orm o IF(:0' statements. De. simply uses the minimum +ei#ht o all the antecedents. althou#h trapezoids and bell cur\$es are also used. the uzzy rule sets usually ha\$e se\$eral antecedents that are combined usin# uzzy operators. DnearD. thou#h a#ain the de initions tend to \$ary: *'&.tremelyD cubes the \$alues to #i\$e #reater narro+in#. since the membership \$alues are al+ays less than ?. +hile O.ample. in one popular de inition.imatelyD. Dclose toD. such as *'&. D\$eryD. uzzy control can be used to impro\$e e. s2uares membership unctions. or the Duni\$erse o discourseD in uzzy 9ar#on! *s discussed earlier. thou#h this does not necessarily mean that the output itsel +ill be set to Dhi#hD. to the appropriate membership unctions and truth \$alues! (he processin# sta#e in\$o%es each appropriate rule and #enerates a result or each. +hich is some truth \$alue o DcoldD. and an output sta#e! (he input sta#e maps sensor or other inputs. O-. to #enerate a result in the uzzy set or the DheaterD output. +here the IF part is called the DantecedentD and the (:0' part is called the Dconse2uentD! (ypical uzzy control systems ha\$e dozens o rules! Consider a rule or a thermostat: IF 3temperature is DcoldD4 (:0' 3heater is Dhi#hD4 (his rule uses the truth \$alue o the DtemperatureD input. the membership unctions can be modi ied by Dhed#esD that are e2ui\$alent to ad9ecti\$es! Common hed#es include DaboutD.Such systems can be easily up#raded by addin# ne+ rules to impro\$e per ormance or add ne+ eatures! In many cases. or one e. and 'O(. Dsli#htlyD. a processin# sta#e. the output sta#e con\$erts the combined result bac% into a speci ic control output \$alue! (he most common shape o membership unctions is trian#ular.uses the ma. then combines the results o the rules! Finally. +hile Dsome+hatD broadens the unction by ta%in# the s2uare root! In practice. and so on.tremelyD.tra layer o intelli#ence to the current control method! %\$ZZ& CO!"RO' I! #. the #reater the truth \$alue o DcoldD. the hi#her the truth \$alue o Dhi#hD."AI' c Fuzzy controllers are \$ery simple conceptually! (hey consist o an input sta#e.istin# traditional controller systems by addin# an e. +hich is some \$alue o Dhi#hD! (his result is used +ith the results o other rules to inally #enerate the crisp composite output! Ob\$iously. and Dsome+hatD! (hese operations may ha\$e precise de initions. since this is only one rule amon# many! In some cases. thumb+heels. such as s+itches. but the shape is #enerally less important than the number o cur\$es and their placement! From three to se\$en cur\$es are #enerally appropriate to co\$er the re2uired ran#e o an input \$alue. Dappro.imum \$alue! (here is also a 'O( operator that subtracts a membership unction rom ? to #i\$e the DcomplementaryD unction! . this narro+s the membership unction! D0.

in +hich the output membership unction is #i\$en the truth \$alue #enerated by the premise! -ules can be sol\$ed in parallel in hard+are. in +hich the Dcenter o massD o the result pro\$ides the crisp \$alue! *nother approach is the Dhei#htD method.-min in erencin# and centroid de uzzi ication or a system +ith input \$ariables D. +hile the hei#ht method ob\$iously a\$ors the rule +ith the #reatest output \$alue! (he e. +hich ta%es the \$alue o the bi##est contributor! (he centroid method a\$ors the rule +ith the output o #reatest area.(here are se\$eral di erent +ays to de ine the result o a rule.D. DyD. but one o the most common and simplest is the Dma.ample belo+ demonstrates ma. and DzD and an output \$ariable DnD! 'ote that DmuD is standard uzzy-lo#ic nomenclature or Dtruth \$alueD: . or se2uentially in so t+are! (he results o all the rules that ha\$e ired are Dde uzzi iedD to a crisp \$alue by one o o se\$eral methods! (here are dozens in theory. each +ith \$arious ad\$anta#es and dra+bac%s! (he DcentroidD method is \$ery popular.-minD in erence method.

ad9ust details as re2uired! Complete document and release to production! *s a #eneral e. basically a methodical approach to trial-and-error! (he #eneral process is as ollo+s: • • • • • • &ocument the system5s operational speci ications and inputs and outputs! &ocument the uzzy sets or the inputs! &ocument the rule set! &etermine the de uzzi ication method! -un throu#h test suite to \$alidate system. consider the desi#n o a uzzy controller or a steam turbine! (he bloc% dia#ram o this control system appears as ollo+s: (here are t+o input \$ariables.imum \$alue is used and \$alues are not added. the ma.'otice ho+ each rule pro\$ides a result as a truth \$alue o a particular membership unction or the output \$ariable! In centroid de uzzi ication the \$alues are O-5d. and a sin#le output \$ariable. and the results are then combined usin# a centroid calculation! c Fuzzy control system desi#n is based on empirical methods. the turbine throttle settin#! (he turbine5s operation can be re\$ersed. temperature and pressure. that is.ample. so the throttle settin# can be positi\$e or ne#ati\$e! (he uzzy set mappin#s are sho+n belo+: .

W: .?: .@! .@: "ar#e ne#ati\$e! Medium ne#ati\$e! Small ne#ati\$e! Kero! Small positi\$e! Medium positi\$e! "ar#e positi\$e! (he rule set includes such rules as: rule ?: IF temperature IS cool *'& pressure IS +ea%. (:0' throttle is .(he throttle settin#s are de ined as ollo+s: '@: 'W: '?: K: .

and the pressure is in the Dlo+D and Do%D states! (he pressure \$alues ensure that only rules W and @ ire! -ule W is e\$aluated as ollo+s: -ule @ is e\$aluated as ollo+s: . as the e. i an O. (:0' throttle is .amples abo\$e do. assume the temperature is in the DcoolD state.rule W: IF temperature IS cool *'& pressure IS lo+. (:0' throttle is K! rule Z: IF temperature IS cool *'& pressure IS stron#. the ma.W! rule @: IF temperature IS cool *'& pressure IS o%. (:0' throttle is 'W! In practice.ample. the minimum o the t+o is used as the combined truth \$alue.imum is used! (he appropriate output state is selected and assi#ned a membership \$alue at the truth le\$el o the premise! (he truth \$alues are then de uzzi ied! For an e. the controller accepts the inputs and maps them into their membership unctions and truth \$alues! (hese mappin#s are then ed into the rules! I the rule speci ies an *'& relationship bet+een the mappin#s o the t+o input \$ariables.is speci ied.

(he t+o outputs are then combined: .

R c Consider implementin# +ith a microcontroller chip a simple eedbac% controller: .(he output \$alue +ill ad9ust the throttle and then the control cycle +ill be#in a#ain to #enerate the ne.t \$alue! B\$I'#I!( A %\$ZZ& CO!"RO''.

also applies to the output \$ariable4 can be described \$ery simply as a table.: small positi\$e K0: zero S': small ne#ati\$e "': lar#e ne#ati\$e I the error ran#es rom -? to R?.: lar#e positi\$e S. as +ell as the DoutputD. in this case. and the deri\$ed chan#e in error rom the pre\$ious error input.* uzzy set is de ined or the input error \$ariable DeD. then the input \$ariable5s uzzy set 3+hich. +ith the analo#-to-di#ital con\$erter used ha\$in# a resolution o >!WX. +ith the error ^ delta ^ output \$alues in the top ro+ and the truth \$alues or each membership unction arran#ed in ro+s beneath: . DdeltaD. as ollo+s: ".

(:0' output E "' (hese rules are typical or control applications in that the antecedents consist o the lo#ical combination o the error and delta si#nals.delta E ". +hile the conse2uent is a control command output! (hese rules can also be a little tric%y to interpret! For e.4 > > > > >!@ >!Y ? >!Y >!@ mu3K04 > > >!@ >!Y ? >!Y >!@ > > mu3S'4 >!@ >!Y ? >!Y >!@ > > > > mu3"'4 ? >!Y >!@ > > > > > > _______________________________________________________________________ (his table is a little tric%y to interpret! It simply de ines each o the elements o the uzzy set 3D".imum \$alue correspondin# to the \$alue o D>D on the top ro+ o the table.ample.4 > > > > > > >!@ >!Y ? mu3S. the mu \$alues are used to #enerate the top ro+ \$alues! Suppose this uzzy system has the ollo+in# rule base: rule ?: rule W: rule @: rule Z: IF e E K0 *'& delta E K0 (:0' output E K0 IF e E K0 *'& delta E S. then the output is also the K0 uzzy set element! /hat is very tric%y is that plu##in# actual numeric \$alues into this rule does not #i\$e. +ei#hted by the \$alues by the appropriate mu \$alues pro\$ided by the rule calculation. usin# the centroid calculation: . \$alue is the K0 uzzy set element.D or ?. and so this rule a+way* #i\$es an output settin# o >! Similarly. and rule Z al+ays #i\$es an output settin# o D"'D or -?! (he thin# to remember is that the actual output is a combination o the outputs o these our rules. (:0' output E S' IF e E S' *'& delta E S' (:0' output E ". at least directly._______________________________________________________________________ -? ->!YX ->!X ->!WX > >!WX >!X >!YX ? _______________________________________________________________________ mu3". IF e E ". rule W al+ays #i\$es an output settin# o DS'D or ->!X. an actual \$alue or the output settin#! (he \$alue or the output settin# is de ined by rule ? as DK0D! "oo%in# at the uzzy \$alue table sho+s that DK0D has its ma. O. +hile or the output \$ariable. rule @ al+ays #i\$es an output settin# o D". +hat rule ? says is that i the error \$alue is the K0 uzzy set element and the delta. the top ro+ \$alues are used to #enerate the mu \$alues. or chan#e rom last error.D throu#h D"'D4 in terms o the \$alues 3DmuD4 that they ha\$e relati\$e to the #i\$en \$alues in the top ro+! It is important to remember that or the error ^ delta \$ariables.

is produced +ith the simple calculation: mu3?4 E MI'3 >!Y.4 >!Y ? mu3K04 >!Y >!@ mu3S'4 > > mu3"'4 > > _________________________________ (hese \$alues can then be plu##ed into the rules to #i\$e output \$alues! (a%in# the irst rule: rule ?: IF e E K0 *'& delta E K0 (:0' output E K0 (he +ei#htin# or the output.SUM3 I E ? (O Z OF 3 mu3I4 c output3I4 4 4 ^ SUM3 I E ? (O Z OF mu3I4 4 (he result o this calculation #i\$es the actual output settin#! c 'o+. ? 4 E >!Y output3W4 E ->!X rule @: IF e E S' *'& delta E S' (:0' output E ". >!> 4 E > output3@4 E ? . the output \$alue o this rule is al+ays ?: output3?4 E > (he other rules #i\$e: rule W: IF e E K0 *'& delta E S.4 > >!@ mu3S. (:0' output E S' mu3W4 E MI'3 >!Y. suppose that at a #i\$en time +e ha\$e: error E >!WX delta E >!X (hen the correspondin# mu \$alues can be obtained by simply ta%in# them rom the appropriate columns o the uzzy set table: _________________________________ error E >!WX delta E >!X _________________________________ mu3". mu3@4 E MI'3 >!>. Dmu3?4D. >!@ 4 E >!@ *s mentioned abo\$e.

remember that a centroid is de ined by summin# all the moments 3location times mass4 around the center o #ra\$ity and e2uatin# the sum to zero! So i J> is the center o #ra\$ity.J> c 3 M? R MW R !!! R Mn 4 J> c 3 M? R MW R !!! R Mn 4 E 3 J? c M? R JW c MW R !!! R Jn c Mn 4 3 J? c M? R JW c MW R !!! R Jn c Mn 4 J> E _____________________________________ 3 M? R MW R !!! R Mn 4 .J> 4 c MW R !!! R 3 Jn .J> 4 c M? R 3 JW .>!@X R > . this #i\$es: > E 3 J? .or the inal control output! ! O course the hard part is i#urin# out +hat rules actually +or% correctly in practice! c I you ha\$e problems i#urin# out the centroid e2uation. and Mi is each mass. >!@ 4 E >!@ output3Z4 E -? (he centroid computation yields: mu3?4coutput3?4 R mu3W4coutput3W4 R mu3@4coutput3@4 R mu3@4coutput3@4 _____________________________________________________________________ mu3?4 R mu3W4 R mu3@4 R mu3Z4 E 3 >!@ c > 4 R 3 >!Y c ->!X 4 R 3 > c ? 4 R 3 >!@ c -? 4 _______________________________________________________ >!@ R >!Y R > R >!@ > . (:0' output E "' mu3Z4 E M*J3 >!>.J> 4 c Mn > E 3 J? c M? R JW c MW R !!! R Jn c Mn 4 .rule Z: IF e E ". O. Ji is the location o each mass.>!@ E __________________ ?!@ E ->!BX ^ ?!@ E ->!X -.delta E ".

the \$alues o mu correspond to the masses. COM.0C(-UM. an increase in the occurrence o loodin# e\$ents and especially o lash loodin# e\$ents is li%ely to continue into the uture! In those conditions and because buildin# ne+ lood de enses structures or de endin# \$ulnerable areas has serious inancial implications. M*C:I'0 &0SIS'. @W:@X! DClear (hin%in# On Fuzzy "o#icD by "a+rence *! 6erardinis. in many cases the per ormance o the ne+ physically based distributed models bein# comparable +ith the TolderU conceptual lumped models! (he paper presents an o\$er\$ie+ o some alternati\$e and complementary modelin# approaches.In our e. I000 S. arti icial neural net+or%s and uzzy lo#ic systems. I000 S. M*C:I'0 &0SIS'. especially in situations +here the physical processes relationships are not ully understood and they are also particularly +ell suited to modelin# comple. =uly ?AAW. 0M60&&0& S1S(0MS EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE O\$er\$ie+ o the arti icial neural net+or%s and uzzy lo#ic applications in operational hydrolo#ical orecastin# systems &ama#e due to loodin# has increase in many countries in the last years. W@ *pril ?AAW.ity o natural systems and o hydrolo#ical processes that in luence ri\$er le\$els e\$olutions ma%e the traditional modelin# approaches. W@ March ?AAX! D:o+ (o &esi#n Fuzzy "o#ic ControllersD.U(0. WB 'o\$ember ?AAW! D* Case For Fuzzy "o#icD by 6yron .ample o rain all-runo modelin# implementations! *rti icial neural net+or%s are +idely used as an e ecti\$e approach or handlin# non-linear and noisy data.&0SIS'. M*C:I'0 &0SIS'. possible applications or the impro\$ements o the Operational :ydrolo#ical Forecastin# Systems. to#ether +ith the use o distributed hydrolo#ical models. systems. the timely orecastin# o loods is becomin# more important or lood de ense and in #eneral or +ater mana#ement purposes! (he comple. becomin# more and more comple.ample. &ecember ?AAX. and the \$alues o J to location o the masses! • • • • • • • • D&esi#nin# /ith Fuzzy "o#icD by ]e\$in Sel . 'o\$ember ?AAX! D&ish+asher Cleans Up /ith Fuzzy "o#icD. I000 S.. the +arnin# and orecasts impro\$ements are not \$ery si#ni icant. based on mirrorin# natural processes +ith physically based e2uations \$ery di icult! &espite the act that in the last decades the Operational :ydrolo#ical Forecastin# Systems +ere si#ni icantly de\$eloped. ZW:Y>! Miller. 'o\$ember ?AA>. October ?AAW. and presentin# also some e. and due to the #lobal climate chan#e.0C(-UM. XL:B?! 'otes rom this article constitute the core o this tutorial! DFuzzy "o#ic Flo+ers In =apanD by &aniel S! Sch+artz & Seor#e =! ]lir.0C(-UM. in#estin# and processin# in real time a #reat amount o data rom automated hydrometrical and meteorolo#ical stations net+or%s and hi#h resolution #ridded data rom radars and satellites. systems on a real-time .?>X! DFuzzy FundamentalsD by 0arl Co.-OS-*MMI'S. ZB:XW! DFuzzy Controller Challen#es L-bit MCUsD. ZW:ZZ. +hich is no+ reco#nized as a real threat.