Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesMicrochip's a Hands-On Introduction to Fuzzy Logic


September 1995 / News & Views / Microchip's a Hands-On Introduction to Fuzzy Logic
Rick Grehan

The fuzzyTech-MP Explorer ($295) is a combination of software and hardware for learning how to develop a fuzzy application. Though I have seen fuzzy logic applied to decision-making systems such as fuzzy-logic-based spreadsheets, the fuzzyTech-MP Explorer from Microchip Technology (Chandler, AZ, (602) 786-7200; fax (602) 899-9210) concentrates on using fuzzy logic in system control applications.

The hardware side of the Explorer is the fuzzyLab, a small circuit board powered by an AC adapter and populated with LEDs, push buttons, a pair of potentiometers, RS-232 circuitry, a socketed PIC-family processor, and a thermistor/resistor pair (bonded together in a plastic sheath). One output pin of the PIC processor is connected to the resistor. By varying the duty cycle of a pulse wave out that pin, you can heat the resistor. Via another I/O pin, the PIC processor reads the thermistor's temperature. The processor on the fuzzyLab "talks" through the serial port to the Windows-based fuzzyTech development system. The idea is to produce a fuzzy-logic control program that can heat the thermistor to a target temperature and keep it there.

This sounds simple, but fuzzyTech's tutorial will show you that this is not the case. In the tutorial, you operate the heating manually. I quickly discovered that when you turn the heater up too quickly, you overshoot the optimum temperature. If you back off too fast, it undershoots as it cools down. (I discovered that I would make a lousy thermostat.)

The next step is to activate the fuzzyTech development system. You define "crisp" values: real-world inputs and outputs (e.g., temperature and duty cycle). The crisp inputs are read into the system and "fuzzi fied" into linguistic terms: A temperature of 30C might "fuzzify" into the linguistic term too_cold. Linguistic terms pass through a set of IF...THEN statements that you construct. These statements determine output linguistic terms. The output is "defuzzified" into a crisp output value that controls the amount of current going into the resistor.

All this time, you're learning fuzzy-logic fundamentals: how to define linguistic terms, how crisp input values convert to membership within linguistic terms, how output linguistic terms convert to crisp output values, and so on. Best of all, you can see if what you've learned works using the included fuzzyTech software.

The fuzzyTech development system provides a visual IDE (integrated development environment). Your system's details are all saved in an FTL (fuzzy technology language) source code file. Once your program works properly, you can output PIC16xx-compatible source code. (You need a separate product to assemble the source code into executable code.)

You can even build a simulation in C and use fuzzyTech to control it. The product uses Windows messages as the communications route. Source code for this interface is provided. Microchip includes a sample program that uses this technique. It simulates using a crane to unload boat cargo and uses fuzzyTech to control the crane's motor. If you want to get your fuzzy feet wet, I can think of no better way than this.


fuzzyLab Powers the Explorer

photo_link (25 Kbytes)

Microchip's fuzzyTech-MP Explorer includes hardware (shown) and software that lets you explore fuzzy-logic programming.


Up to the News & Views section contentsGo to previous article: Bigger LCDs Mean Better Images to GoGo to next article: Computer-TV Hybrids Invade the DenSearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network