over, there are a number of well-established tech-
niques to guide the choice of fuzzy rules by statisti-
cal considerations, such as in Kosko space clustering
method (Kosko, 1992), by abstracting them from a
neural network (Sekine et al., 1995), by clustering the
trajectories obtained from the cell mapping dynam-
ics (Leu and Kim, 1998) and finally by using genetic
algorithms (Della Penna et al., 2007a).
However, two considerations are to be made with
respect to this approach. First, the detection of the
fuzzy rules requires (at least) a tuning phase which
is not completely automatic but involves some human
intervention. Second, the fuzzy rules appear not to
be suitable when a very high degree of precision is
needed. This is the case, e.g., of the truck and trailer
parking problem when obstacles are to be avoided in
the parking lot (Della Penna et al., 2006). In this case,
when the truck is near to an obstacle, only a very pre-
cise manoeuvre can park it, without hitting the obsta-
cle. So, to achieve the required precision, an exceed-
ing number of fuzzy rules would be necessary.
Therefore, it seems reasonable to pursue another
possible approach, that is to directly compress the
control table. By this we mean data compression
in the usual sense of reduction of the number of bits
needed to represent the controller table in the com-
puter RAM memory (Cover and Thomas, 2006; Nel-
son and Gailly, 1995).
Observe, however, that in this case the compres-
sion algorithm should be constrained as follows:
1. the logical content of the table, that is the rela-
tion between the states and the correspondingcon-
trol actions, must be preserved without any loss of
information (i.e., we need some kind of lossless
compression algorithm);
2. the access time to the table must be comparable
with the one obtained with a direct representation
of the table in the computer memory (i.e., the de-
compression overhead must be minimal).
Consider as an example the straightforward idea
of directly compressing the table by mean of (some
variant of) the well known Lempel-Zivalgorithm (Ziv
and Lempel, 1977). Since this is a lossless compres-
sion, the first requirement above is fulfilled, but not
the second one, since the access time to the table
would be linear in the uncompressed size of the table
itself (Nelson and Gailly, 1995).
Since all the common compression algorithms
have similar problemswhen applied to controllers, we
decided to develop a new ad-hoc compression algo-
rithm based on the well known Ordered Binary Deci-
sion Diagrams (OBDDs) (Bryant, 1986).
Decision diagrams as well as decision trees are of
wide use in data manipulation as well as in data min-
ing (Hand et al., 2001). Indeed, our choice of OB-
DDs was motivated by their capability of compress-
ing large state spaces, that is at the hearth of symbolic
model checking and of its great achievements (Burch
et al., 1992; Clarke et al., 1999). Our hypothesis has
been that this capability is transferrable to the com-
pression of the controller table which is, in a sense,
an augmented state space representation.
Our experimental results show that this is indeed
the case. For very large tables we obtain a quite good
compression ratio (around 10:1). Moreover, not only
the access time is good, but it is often even better than
the one obtained by a direct representation of the ta-
ble in memory. This phenomenon is due to the fact
that, unless we accept a very sparse table, with huge
waste of space, we need to represent the controller
using some kind of open addressing table accessed
through a hash function, with a consequent worsen-
ing of the access time (Cormen et al., 2001).
A final but very important point to be stressed is
that the implemented compression algorithm, which
transforms the controller table in an OBDD, operates
in a completely automatic way. The only parameter
the user should set is the BDD variable reordering
method (see Section 4), which can effect the com-
pression ratio. After that, the compression operates in
a “zip”-like fashion. However, the best setting of the
above parameter can also be discovered by the algo-
rithm by trying all the possible reorderings, thus mak-
ing the compression process completely automatic.
Finally, a further automatic step can also be applied
to transform the OBDD into C-code that can be in-
corporated in any C-program.
The paper is organized as follows: in Section 2
we give a description of OBDDs and in Section 3
we show how we use them to encode numerical con-
trollers. In Section 4 we present our experimental re-
sults and Section 5 concludes the paper.
2 ORDERED BINARY DECISION
DIAGRAMS
A Binary Decision Diagram (BDD) is a data structure
used to represent a boolean function (Bryant, 1986).
Indeed, any boolean function f can be represented
as a binary tree having two kind of leaf values: F
(boolean false) or T (boolean true). Each node of
the tree (decision node) is labeled by a variable of the
formula f. The two edges outgoing a decision node
represent an assignment of the corresponding variable
to false or true, respectively. Therefore, a path from
the BDD root to one of its leaves represents a (pos-
sibly partial) variable assignment for f , and the cor-
ICINCO 2008 - International Conference on Informatics in Control, Automation and Robotics
44