FROM EDN EUROPE: Whatever happened to fuzzy logic?
A handful of years ago, it was common to see consumer products sporting the label "fuzzy-logic control," but those front-panel stickers have faded away.
By Graham Prophet, Editor -- EDN, April 1, 2004
|
Always more popular with Japanese and Pacific Rim consumer-product designers, fuzzy logic did not catch on to the same extent in other regions and failed to become a unique selling point as far as consumers were concerned. A similar situation surrounded neural networks. The two techniques are essentially unrelated, save that they both provide control methodologies to handle highly nonlinear or poorly specified problems, they both came to some prominence at about the same time, and they both faded from view in much the same way.
(This article is not a primer in fuzzy logic or neural networks. It uses certain words that have precise meanings in fuzzy logic and neural networks without complete rigour and is intended mainly as a reminder of what the techniques are all about.)
Simulating intuition
Both neural networks and fuzzy logic aspire to allow electronic systems, built with familiar circuit techniques or employing conventional computing technologies, to attack certain problems in a way that mimics human responses and abilities. One of the intimidating aspects of fuzzy logic is the name itself, which has connotations of imprecision. On the contrary, however, fuzzy logic is capable of precise responses. It allows systems built around Boolean logic, handling binary values, to work with imprecisely defined values that you might express verbally as "more," "less," "high," "low," and so on. Although vague, those values are amenable to intuitive human understanding. ("Vague" is one of those words that has a special meaning in the special vocabulary.) You cannot define their meaning by using one parameter but with reference to others; for example, if the problem that you are exercising control over is the separation between your car and the car in front of it, the meaning you express by "near" or "far" differs depending on the speed at which you are travelling, whether you are accelerating or braking, and a number of other parameters.
In implementing a fuzzy-logic system, you map values across the range of an input parameter, to membership of a set that has some bearing on the control parameter you eventually want to calculate. Again using the car example, you might decide that for separation distance, 10m is near and therefore a full member of the "proximity" value set and 100m is far and not a member of that set. So the input- value range 10 to 100m would correspond to a membership value of 1, reducing to 0, of the set. For simplicity, most hardware-based fuzzy systems use a linear mapping between the two limits, leading to triangular- or trapezoidal-shaped "membership functions," the fundamental building blocks of fuzzy systems.
You can then express logical relationships between the sets using verbal constructions: For example, "If 'proximity' is low AND 'speed' is high, THEN 'braking' is 100%." Every application has multiple rules of a similar form describing the relationships between the controlled and controlling parameters. The process of deriving an output from an input in fuzzy logic, "inference," is not a calculation; rather, you convert real-world inputs to fuzzy values, identify the applicable rules and derive a "weighted average," and translate this information back to a real-world ("crisp," the complement of fuzzy) value. In technological terms, the process of deriving outputs from a series of input values with fuzzy logic involves "fuzzification," followed by inference, followed by "defuzzification." Figure 1 shows a typical fuzzy-system controller.
Those who come to fuzzy logic from a background in conventional logic are surprised that you can obtain control loops of high performance with a simplified design process. Long-time advocates of the technology acknowledge that the name "fuzzy" has not been helpful in this respect. Fuzzy logic remains a simple and quick method of producing control systems that can operate with few resources—especially in the case of nonlinear systems, in which it is difficult to write a precise model on which to base a conventional control loop. Using fuzzy logic, you can also interact directly with input values, which consumers can describe in "human-comprehensible" terms; you can label your washing-machine buttons for laundry that is "lightly soiled" to "very dirty," for example.
You can implement a fuzzy-logic scheme either through software development, leading to code that runs on a conventional microprocessor or microcontroller, or you can use a microcontroller that has a hardware fuzzy-inference engine module. You can also source high-level mathematical-modelling software that includes fuzzy-systems design.
Neural nets
Neural networks, unlike fuzzy logic, seek to reproduce the versatility of the human brain in recognising the end-to-end, input-to-output behaviour of a system without understanding all the processes taking place within it. Taking as a fundamental model the interconnections of nervous systems within the brain—neurons and synapses—neural networks have the attributes of memory and learning. In applying a neural technique to a system, you show the network many examples of known-correct input/output-value pairs. In its learning mode, the network creates network connections with weighted values to match the data you provide and stores the values for the weighted connections that achieve the correct result. By exploring the whole input/output-value space, the network "learns" to provide a correct response to any given input stimulus, without formally modelling the processes comprising the original system. An essential trick in designing a neural-network architecture is to achieve convergence; that is, as you show it successive input/output examples, it builds the ability to model the complete value space and does not "forget" the examples it previously learned.
Neural networks are therefore particularly applicable to complex problems involving difficult-to-measure or difficult-to-model parameters—in particular, processes that have a high degree of nonlinearity. Although much discussed in academic circles, only limited examples of pure neural-network control have ever appeared in volume-production embedded-control applications, although many have done so as custom solutions to individual intractable control problems, in areas such as industrial- and chemical-process control. This situation is especially true in complex and multivariable problems, such as large-scale power-system control. However, a number of suppliers have employed the technique as one part of a hybrid "neuro-fuzzy" concept that employs neural techniques to generate black-box models of the behaviour of real-world systems, generating data that designers can then use to define the fuzzy-logic-membership functions.
What happens to the expertise built up in neural and fuzzy techniques from their first flush of popularity? If you set about tracking down some of the pioneering companies from as much as a decade ago, you'd find that, although many no longer exist, some have transformed themselves into software-design and consultancy operations. These businesses are applying the same neural and fuzzy techniques but mainly in software simulation running on conventional computers, in areas such as financial modelling, financial services, and data mining. For example, they use neural techniques to model the behaviour of markets, so that fund managers can better predict short to medium movements in share prices. If you have ever been accepted (or, perish the thought, rejected!) for a charge card on the basis of automatic credit scoring, it is likely that your data has been subject to some measure of neuro-fuzzy analysis. This situation exemplifies the learning attribute of a neural system; it is difficult to write a set of precise rules related to a database of customer information that defines who is a good risk. However, you can train the network by giving it inputs for all the data elements you hold on existing customers and telling it whether each turned out to be a good risk.
Switched from learning to operating mode, the system can them accept the data for a new customer and base its assessment on the learned pattern. Game software has also used neural techniques; programmers employ the techniques so that the game "learns" what to expect its human opponent to do in certain circumstances and can use that information to make moves that outwit its opponent. And, with the upswing in interest in security systems and biometrics, a revival will likely occur in activity in applying neural-network programming to problems such as facial recognition; likewise, there is great interest in using neuro-fuzzy techniques to identify patterns in large data sets and other related data-mining applications. The common thread is, once again, the ability to mimic intuition—to understand that a pattern or relationship exists within a large amount of data without necessarily being able to write an algorithmic description of that relationship. The term "neural" tends to be used interchangeably with "machine learning," although you could argue that machine learning encompasses a wider range of techniques than neural networks alone.
Neural and fuzzy systems, therefore, contain techniques that you can use to advantage for complex and nonlinear control. So, why are they not more widely used? As much as anything else, the answer might be "fashion." Neither system fits well with traditional logic-based thinking, and neither—when they were "hot topics"—demonstrated a sufficiently clear performance advantage to justify designers departing from established thinking.
Part of the answer lies in the rapid progress of "conventional" processors and sensors. Ample processing power to solve what were previously difficult control problems is now available on a low budget in both money and power. At the same time, you can source sensors that more accurately than ever before measure a wider range of physical parameters. The overall effect of these factors is that you can now relatively easily make problems that you might have previously regarded as poorly modelled or subject to vague rules part of a conventional control loop. Nevertheless, both techniques are alive and well and solving real-world problems.
Fuzzy-design software
A prime source in Europe of software-based technology for fuzzy-logic-system design is the fuzzyTech tool set by Inform GmbH in Aachen, Germany. The company's tools come in a number of editions that make up a basic suite of analysis and editing functions to design a complete fuzzy-control system. You can use a general-purpose tool set to output C code, incorporating all the necessary structures to implement the fuzzy decision process; the C compiles with any standard development-tool chain to run on the processor of your choice. Inform also markets a series of microcontroller-unit-specific tools that generate compiled code directly for chosen microcontroller families. Packages support Motorola's HC05/08 and 11/12 series; STMicroelectronics' ST6; Microchip's PICs, 8051 family, and derivatives; Infineon's C166; and TI's TMS 32 series DSPs. A separate thread of Inform's development-tool chain targets programmable-logic controllers for industrial/process-control applications.
You can extend the capabilities of the package with a supplementary neuro-fuzzy module that uses a modified-error-back-propagation technique to exploit the learning ability of neural-network techniques and to apply them to the task of "training" a fuzzy-logic scheme. A neuro-fuzzy approach uses sets of sample data to create or modify rules and membership functions; you can mix parameters that you learn in this way from real-world data with rules that you write explicitly in verbal logic terms. You can also extend the system to allow rules that not only take positive actions, but also express exclusions or warnings.
If you are used to designing systems from an algorithmic level, you may already be familiar with The Mathworks' Matlab and Simulink software. One option in Matlab is the Fuzzy Logic Toolbox, with graphical interfaces to take you through the process of fuzzy-inference-system design, including advanced functions, such as fuzzy clustering and adaptive neuro-fuzzy learning. The result can run as a stand-alone simulation, or you can take it via the Simulink package through to C-code generation via the Real-Time Workshop for implementation as a control scheme. The Mathworks' also offers a complementary neural-network package.
Offerings of this type can generate systems that run on general-purpose microcontrollers or other CPUs. You can also use hardware designed to accelerate fuzzy-logic functions. For example, Motorola's HC12's instructions set contains specific "fuzzy instructions" (Reference 1), and some microcontrollers in STMicrocontroller's ST5 family employ a hardware fuzzy-inference engine as one of the functional blocks on the chip. To be more accurate, the ST5 contains a "decision processor" that you can, with the assistance of the companion fuzzy-logic toolbox, use to host fuzzy decision processes; the actual fuzzy inference engine is one block of the decision processor.
As with other fuzzy implementations, fuzzification takes the instantaneous value of each input parameter and determines its degree of membership within every fuzzy set you define in your design. The processor then applies every rule you have constructed to those membership values and sums them to produce the "crisp" output. If you choose the fuzzy route, ST's claims assert, you will see substantial savings in CPU usage, code size, and execution time compared with a conventional approach to, say, a PID (proportional-integral-derivative) control loop. Other applications listed that ST quotes include complex control systems, expert systems, and virtual sensors, in which you must infer the value of a parameter that you cannot measure directly.
Although the ST5 chips with the extra hardware remain on the catalogue, and ST fully supports both them and their development software, the company offers no comment on future developments. However, ST's position is typical. The current experience of seeking information on fuzzy technology has the air of searching in dusty archives, and there is a sense that vendors are sometimes slightly surprised to be asked about their fuzzy products.
Still thinking
The world of neural networks is, if anything, more littered with broken Web links and references to specialist products that may be unavailable than is fuzzy logic. Nevertheless, innovations in using the technology in relatively "everyday" applications continue. Neural technologies require significant processing resources to run at usable speeds—that is, to give decisions and implement controls in anything like real time. Accordingly, several years ago, a handful of silicon vendors offered custom-designed neural-network chips, implementing the structures directly in hardware for performance; most of these designs have now disappeared. Unlike with fuzzy methods, you cannot easily run neural schemes on general-purpose but resource-limited machines (microcontrollers). This situation perhaps explains the software programmers' shift back to "big computing" as the environment of choice for neural techniques.
However, Axeon is now offering a new development to the automotive sector in the shape of the Vindax processor (Picture). The Vindax architecture implements a neural-network approach to control of complex and highly nonlinear systems, on a fully logic-based array of parallel-processing elements. Some previous approaches to neural-network hardware have used hybrid analogue/digital technology with storage of circuit "weight" values as analogue levels. Axeon's approach uses standard CMOS logic. Moreover, the architecture hides the detail of its neural aspects from you, the user; the device accepts digital input values, outputs digital values, and has learning and control modes. Axeon's description of the architecture makes no mention the term "neural" at all, preferring to differentiate its function as an advanced statistical-modelling technique. The result is the same: By learning from real-world data, it determines the relationships between input and output parameters in nonlinear systems without attempting to describe them algorithmically. In microprocessor terms, the device is an SIMD (single-instruction-multiple-dispatch) array of 256 identical processing elements, with control and memory structures to handle the learning and storage of parameters.
Once you train it, the device takes input values and performs "classification" to derive the appropriate output. Automotive systems that the company cites as examples include control of a fully flexible valve train in an internal combustion engine. The detailed computation of valve timing across the whole range of engine speed, temperature, and other parameters is complex and requires you to handle the control loop of the solenoid-operated valve itself, a highly nonlinear device, within the overall control scheme for the whole engine. A complete computational solution is difficult and processing-intensive, but the key parameter to control is exhaust-gas composition. Axeon claims you can train Vindax to optimise the outcome over the whole operating space without mathematically modelling the components. Vindax comes as a chip or as IP (intellectual property) for incorporation into larger devices or ASICs. Axeon's vice president of corporate communications, Colin Turnbull, freely admits that, for the many situations in which conventional controls work well, there would be little point in applying Vindax. But, he says, for extreme and difficult nonlinear problems, the processor comes into its own.
BAE Systems is implementing another neural network in a form that you will be able to use via the design tools of EDA company Celoxica (Figure 2). BAE's LEARRNN (Logic Enabled Asynchronous Rapid Robust Neural Network) system employs a weightless-neural-network technique, which, as its name suggests, uses networks with no weights, only logic values. The company claims the system is adept at filtering and handling noisy data, such as video, that arrives in 2- or 3-D and has inherent parallelism. You can implement such a system in Boolean logic without clocks or arithmetic processes, and you perform the learning process by storing data sets in a single pass. Celoxica's DK software tools add the ability to construct the necessary logic directly in FPGA, for an efficient implementation that you directly execute in logic rather than compute on a processor. All basic LEARRNN functions and building blocks are available as a toolbox for Matlab, and you can simulate them with custom IP designed in the DK design environment using Celoxica's Nexus-PDK cosimulation manager. With the tools, you can perform functions such as pattern, target, and fault recognition and interpretation of image data in the presence of noise.
So, companies are designing and building innovative systems with both fuzzy and neural techniques. Should you be using them? If you have complex control problems with intractable nonlinearities, they would appear to be worth revisiting—especially if you are also contending with limited resources. It is worth adding that you can make both techniques, particularly neural nets, adaptive, to continually optimise control of a changing process.
The Electronic Controls and Drives Research Group at De Montford University in the United Kingdom is one group that found the technologies worth revisiting. Senior lecturer, Marcian Cirstea, PhD, and his colleagues started with the objective of investigating the principles of power-electronic-control strategies, using neural and fuzzy techniques, for teaching purposes. Cirstea says that the problem his group immediately encountered was that, although there was a wealth of material available on many aspects of the techniques, no single source brought the material together. The lack of integrated texts on the subject, Cirstea adds, may be one reason why use of the techniques is at a low level. To remedy the situation, Cirstea and his group wrote the work they needed themselves (Reference 2).
The group's book begins by reviewing standard modern-control techniques and methods for implementing them at the circuit level with respect to control of electric motors and power systems. The authors then introduce neural techniques, reviewing their history and the available algorithms. A description of implementing a neural network on FPGAs follows a discussion of neural-network implementations (analogue, digital, and software). After covering similar ground for fuzzy techniques, Cirstea and his colleagues then chart a detailed methodology for designing control systems, including neural and fuzzy elements. The group wrote the methodology in VHDL for synthesis into FPGA-configuration code. The book gives two control-problem examples with extensive code listings: an induction-motor controller and a more complex, diesel-driven synchronous generator set. In both cases, the team says, the use of neural and fuzzy techniques yielded efficient and compact control systems; in the case of the generator, the fuzzy-logic controller operated on a loop from the rectified output voltage directly back to the diesel-engine fuel valve and gave good results in stability and fuel economy. The fuzzy controller fit into a Xilinx XC4010.
You can reach Editor Graham Prophet at +44 118 935 1650, fax +44 118 935 1670, e-mail gprophet@reedbusiness.com.
| OTHER SUPPLIERS OF FUZZY TECHNOLOGY | ||
|
Aptronix
www.aptronix.com |
Togai Infralogic
www.ortech-engr.com/fuzzy/togai.html |
|
| OTHER SUPPLIERS OF NEURAL TECHNOLOGY (MACHINE LEARNING) | ||
|
Dendronic Decisions
www.dendronic.com |
||
| References |
|
For more information...
For more information on products such as those discussed in this article, contact any of the following manufacturers directly, and please let them know you read about their products in EDN Europe. In addition to the companies mentioned in the article's text are sources of information on fuzzy and neural techniques too numerous to list. For example, the authors of Reference 2 hold a list of fuzzy-logic tools at www.cse.dmu.ac.uk/~rij/tools.html. Useful search terms for information on fuzzy logic include the names of pioneers and champions of the field, such as professors Lotfi Zadeh and Bart Kosko.
Axeon
www.axeon.com
BAE Systems/Celoxica
www.camtech.co.uk
www.celoxica.com
Inform GmbH
www.fuzzytech.com
The Mathworks
www.mathworks.com/products/fuzzylogic/
Motorola Semiconductors
http://e-www.motorola.com/
STMicroelectronics
www.st.com


















