Integration of a Wireless Sensor-actuator Network and an FPGA
for Intelligent Inhabited Environments
Javier Echanobe, Estibaliz Asua and Inés del Campo
1
Department of Electricity and Electronics, University of the Basque Country, 48940, Leioa, Spain
Keywords: Wireless Sensor Network, FPGA, Intelligent Environments, Neurofuzzy Systems.
Abstract: Wireless Sensor and Actuator Networks together with processing elements named intelligent agents are
achieving great importance in environmental control. The trend in this field points to implement small, low
power, low cost and fast systems, which is in general, hard to achieve. In this paper, an electronic system
that consists of several sensors and actuators and a FPGA endowed with Neurofuzzy based intelligent
algorithms is presented. The purpose of this work is to demonstrate the effectiveness of the FPGA to
provide intelligence to a Wireless Sensor and Actuator Networks. As example of application, a system
which acts over a floor lamp intensity and an opening of a window in an autonomous way is presented. This
autonomous action is calculated by the FPGA based on several parameters provided by the network
(temperature, humidity and luminosity). By integrating the low power WSAN and the FPGA-based
Intelligent Agent, a small, low power, low cost high-performance intelligent environment system is
achieved.
1 INTRODUCCTION
In the last decade, the research area known as
Wireless Sensor and Actuator Networks (WSAN) has
rapidly grown mainly due to several technological
advances such as the hardware miniaturization, the
maturity of the wireless technologies and protocols,
and also the sensor integration. The area is at present
quite mature for small networks and hence, the
number of application fields where WSAN can be
found is very large (Dargie, 2010): Environmental
Control (Ambient Intelligence, Home Automation,
Intelligent Environments) (Cook, 2009), Body Area
Networks (health care, telemedicine, elder care,
remote patient monitoring) (Acampora, 2014),
Machine-to-Machine Communications, Internet of
Things (IoT), surveillance, manufacturing, etc.
Together with the sensor network, a processing
counterpart to handle the amount of information
gathered by the sensors is often required. In many of
cases, these processing elements must provide, in
autonomous scenarios, a response which is sent back
to the actuators in the network. In addition, many
applications demand those elements to be small, low
power, low cost but fast enough to provide real-time
response, which is in general hard to achieve: i.e.,
intelligence demands high computational power and
therefore large size elements with high power
consumption.
In order to face those requirements, in Inhabited
Intelligent Environments (also called Ambient
Intelligence Environments), where a number of
sensors and intelligent elements have to be deployed
throughout the environment without the user being
aware of its presence, Intelligent Agents are
proposed (Jang, 1997). Intelligent Agents are
autonomous units of intelligence whose actions are
driven by a goal; they are able to take decisions
based on their internal state and information
collected from the environment. In this sense, soft
computing approaches (Doctor, 2005), mainly fuzzy
systems and neural networks are commonly used.
In this paper we propose an electronic system to
control ambient parameters in an intelligent
inhabited environment. The system is based on a
WSAN, which receives/sends data from/to the
environment and on a FPGA which addresses the
Intelligent Agent. The Intelligent Agent
implemented on the FPGA is, in turn, based on
several Neurofuzzy systems whose ability to learn
and model the dynamics of smart environments has
been demonstrated by the authors in recent works
(Del Campo, 2012).
331
Echanobe J., Asua E. and del Campo I..
Integration of a Wireless Sensor-actuator Network and an FPGA for Intelligent Inhabited Environments.
DOI: 10.5220/0004680703310336
In Proceedings of the 3rd International Conference on Sensor Networks (SENSORNETS-2014), pages 331-336
ISBN: 978-989-758-001-7
Copyright
c
2014 SCITEPRESS (Science and Technology Publications, Lda.)
As will be explained throughout this article, the
proposed system meets the requirements above
mentioned related to the trade-off between high
performance on the one hand and low power, low
cost and small size on the other. In addition, it has
some other important advantages like flexibility and
scalability.
To well illustrate the proposed system, a
particular implementation has been carried out. This
implementation addresses the control of the intensity
of a floor lamp and the opening of a window in an
intelligent environment, taking into account the
values of temperature, humidity and luminosity
inside the room and also the value of outside
temperature.
The rest of the article is organised as follows:
Section 2 describes the Neurofuzzy algorithms that
are used in the system as Intelligent Agents. Section
3 presents the global architecture of the proposed
system. In Section 4 an implementation example is
presented. We explain all the particular details
related to the hardware and software subsystems.
Finally, Section 5 presents the main conclusions of
the work.
2 NEURO-FUZZY SYSTEMS FOR
MODELLING INHABITED
ENVIRONMENTS
NeuroFuzzy Systems (NFS) are intelligent
algorithms that combine the learning capabilities of
Neural Networks and the interpretability of the
knowledge of Fuzzy Systems. NFS have been used
in different fields because of their modelling abilities
when dealing with real-live scenarios. In particular,
the authors have proved (Del Campo, 2012) how
NFS can act as suitable Intelligent Agents to control
ambient parameters in inhabited environments. In
particular, the authors proposed a PWM-ANFIS
system which is a low computational-cost version of
the well known ANFIS system (Jang, 1993).
Basically, ANFIS is a Fuzzy Inference System
that can be represented as a Neural Network and
hence, it can be endowed with typical Neural
Networks training algorithms. By applying some
particular restrictions on the membership functions,
a computationally-efficient algorithm is obtained
with little loss of modelling performance as was
shown by the authors in works (Echanobe, 2008).
These restrictions are: i) the membership functions
are overlapped by pairs, ii) they are triangular
shaped, and iii) they are normalized in each input
dimension. As a result of this, the output of the
system has piece-wise multilinear (PWM) behaviour
and hence the authors have referred to it as PWM-
ANFIS.
The PWM-ANFIS system is able to learn from a
set of sample data, and, once it has learned, given
other real data, it will respond according to the
learning. In order to provide real-time response of
PWM-ANFIS algorithms, the authors proposed in
previous works an FPGA-based efficient hardware
architecture (Echanobe, 2008). This implementation
was carried out taking into account the great amount
of parallel resources available in FPGAs. This
PWM-ANFIS efficient hardware architecture is used
in this work.
3 SYSTEM ARCHITECTURE
The proposed complete system is based on the
architecture depicted in figure 1. It comprises two
main parts: The Wireless Network and the FPGA-
based Intelligent Agent. Using the sensors included
in the Wireless Network, several environmental data
are measured. Those measurements are sent by the
WiFi module to the FPGA, where the signals to
drive the actuators (also presented in the Wireless
Network) are calculated. This calculus is performed
by a PWM-ANFIS algorithm, which has been
previously trained to simulate a user behaviour
facing those conditions. So, the complete system
will act as the user would do it.
Figure 1: Architecture of the proposed system.
In the following paragraphs we analyze the
architecture in detail.
SENSORNETS2014-InternationalConferenceonSensorNetworks
332
3.1 WaspMote: A Sensor and Actuator
Wireless Network
The wireless network is based on the Waspmote
Platform (Libelium Comunicaciones Distribuídas,
2013). This is a modular and flexible hardware
platform to easily implement and deploy a WSAN.
The main element of this platform is the Waspmote
board which is based on the ATmega 1281
microcontroller. The board contains several
connectors or expansion ports that permits to attach
(in an stacked way) a sensor board which integrates
sensors or actuators and a WiFi communication
module (called XBee) to handle the wireless
communication. Figure 2 shows these three elements
assembled. We will refer to this 3-part body as
Waspmote-Sensor module. Up to eight different
wireless protocols are supported by the WiFi
module: 802.15.4, 802.15.4-Pro, ZigBee, ZigBee-
Pro, 868 SMA, 900 SMA, XSC SMA and Bluetooth.
The signal range is up to 12 Km. depending on the
protocols and the antennas used. For an inhabited
environment (as it is our case) it is enough a 50-
meter range and accordingly the 802.15.4 protocol is
used, which is the one that less power requires.
Figure 2: Waspmote-Sensor module. Three components
are stacked: Waspmote board, XBee wireless module and
sensor board. The blue element is a battery.
Waspmote hardware architecture has been
specially designed to achieve extremely low
consumption. Digital switches allow to turn on and
off any of the sensor interfaces as well as the radio
modules whenever they are not used. Also sleeping
modes are available. For autonomous operation the
board can be powered by rechargeable batteries (like
in picture 2) or by solar panels, both provided by the
company.
The sensor boards to be attached are designed
depending on the area of operation: Agriculture
board, general Events, Gases, Smart Metering, etc.,
and each board supports various sensors, such as
temperature, luminosity, weight, bending, movement
by infrareds, position based on hall effect, water
presence, etc. The ATmega microcontroller governs
the operation of the board -in an autonomous way-
by executing a program which is developed by the
user.
3.2 FPGA System
The second part of the proposed system addresses
the Intelligent Agent. It is based on i) a FPGA in
which the Neurofuzzy algorithms are implemented,
ii) a JTAG port to program and debug the FPGA,
and iii) a Serial Port (RS232) to communicate with
the Wireless Network. Let us see in detail these
three parts.
The FPGA (figure 3) is configured with a
HW/SW architecture. It consists of a microprocessor
(hardcore or soft-core), a RAM block to store the
program to be executed by the microprocessor, one
or several PWM-ANFIS hardware blocks and a
RS232 peripheral controller. The number of FPGA
resources required by this HW design depends
basically on the amount of Neurofuzzy blocks to be
implemented. For a small number (about 2 or 3) a
low cost FPGA is enough.
The global operation of the FPGA system is as
follows: the microprocessor reads periodically the
RS232 port to collect data from the sensor network.
These data are sent to the Neurofuzzy hardware
blocks which calculate the various outputs. These
outputs are then sent back to the microprocessor
which in turn sends them to the actuators via RS232.
4 IMPLEMENTATION AND
DISCUSSION
In order to test and verify the complete system we
have implemented an Ambient Intelligent example.
It consists of a system that controls the intensity of a
floor lamp and the opening of a window in an
inhabited environment, (particularly a room). The
system takes as inputs the internal temperature,
luminosity and humidity of the room and external
IntegrationofaWirelessSensor-actuatorNetworkandanFPGAforIntelligentInhabitedEnvironments
333
Figure 3: Scheme of the HW implemented on the FPGA.
temperature (all provided by the WSAN), and
calculates -via the intelligent agent- the intensity
level of the floor lamp and the position of the
window: i.e. three positions: closed, semi-opened
and full opened. For this purpouse, 2 Waspmote-
Sensor modules are respectively placed inside and
outside the room. Another Waspmote board to
address the actuators (the floor lamp and the
window) is also used.
4.1 Sensors and Actuators
One of the Waspmote-Sensor modules contains the
sensors of temperature (MPC9700A termistor),
humidity (808H5V5 capacitive-based sensor) and
the luminosity (PDV-P9203 LDR). This module is
placed inside the room. The other one, placed
outside, contains an external temperature sensor
(MPC9700A termistor).
The actuators are driving by another Waspmote
board. In this case, no sensor board is attached;
instead, we use the set of digital outputs that
contains the board. Some of these digital outputs are
connected to a D/A converter to provide an analog
signal to the floor lamp regulator. In particular, the
converter used is the DAC8228 from Analog
Devices. Two other digital outputs are used to
control the three window states: closed, semi-opened
and full opened.
4.2 PWM-ANFIS Modelling
The system contains two PWM-ANFIS cores, one
for the light-level response and another one for the
window opening. The first one depends on the four
input variables above mentioned, while in the
second one the luminosity is not taken into account.
The intelligent agent is built up from linguistic
information provided by a user, in the form of fuzzy
IF-THEN rules. Hence, the user can express its
habits and preferences in a very flexible (i.e. without
restrictions) and natural way. Some of the rules
formulated are for example the following:
IF tmp_int IS high AND tmp_ext IS normal
AND humidity IS high THEN window is full-opened
IF tmp_int IS very high AND tmp_ext IS very
high AND luminosity IS high THEN light-level is
very low.
As a example, Figure 4 shows the surface generated
by the fuzzy rules for the window positioning output
with respect to the internal and external temperature.
Figure 4: Window position output provided by the user-
defined rule system.
However, a fuzzy rule inference system without
restrictions implies a very complex hardware
implementations which require large FPGA devices
and make more difficult to provide real-time
responses. To overcome this drawback we have used
the PWM-ANFIS system previously explained. This
system is trained from a set of samples provided by
the above fuzzy rules system. Figure 5 shows, as
example, the training error curve obtained during the
learning process. In particular, the mean squared
error (MSE) obtained between the system output and
the desired output vs. the number of iterations of the
algorithm is shown. As we can see, the values of the
obtained errors are very small. So the PWM-ANFIS
modellization is apropriate for this Ambient
Intelligent Scenario.
SENSORNETS2014-InternationalConferenceonSensorNetworks
334
Figure 5: MSE training curve for the Floor Lamp model.
4.3 FPGA
The FPGA used is the Virtex 5 -xc5vsx50t- from
Xilinx (Virtex 5, 2009). It features more than 8000
logic blocks, 4-Mbits RAM blocks and 288
Multipliers among other resources. Despite of its
many resources, it is a medium size and medium
cost device.
Inside this FPGA we have implemented the
HW/SW architecture described in section 2: a
Microblaze (soft-core from Xilinx), a RS232
controller to which a XBee is attached, a 64 Kbytes
RAM module and the two PWM-ANFIS cores. To
develop the system we have used the design tool
ISE-Suite from Xilinx. After implementation the
tool reports the following resource utilization: 40%
of the multipliers, 12% of the RAM memory, 9% of
logic elements and 7% of registers (i.e. Flip-Flops).
As we can see, less than the half of the FPGA is
used and therefore, more PWM-ANFIS could be
implemented if we want to control more
environmental parameters or devices. The frequency
operation of this hardware implementation is 100
MHz.
The software counterpart is the program stored in
the RAM module and executed by the Microblaze.
This program occupies only a few Kbytes because
the main operation of the Intelligent Agent is carried
out by the PWM-ANFIS hardware modules. It only
has to coordinate the data transfer between serial
port and the hardware modules according to the
wireless network protocol specifications. Also, it
performs some changes in the data format to adapt
these to the PWM-ANFIS algorithm.
5 CONCLUSIONS
In this paper, an embedded system for Intelligent
Inhabited Environments, based on a WSAN and on
an FPGA is presented. The WSAN has been carried
out by means of the Waspmote platform, which is a
modular, scalable and low power hardware platform
that allows deploying easily a wireless sensor
network.
In the system presented here, the WSAN takes
measures from environmental parameters like
temperature, humidity or luminosity and sends them
to the FPGA, which is integrated in the wireless
network thanks to a wireless communication module
attached to it. The FPGA addresses an Intelligent
Agent that processes the data of the sensors and
provides a real-time response that acts over the
environment via different actuators as an user would
do it. The intelligent agent is based on ANFIS-type
neurofuzzy systems for which a very efficient
hardware implementation has been designed.
As an example of the proposal, a system that
controls the intensity of a floor lamp and the opening
of a window in an inhabited environment has been
implemented. Aspects of this implementation are
described in detail: hardware elements, sensors used,
FPGA used, resources needed, execution time. This
example shows the feasibility and the simplicity of
the proposal and demonstrates that by integrating the
low power WSAN and the FPGA-based Intelligent
Agent, a small, low power, low cost high-
performance intelligent environment system is
achieved.
ACKNOWLEDGEMENTS
This work was supported in part by the Spanish
Ministry of Science and Innovation and European
FEDER funds under Grant TEC2010-15388 and by
the Basque Country Government under Grants
IT733-13, S-PC11UN012, and S-PC12UN016.
REFERENCES
Dargie, D., Poellabauer, C. 2010. Fundamentals of
Wireless Sensor Networks, Wiley & Sons. 1st. edition.
Cook, D. J., Augusto J. C., Jakkula V. R. 2009, Ambient
intelligence: Technologies, applications, and
opportunities. Pervasive and Mobile Computing, vol.
5, pp. 277-298.
IntegrationofaWirelessSensor-actuatorNetworkandanFPGAforIntelligentInhabitedEnvironments
335
Acampora, G., Cook, D. J., Rashidi, P. Vasilakos, A. V.
2014, A Survey on Ambient Intelligence in Health
Care, Proceedings of the IEEE, (accepted April 2013).
Jang, J. R. & Sun, T. C. 1997, Neuro-Fuzzy and Soft
Computing', Upper Saddle River, Prentice Hall, NJ.
Doctor, F., Hagras, H., Callahan V., 2005. A Fuzzy
Embedded Agent- Based Approach for Realizing
Ambient Intelligence in Intelligent Inhabited
Environments', IEEE Transactions on System, Man,
and Cybernetics-Part A, vol. 35, no. 1, pp. 55-65.
Echanobe, J., del Campo I., Bosque, G. and Tarela, J.M.,
2008. An Adaptive Neuro-Fuzzy System for efficient
implementations, Information Sciences, vol. 178, pp.
2150-2162.
Libelium Comunicaciones Distribuídas. Available from
<http://www.libelium.com>. [19 July 2013]
Del Campo, I., basterretxea, K., Echanobe, J., Bosque, G.,
Doctor F. 2012, 'A System-on-Chip Development of a
Neuro-Fuzzy Embedded Agent for Ambient-
Intelligence Environments', IEEE Transactions on
Systems Man and Cybernetics B, vol. 42, no. 2, pp.
501-512.
Jang, J. R. 1993, 'ANFIS: Adaptive-network-based fuzzy
inference system', IEEE Transactions on Systems Man
and Cybernetics, vol. 23, no. 3, pp. 665-685.
Virtex 5 Family overview, Xilinx Inc., San Jose, CA,
2009.Available from: <http://www.xilinx.com/
support/documentation/data_sheets/ds100.pdf>. [19
july 2013].
SENSORNETS2014-InternationalConferenceonSensorNetworks
336