Table of Contents

Advertisement

The CPU12 has the first microcontroller instruction set to specifically address the
needs of fuzzy logic. This section describes the use of fuzzy logic in control systems,
discusses the CPU12 fuzzy logic instructions, and provides examples of fuzzy logic
programs.

9.1 Introduction

The CPU12 includes four instructions that perform specific fuzzy logic tasks. In addi-
tion, several other instructions are especially useful in fuzzy logic programs. The over-
all C-friendliness of the instruction set also aids development of efficient fuzzy logic
programs.
This section explains the basic fuzzy logic algorithm for which the four fuzzy logic in-
structions are intended. Each of the fuzzy logic instructions are then explained in de-
tail. Finally, other custom fuzzy logic algorithms are discussed, with emphasis on use
of other CPU12 instructions.
The four fuzzy logic instructions are MEM, which evaluates trapezoidal membership
functions; REV and REVW, which perform unweighted or weighted MIN-MAX rule
evaluation; and WAV, which performs weighted average defuzzification on singleton
output membership functions.
Other instructions that are useful for custom fuzzy logic programs include MINA,
EMIND, MAXM, EMAXM, TBL, ETBL, and EMACS. For higher resolution fuzzy pro-
grams, the fast extended precision math instructions in the CPU12 are also beneficial.
Flexible indexed addressing modes help simplify access to fuzzy logic data structures
stored as lists or tabular data structures in memory.
The actual logic additions required to implement fuzzy logic support in the CPU12 are
quite small, so there is no appreciable increase in cost for the typical user. A fuzzy in-
ference kernel for the CPU12 requires one-fifth as much code space, and executes
fifteen times faster than a comparable kernel implemented on a typical midrange mi-
crocontroller. By incorporating fuzzy logic support into a high-volume, general-pur-
pose microcontroller product family, Motorola has made fuzzy logic available for a
huge base of applications.
9.2 Fuzzy Logic Basics
This is an overview of basic fuzzy logic concepts. It can serve as a general introduction
to the subject, but that is not the main purpose. There are a number of fuzzy logic pro-
gramming strategies. This discussion concentrates on the methods implemented in
the CPU12 fuzzy logic instructions. The primary goal is to provide a background for a
detailed explanation of the CPU12 fuzzy logic instructions.
CPU12
REFERENCE MANUAL
SECTION 9
FUZZY LOGIC SUPPORT
FUZZY LOGIC SUPPORT
MOTOROLA
9-1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents