The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

Author: Zhimin Ding 1996 Application note Implementing fuzzy


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



AN710 Implementing fuzzy logic control with
Author: Zhimin Ding 1996
Application note
Implementing fuzzy logic control with
Author: Zhimin Ding
ABSTRACT
Most control applications involve specification relationship between sensor signals actuator outputs. Fuzzy logic provides intuitive accomplish that. allows user linguistic rules specify nonlinear mapping between sensor signals actuator outputs, thus provide framework programing embedded system. Using multi-joint robot system testbed, implemented fuzzy logic 8051 compatible 16-bit microcontroller-the robot controlled running fuzzy logic algorithm able carry goal-directed motor sequencing behavior. 8XC552 also used directly interface with robot communicate with through addition carrying AD/PWM conversions, '552 also implements multiple loops linear feedback servo positioning compliance control. This application note will demonstrate implementation Fuzzy Logic embedded control solution using Philips microcontroller.
AN710
networks, genetic algorithm learning automata have proved effective many applications. this application note, will demonstrate fuzzy logic With two-joint robot system testbed, will discuss fuzzy logic tackle specific control problem well some general programming issues related Instead exploring options that there, will focus effective solution this application note readers quickly acquainted with technique.
ROBUST CONTROL "BUG"-LIKE ROBOT
Figure diagram robot leg. powered gearmotors passive foot-like structure distal segment. call distal segment "tibia", proximal segment "femur" after animals. behavioral purpose this robot grab object within space reach. location object unknown robot changing periodically. This very similar situation when insect walking over very rough terrain trying find object (such tree branch twig) grab onto foothold. this design, range sensing such vision involved search object, case with insects. Insects have developed behavior shown Figure where they their legs probes actively sense where object then establish foothold onto through simple reflex [2]. active sensing reflex makes "substrate-finding" behavior quite robust. robot equipped with potentiometers which give angular position readings joints. segments leg, strain gauges pasted force touch sensors. strain gauges that pasted near junction each actuator corresponding segment give indications output torque actuators. Three additional strain gauges pasted along distal segment (the tibia). These strain gauge readings decoded determine where touch between external object occurred. strain gauges pasted foot ankle region signal foothold. purpose controlling this replicate "substrate-finding" behavior described above robust reliable fashion (Figure challenge this control problem lies fact that position touch sensors passively tell where object robot carry active search movement find where object such case, there linearly combine sensor signals their derivatives integrations) produce desired motor movement control. therefore ideal application fuzzy logic.
INTRODUCTION
Fuzzy logic originally created mathematical model human thought. said that fuzzy logic able capture "vagueness" "inexactness" concepts that reasoning. past decades main area success with fuzzy logic been industry control. application fuzzy logic allows specify relationship between sensor inputs actuator outputs using "if.then." type linguistic rules. fuzzy logic algorithm would able translate interpolate these rules into nonlinear mapping between sensor input signals actuator outputs feedback control [1]. Fuzzy logic makes easy human designer fine tune control system through trial error. Together with some other approaches such artificial neural networks, genetic algorithm, etc., fuzzy logic considered useful tool non-model based control system design1. There number software products available that would allow user design fuzzy controller interactively with special graphic user interface (GUI). These tools would usually generate codes which modified into user target platform. have determine parameters your fuzzy logic control system trial-and-error basis, certainly desirable have some kind graphic user interface that have into your code make modification here there. number inputs control system increases, number potential useful fuzzy rules increases dramatically becomes increasingly desirable some kind automated method rule synthesizing. There variety such methods doing this active research being carried this area currently. example, combination fuzzy logic with artificial neural
Non-model based design design that does depend mathematical description plant dynamics.
1996
Application note
Implementing fuzzy logic control with
AN710
SERVO MOTOR
BUILT POTENTIOMETERS (ANGLE SENSOR)
"FEMUR"
SERVO MOTOR STRAIN GAUGES (STRESS SENSOR)
TOUCH SENSOR "TIBIA"
TOUCH SENSOR
SIGN JOINT ANGLES
FOOT STRESS
SU00803
Figure two-joint robot leg. each axis, there potentiometer angle sensing pair strain gauges measure output torque. Additionally, there three strain gauges tibia measure stress caused touch foot load. third servo added this make three degrees freedom.
1996
Application note
Implementing fuzzy logic control with
AN710
SU00804
Figure Digitized robot movement trajectories from "substrate-finding'' behavior. encounters object during downward sweep search cycle; once contact made, slips until just clears object then comes back down establish foothold. encounters object during upward sweep search cycle. This typical nonlinear control problem because could linearly combine sensor signals actuator output values shown figure.
1996
Application note
Implementing fuzzy logic control with
AN710
OUTLINE APPROACH
illustrated Figure Philips microcontrollers I2C-bus used control this robot. Firstly, 8-bit 8XC552 microcontroller used interface directly with robot. addition carrying necessary functions sensor actuator interface, this 8-bit microcontroller also implements position force feedback shape actuator dynamics becomes position servo with proper compliance damping properties. This very important because compliance actuators allows robot carry contact based maneuvers stably reliably. Together with sensors actuators robot leg, 8XC552 implements "virtual muscles" seen from microcontroller upper level, which 16-bit microcontroller running fuzzy logic algorithm. chose
fuzzy logic engine because higher arithmetics capability. reads "crisp" sensor values from 8-bit microcontroller through interface converts them into fuzzy membership grades. These values evaluated fuzzy rules implemented order generate appropriate motor commands which sent back '552 through I2C. With I2C, easily multiple robot legs control system shown Figure example, together six-legged hexapod robot. this application, fuzzy logic intended replace level linear, classical control carried with 8XC552. Instead, fuzzy logic augmented distributed fashion. Fuzzy logic linear classical control '552 function parallel contribute different aspects control.
(NC)
XTAL2 XTAL1
(NC)
XTAL2 XTAL1
SERVO DRIVERS PWM0 PWM1
'552 ADC0
2.2K ADC1 ADC2
P0.0/SCL
P1.6/SCL
ADC3 ADC4
P0.2/SDA
P1.7/SDA
ADC5 ADC6 ADC7 (PORT STRAIN GAUGE AMPLIFIERS
ref-
MORE LEGS!
SU00808
Figure diagram robot control circuit. microcontrollers implement levels control. 8XC552 used directly interface with robot carry actuator level control feedback. used here carry fuzzy logic algorithms control movement. microcontrollers communicate with each other through bus. With I2C, easily more than robot same system. 1996
Application note
Implementing fuzzy logic control with
AN710
IMPLEMENTATION FUZZY LOGIC ALGORITHM
this section, will explain some fuzzy logic related programming issues. first explain algorithm itself going through basic steps then discuss implement algorithm first thing fuzzy logic control system translate real sensor signal value into fuzzy membership grades. This procedure called fuzzification. example, have sensor input value within range 255, want find what extent "big" "medium" "small". assign three functions corresponding "big", "medium" "small" translation. Those called membership functions. shown Figure then small" truth value 0.9; medium" truth value 0.2; big" truth value 0.1. other words, mapping value into triplet (0.9, 0.2, 0.1).
TRUTH VALUE
small big", strength rule smallest truthfulness antecedents relationship between antecedents "or" instead "and", would largest value truthfulness antecedents). last thing find real value output from rule evaluation. Before proceed, need define membership functions example, simply assign low" high". These membership functions impulse functions they generally called "singletons". find precise (crisp) value according above three rules, simply calculate weighted average z-singletons according strength three rules, therefore,
x+10
"SMALL"
"MEDIUM"
"BIG"
What have accomplished x=10 According three rules, every point range 0-255 some value shown Figure reader might wondering what difference does make just implement look-up table describe relationship Figure answer one-dimensional sensor input, implement exactly same sensor actuator mapping with table possibly save code complexity memory space. however, obvious implement multi-dimensional sensor actuator mapping with tables. Furthermore, fuzzy logic method allows user tune system more easily. example, order change mapping relationship between input output, most people, more intuitive change linguistic rules instead array parameters table.2
SU00806
Figure illustration fuzzy membership functions. each range (e.g., x=10), describe degrees being "small'', "medium'' "big'' using three fuzzy membership functions. next thing this point evaluate rules find their strengths. Suppose have these three rules that involve input small then medium then high high then this case, there part each rule, strength rule simply truthfulness part, which called antecedent. truth values above three rules 0.9, 0.2, 0.1, respectively. there more antecedents,
SU00807
Figure curve this figure represent mapping relationship from This relationship interpolated from above three fuzzy rules.
important point stressed before mapping relationship implemented fuzzy logic different from that implemented mathematical function. Such relationship clearly defined fully deterministic. Once input membership functions defined, process translating rules into mapping functions strictly conventional algebra. buzz word "fuzzy" thus very misleading.
1996
Application note
Implementing fuzzy logic control with
AN710
implement above algorithm need consider following issues. Since membership functions usually change time, arrays stored code memory space represent input membership functions. With this approach, will lose membership function information during power down, also membership functions shape. easy choose array size (dimension) membership functions array size equal resolution conversion. example, with 8-bit input, arrays size represent input membership functions. Furthermore, also 8-bit unsigned integers represent membership grades that they from instead Suppose have multiple input channels each channel, divide domain into number clusters; total number membership function would number input channels times number clusters each input. example Figure need three arrays membership functions characterize input robot application, need total membership function arrays that takes about code memory space.3
following example that shows perform "fuzzification". plugs input value into membership function array that stands small". instruction movc [A+DPTR] (code memory access with indirect addressing with offset) used access membership function data. this 80C51 compatible instruction. mapped DPTR mapped x_small: antecedent data data $ff,$fd,$f8,$f0, ;Membership function small". ;Input value ;The resultant truth value antecedent: small".
find truth value being "small": mov.w r6,#x_small ;Indirect pointer. mov.b r4l,x ;Offset. movc A,[A+DPTR] ;Code memory access. antecedent,r4l ;Return result.
Once have appropriate implement membership functions, fairly straightforward evaluate rules. case there multiple antecedents each rule, however, need additionally implement some kind min() max() function evaluate "and", "or" relationships. following code example that implements min() function fuzzy rule evaluation num_antecedents antecedents truth_rule data data ;Number antecedents rule, e.g. ;Truth values antecedents. ;The resultant truth value rule.
evaluate truth value rule with multiple antecedents: mov.w loop: mov.b mov.b r0,#antecedents ;Index antecedents. r1l,[r0+] r1l,[r0] proceed r1l,[r0] r0,#1 r0,#antecedents+num_antecedents loop ;Loop "num_antecedents" times.
proceed:
cost memory space concern, there other ways implement input membership functions. example, specify trapezoid membership function with parameters instead dimensional array. have then write subroutine inputs into fuzzy membership grades according these parameters.
1996
Application note
Implementing fuzzy logic control with
AN710
last part fuzzy logic loop, "defuzzification" process most computationally expensive. shown equation (1), need perform series 16-bit multiplications division final output value. This assume that sensor values membership grades have 8-bit resolution. need 32-bit (long) integer represent numerator equation 16-bit integer represent denominator. following example defuzzification code segment. num_rules truth_rules singletons data data data ;Number rules, e.g. ;The truth value rules array). ;The output singleton functions array); ;The crisp output value.
perform defuzzification process mov.w mov.b mov.w mov.w mov.w r0,#0 r1h,#0 r4,#0 r5,#0 r6,#0 ;Index rules. ;Clear high order bits ;Initialize order bits numerator. ;Initialize high order bits numerator. ;Initialize denominator.
loop:
mov.b mov.b mulu.b add.w addc.w add.w add.w
r1l,[r0+truth_rules] r2l,[r0+singletons] r2l,r1l r4,r2 r5,#0 r6,r1 r0,#1 r01,#num_rules loop ;8x8=16 multiplication. stores numerator. ;add carry higher bits. ;calculate denominator. ;increment index.
divu.d mov.w
;32/16 unsigned division.
above code segments serve examples illustrate efficiently instruction perform basic fuzzy logic operation. would still have decide encode rules control timing peripheral access. Most fuzzy logic controllers sample sensor inputs update actuator outputs synchronously time intervals. provides number internal timers which used control timing peripheral access.
1996
Application note
Implementing fuzzy logic control with
AN710
IMPLEMENTATION COMPLIANT ROBOT ACTUATOR THROUGH SENSORY FEEDBACK 8XC552
stated earlier, intend fuzzy logic augmented fashion. this application, level servo control still handled more easily with conventional linear feedback. this section, focus these level implementation issues. Specifically, will discuss interface between 8XC552 sensors actuators robot leg. Most robot actuators position feedback implement closed-loop position servo. order achieve position accuracy, those actuators usually quite rigid. Although robots powered this kind servo usually able make unconstrained movement smoothly quickly, they become unstable behave erratically upon contact with external objects [3]. With sufficient power, this kind robot could also dangerous human operators things around therefore often necessary avoid contact situation. Animal human muscles, other hand, very versatile fact that they usually compliant more importantly, compliance actively controlled. Figure illustrates implementation robot actuator "virtual muscle". gearmotor core. Each motor integrated with position sensor (potentiometer) feedback circuit that acts position servo. Since gear motor non-backdrivable, without additional circuitry described below, servo system quite rigid, that say, output angle determined input command signal, largely unaffected external torques acting joint. achieve actuator properties that resemble those muscles, additional feedback pathways through 8XC552 allow control compliance damping
properties. torque signal from strain gauges back position command signal form compliance feedback loop. gain compliance loop determines extent which servo moves response external forces, thus establishing compliant properties (see Figure outer loop). dynamic properties integrated sensor-actuator such compliance damping ratio controlled adjusting variable gains pass filter time constants compliance feedback loop. With compliant robot joint actuators, effectively added cushion between robot objects contact with therefore significant improvement contact stability [3], [4]. With adjustable joint compliance, robot serve both contact based probe effector that capable exerting forces maintaining positional accuracy depending behavior context. 8XC552 carries both position force feedback. feedback loop implemented timer interrupt service routine that called every 0.1ms. After 8XC552 completes sensory feedback function tuning compliant actuator dynamics, stores copies sensor values buffer access through control output angle compliance robot joint. 8XC552 thus implements compliant actuator with electronically controllable compliance presents itself slave Notice that feedback pathways implemented thus strictly linear feedback loops that intended actuator control. This part feedback done easily without fuzzy logic4. other hand, control this level done hard real time ensure dynamic stability.
POSITION INPUT
MOTOR DRIVER
INNER LOOP (POSITION SERVO)
ANGLE SENSOR MOTOR
OUTER LOOP (COMPLIANCE DAMPING) STRAIN GAUGE
SU00805
Figure integrated sensor-actuator assembly compliant robot joint actuation. active compliance accomplished through stress feedback.
possible fuzzy logic make exact linear feedback loop, this approach would seem counter-productive.
1996
Application note
Implementing fuzzy logic control with
AN710
Rule base generation
this application, fuzzy logic used control robot higher level, that coordination between joints order carry meaningful motion sequence. mentioned earlier, main advantage fuzzy logic that user design control system based intuition. There are, therefore, many rules follow generate fuzzy logic rules. this section, discuss techniques that used this specific application. addition strain position sensor inputs mentioned earlier, software generated timer signal implemented fuzzy evaluator internally this counts another sensory input. timer counts from repeatedly they were clustered into three fuzzy sets corresponding three phases searching cycle, namely "start", "probe" "retract". This necessary because control involves generation rhythmic movement absence specific sensor inputs. rhythmic movement ensures that robot will engage active searching when touch with object. timer input functions "central pattern generator". addition soft timer, there total sensor inputs this system. Each sensor values clustered into clusters. example, quantity ranging from characterized membership functions corresponding "very small", "small", "medium", "big", "very big". each output, there could much 234375 rules. obviously impossible manually rules "trial-and-error" basis. Notice that this system, signals detected from various sensors highly correlated. example, when touch sensor signaling positive, touch sensor likely signal positive also (but vice versa). therefore unnecessary rule like touch sensor positive-big touch sensor negative-big THEN because this situation does exist. this analysis reduce number rules significantly. Here rules that used give performance shown Figure Additional rules make more versatile. tibia stress zero femur stress zero timer start THEN femur output negative-small tibia output positive-big. tibia stress zero femur stress zero timer probe THEN femur output positive-big tibia output negative-big. tibia stress zero femur stress zero timer retract THEN femur output negative-big tibia output negative-big. above three rules responsible generation three phased search pattern when touch anything).
touch sensor negative-small THEN femur output negative-big tibia output negative-big. touch sensor negative-small THEN femur output negative-big tibia output negative-big. tibia stress negative-small THEN femur output negative-big tibia output negative-big. touch sensor positive-small THEN femur output negative-big tibia output zero. touch sensor positive-small THEN femur output negative-big tibia output zero. tibia stress positive-small THEN femur output negative-big tibia output zero. femur angle negative-big tibia angle negative-big THEN tibia output positive-big. above rules responsible retract movement when touch with object shown Figure foot stress negative-small THEN femur output positive-small tibia output negative-small. This rule responsible foot keep contact with object pressing onto it.) Figure gives digitized trajectory plots "substrate finding" behavior performed robot leg. When robot contact with anything, carries three-phased searching movement. soon touches object, would generate reflexes shown Figure example, Figure tibia would press against object while slipping upwards. soon tibia just clears object, robot will reposition foot object keep pressure. substrate moves, able adjust promptly maintain contact with substrate joint compliance. Even though there visual guidance, with active sensing, robot able find grab onto firm object quite reliably.
1996
Application note
Implementing fuzzy logic control with
AN710
DISCUSSIONS
feedback pathways control system often categorized into classes, linear (e.g., control) nonlinear, they often serve quite different purposes. this application, linear feedback control loops implemented "tune" robot joint dynamics some desired fashion, i.e., position servo with some compliance, whereas nonlinear feedback control reflexes used control coordination between multiple robot joints order achieve more concrete objective such requirement robot grab hold onto object. linear feedback algorithms usually straightforward implement they generally have high speed requirements stability reasons. Nonlinear feedbacks, other hand usually computationally more intensive requirements interpolation (fuzzy logic algorithm does exactly that). This requirement will usually slow things down little bit. this paradigm, stability robustness system depends critically speed linear feedback layer somewhat less sensitive speed fuzzy logic loop. envision that with next generation (XA-S3). integrate these functions into chip. will multi-tasking capabilities that implement several layers feedback, some which carry simple, fast servoing actuator control others running fuzzy logic goal-directed motor sequencing behavior.
REFERENCES
Castro, J.L., Fuzzy logic controllers universal approximators. IEEE transactions system, man, cybernetics, Vol. 629-635. Bassler, (1991) Interruption searching movements partly restrained front legs stick insects, model situation start stance phase? Biol. Cybern. 507-514. Hogan, (1988) stability manipulators performing contact tasks. IEEE Journal Robotics Automation, vol. 677-686. Ding, Nelson, M.E. (1995) neural controller single-leg substrate-finding: first step toward agile locomotion insects robots. Computation Neural Systems Eeckman J.M. Bower, eds., Kluwer Academics Press. Data Handbook IC25: 16-bit 80C51XA Microcontrollers (eXtended Architecture). Philips Semiconductors, 1996.
1996
Application note
Implementing fuzzy logic control with
AN710
Philips Semiconductors Philips Electronics North America Corporation reserve right make changes, without notice, products, including circuits, standard cells, and/or software, described contained herein order improve design and/or performance. Philips Semiconductors assumes responsibility liability these products, conveys license title under patent, copyright, mask work right these products, makes representations warranties that these products free from patent, copyright, mask work right infringement, unless otherwise specified. Applications that described herein these products illustrative purposes only. Philips Semiconductors makes representation warranty that such applications will suitable specified without further testing modification. LIFE SUPPORT APPLICATIONS Philips Semiconductors Philips Electronics North America Corporation Products designed life support appliances, devices, systems where malfunction Philips Semiconductors Philips Electronics North America Corporation Product reasonably expected result personal injury. Philips Semiconductors Philips Electronics North America Corporation customers using selling Philips Semiconductors Philips Electronics North America Corporation Products such applications their risk agree fully indemnify Philips Semiconductors Philips Electronics North America Corporation damages resulting from such improper sale. Philips Semiconductors East Arques Avenue P.O. 3409 Sunnyvale, California 94088-3409 Telephone 800-234-7381 Philips Semiconductors Philips Electronics North America Corporation register eligible circuits under Semiconductor Chip Protection Act. Copyright Philips Electronics North America Corporation 1996 rights reserved. Printed U.S.A.
1996

Other recent searches


Way-0 - Way-0   Way-0 Datasheet
SBA-2-22 - SBA-2-22   SBA-2-22 Datasheet
TLV320AIC3253 - TLV320AIC3253   TLV320AIC3253 Datasheet
NPF2001 - NPF2001   NPF2001 Datasheet
ILD621 - ILD621   ILD621 Datasheet
621GB - 621GB   621GB Datasheet
ILQ621 - ILQ621   ILQ621 Datasheet
621GB - 621GB   621GB Datasheet
TLP621-2 - TLP621-2   TLP621-2 Datasheet
TLP621GB-2 - TLP621GB-2   TLP621GB-2 Datasheet
ILD620 - ILD620   ILD620 Datasheet
ILQ620 - ILQ620   ILQ620 Datasheet
CDD2395 - CDD2395   CDD2395 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive