Abstract
Wireless Sensor and Actor Network (WSAN) is formed by the collaboration of micro-sensor and actor nodes. Whenever there is any special event i.e., fire, earthquake, flood or enemy attack in the network, sensor nodes have responsibility to sense it and send information towards an actor node. The actor node is responsible to take prompt decision and react accordingly. In this work, we consider the actor node selection problem and implement two intelligent fuzzy-based systems (IFBSs). We call these systems IFBS1 and IFBS2. For IFBS1, we consider three input parameters: Job Type (JT), Distance to Event (DE) and Remaining Energy (RE). In IFBS2, we add CS parameter, so IFBS2 has four input parameters. The IFBS2 is more complex than IFBS1, but can make a better selection of actor nodes than IFBS1 by considering also the actor congestion situation.
Introduction
Recent technological advances have led to the emergence of distributed Wireless Sensor and Actor Networks (WSANs) wich are capable of observing the physical world, processing the data, making decisions based on the observations and performing appropriate actions [5].
The WSANs have emerged as a variation of Wireless Sensor Networks (WSNs). They can be defined as a collection of wireless self-configuring programmable multi-hop tiny devices, which can bind to each other in an arbitrary manner, without the aid of any centralized administration. WSAN devices deployed in the environment are sensors able to sense environmental data, actors able to react by affecting the environment or have both functions integrated. Actor nodes are equipped with two radio transmitters, a low data rate transmitter to communicate with the sensor and a high data rate interface for actor-actor communication. For example, in the case of a fire, sensors relay the exact origin and intensity of the fire to actors so that they can extinguish it before spreading in the whole building or in a more complex scenario, to save people who may be trapped by fire [4,9].
Unlike WSNs, where the sensor nodes tend to communicate all the sensed data to the sink by sensor-sensor communication, in WSANs, two new communication types may take place. They are called sensor-actor and actor-actor communications. Sensed data is sent to the actors in the network through sensor-actor communication. After the actors analyse the data, they communicate with each other in order to assign and complete tasks. To provide effective operation of WSAN, is very important that sensors and actors coordinate in what are called sensor-actor and actor-actor coordination. Coordination is not only important during task conduction, but also during network’s self-improvement operations, i.e., connectivity restoration [1,8,12,13,31], reliable service [21], Quality of Service (QoS) [3,7,17,28] and so on.
Sensor–Actor (SA) coordination defines the way sensors communicate with actors, which actor is accessed by each sensor and which route should data packets follow to reach it. Among other challenges, when designing SA coordination, care must be taken in considering energy minimization because sensors, which have limited energy supplies, are the most active nodes in this process. On the other hand, Actor–Actor (AA) coordination helps actors to choose which actor will lead performing the task (actor selection), how many actors should perform and how they will perform. Actor selection is not a trivial task, because it needs to be solved in real time, considering different factors. It becomes more complicated when the actors are moving, due to dynamic topology of the network.
In general the Actor node selection procedure for the job execution is done based on parameters such as job type, distance to event, remaining energy, congestion situation, coordination quality or QoS. These parameters decide which node has the capability to carry out the task. Though the actor nodes may have high resource availability, it may delay the execution of the job due to network performance degradation. To deal with this issue, the network parameters are also to be considered along with the resource parameters during the actor node selection.
In this paper, we implement two intelligent fuzzy-based systems (IFBSs). We call these systems IFBS1 and IFBS2. For IFBS1, we consider three input parameters: Job Type (JT), Distance to Event (DE) and Remaining Energy (RE). In IFBS2, we add CS parameter, so IFBS2 has four input parameters. The IFBS2 is more complex than IFBS1, but can make a better selection of actor node than IFBS1 by considering also the actor congestion situation.
The remainder of the paper is organized as follows. In Section 2, we present WSANs architectures. In Section 3, we describe the system model and its implementation. Simulation results are shown in Section 4. Finally, conclusions and future work are given in Section 5.

Wireless Sensor Actor Network (WSAN).
The WSAN architectures are shown in Fig. 1. In a WSAN actors perform appropriate actions in the environment, based on the data sensed from sensors and actors. When important data has to be transmitted (an event occurred), sensors may transmit their data back to the sink, which will control the actors’ tasks from distance, or transmit their data to actors, which can perform actions independently from the sink node.
There are two architectures for WSANs: Semi-Automated Architecture and Fully-Automated Architecture (see Fig. 2). Both architectures can be used in different applications. In the Fully-Automated Architecture are needed new sophisticated algorithms in order to provide appropriate coordination between nodes of WSAN. But it has advantages such as low latency, low energy consumption, long network lifetime [4,6,19,33], higher local position accuracy, higher reliability and so on.

