functions overlapped by pairs. As a result, it is only
required 2
n
(2n+ 1) + n products and 2
n
+ 2n sums to
perform an inference. As we can see, this cost is dras-
tically less than the initial one and it does not depend
on the number of membership functions m. More-
over, as n and m increase, the difference between the
two costs becomes huge.
3 HARDWARE/SOFTWARE
ARCHITECTURE
Neural Networks contain two types of algorithms: On
the one hand there are training algorithms (e.g. BP,
LSE) that exhibit high irregularity, require high preci-
sion arithmetics and demand high computational cost.
On the other hand, we have the computation of the
network itself, which provides the network output for
a given input (i.e., the inference of the rules in the
ANFIS). This process implies regular and repetitive
calculations which are suitable to be performedin par-
allel.
Taking into account these two different algorithms
we propose an heterogeneous HW/SW architecture
to implement the PWM-ANFIS (see Figure 2). HW
implementations can exploit the parallel nature of
the algorithms, therefore the computation of the net-
work output will be implemented in the HW parti-
tion. Moreover, as it is shown in Figure 2, many
PWM-ANFIS subsystems may be implemented all at
once because many parameters must be simultane-
ously controlled in an Intelligent Environment. On
the other hand, the training algorithms are imple-
mented clearly better in software and hence they will
be addressed in the microprocessor-based system. In
fact, an analysis in detail of the hybrid training al-
gorithm (LSE+BP) shows that a hardware implemen-
tation would be highly complex. The control of the
global process and the input-output data handling is
also carried out by this software partition. Although
all the process can be developpedin software, the ben-
efits of the hardware parallelism are huge. For exam-
ple, if we observe the complexity expresions in the
previous section, we have that it is required 56 prod-
ucts and 14 sums to perform an inference in a 3-input
system. The hardware partition can perform all these
operations in parallel consuming many few clock cy-
cles whereas a microprocessor would spent at least 70
(56+14) cycles. Moreover, if several systems are im-
plemented simultaneously the difference is outstand-
ing. In next sections, we will show the implementa-
tion of 4 systems in the same FPGA.
In particular we will develop our implementation
over an FPGA device that integrates together with the
I/O DATA
uProcessor system
FPGA
Training
algorithms
Softcore
PLB (Peripheral Local Bus)
2 inputs
2 inputs
3 inputs
3 inputs
4 inputs
4 inputs
PWM-ANFIS HW blocks
y
1
y
2
y
i
y
i+1
y
n-1
y
n
Figure 2: Architecture of the proposed system.
reconfigurable hardware one (or more) micropocessor
core. Hence, the Software partition will be addressed
in this core while the HW partition will use the rest of
the FPGA. Therefore, all the system is integrated on
a single device with the corresponding advantages in
size, power, and cost.
4 DEVELOPED SYSTEM
An Intelligent Environment can be understood as a
collection of distributed devices (i.e., sensors and ac-
tuators) linked with one or more electronic control
units (ECUs) (Schoitsch and Skavhaugh, 2006) (i.e.,
microprocessors, microcontrollers, FPGAs, ...) en-
dowed with robust algorithms which implies ”smart”
or ”intelligence” capabilities. In this work, we have
carried out the design, implementation and verifica-
tion of an embedded electronic system for one of this
ECUs, following the architecture described in the pre-
vious section. We assume that some ambiental pa-
rameters values are provided by external sensors and
that we can modify some others via actuators. In par-
ticular, we deal with 6 input parameters of a room
or salle: External Temperature, Internal occupancy
(i.e., persons inside the room), Internal Noise, Exter-
nal Light level, External Humidity and External Pol-
lution. The output variables of the system are: In-
ternal Temperature, Internal Light Level, Volume of
the Sound (if music is being heard) and Intensity of
an Air-Freshener or a Fragance. The control of these
four variables are achieved by 4 PWM-ANFIS sub-
systems whose dependence on the input variables is
showed in Table 1. Thus, we have two 2-input sub-
systems and two 3-input sub-systems. The choice of
these variables, their dependences and the behaviour
of the environment have been provided by an expert
from an architecture and environment-design com-
A NEURO-FUZZY EMBEDDED SYSTEM FOR INTELLIGENT ENVIRONMENTS
561