WSAN architectures.
Systems parameters
In this work, we consider the following parameters for implementation of our proposed system.
Very Low Selection Possibility (VLSP) – It is not worth assigning the task to this actor. Low Selection Possibility (LSP) – There might be other actors which can do the job better. Middle Selection Possibility (MSP) – The Actor is ready to be assigned a task, but is not the “chosen” one. High Selection Possibility (HSP) – The actor takes responsibility of completing the task. Very High Selection Possibility (VHSP) – Actor has almost all required information and potential and takes full responsibility.
Implementation description
Fuzzy sets and fuzzy logic have been developed to manage vagueness and uncertainty in a reasoning process of an intelligent system such as a knowledge based system, an expert system or a logic control system [2,10,11,14–16,18,20,22–26,29,30,32]. In this work, we use fuzzy logic to implement the proposed system.
The structure of the proposed system is shown in Fig. 3. It consists of one Fuzzy Logic Controller (FLC), which is the main part of our system and its basic elements are shown in Fig. 4. They are the fuzzifier, inference engine, Fuzzy Rule Base (FRB) and defuzzifier.

Proposed system model.

FLC structure.

Triangular and trapezoidal membership functions.
As shown in Fig. 5, we use triangular and trapezoidal membership functions for FLC, because they are suitable for real-time operation [27]. The
We use three input parameters for IFBS1:
Job Type (JT);
Distance to Event (DE);
Remaining Energy (RE).
For IFBS2, we add the actor Congestion Situation (CS) parameter, so IFBS2 has four input parameters.
Parameters and their term sets for FLC
The term sets for each input linguistic parameter are defined in Table 1 and are described as follows.
The small letters
The output linguistic parameter is the Actor Selection Decision (ASD). We define the term set of ASD as:
The membership functions are shown in Fig. 6 and the Fuzzy Rule Base (FRB) is shown in Table 2. The FRB forms a fuzzy set of dimensions
FRB of proposed fuzzy-based system

Fuzzy membership functions.
In this section, we present the simulation results. The simulations are carried out in a Linux Ubuntu OS computer with these specifications: RAM (8 GB), CPU i5 (3.2 GHz × 4) and SSD (650 GB). For simulation, we used our implemented FuzzyC system [14,15]. The FuzzyC is a simulation system written in C language and equipped with Fuzzy library.
We present the simulation results of IFBS1 in Fig. 7, we show the relation between JT and ASD when DE is a constant parameter. We can see from the results that with the increase of DE and the decrase of RE, the ASD decreases. But, when the RE and JT increases, the ASD also increases.
In Fig. 8, Fig. 9 and Fig. 10 are shown the simulation results for IFBS2. From results, we see that when JT becomes difficult the ASD becomes higher, because actors are programmed for different jobs. The performance decreases slowly at the beginning, because of small JT, DE and CS values but after that is decreased sharply.
In Fig. 9, we can see that the performance is lower than in Fig. 8 beacuse the DE is increased. Furthermore in Fig. 10, the performance is the lowest because DE and CS are increased much more.
The DE defines the distance of the actor from the job place, so when DE is small, the ASD is higher. The actors closest to the job place use less energy to reach the job position. When RE is increased, the ASD is increased. However, when CS is increased the ASD is decrased and the actor node is not selected for the required job.

Simulation results of IFBS1 for different

Simulation results of IFBS2 for

Simulation results of IFBS2 for

Simulation results of IFBS2 for
In this paper, we proposed and implemented two intelligent fuzzy-based simulation systems for WSANs. From simulation results we conclude the following:
When JT and RE parameters are increased, the ASD parameter is increased, so the probability that the system selects an actor node for the job is high.
When DE and CS parameters are increased, the ASD parameter is decreased, so the probability that an actor node is selected for the required task is low.
Comparing IFBS1 and IFBS2, we can observe that the IFBS2 is much better, because we can distinguish which actor is available or not for doing a required task, based on the data that is gathered.
In the future work, we will consider also other parameters for actor selection and make extensive simulations to evaluate the proposed system.
