1 Introduction

Wireless Sensor Networks (WSNs) 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, thereby dynamically sending the sensed data to the intended recipient about the monitored phenomenon (Akyildiz et al. 2002; Chen et al. 2013).

Wireless sensor and actor networks (WSANs), have emerged as a variation of WSNs. WSANs are capable of monitoring physical phenomenons, processing sensed data, making decisions based on the sensed data and completing appropriate tasks when needed. 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 (Akyildiz and Kasimoglu 2004). 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.

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 analyze the data, they communicate with each other in order to assign and complete tasks. To provide effective operation of WSAN, it 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 (Haider et al. 2013; Abbasi et al. (2009), reliable service (Li et al. 2011), quality of service (QoS) (Akkaya and Younis 2006; Kakarla and Majhi 2013) and so on.

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 this paper, we implement and compare two fuzzy-based systems (FBS1 and FBS2) for actor selection problem. These systems decide whether the actor will be selected for the required job or not, based on data supplied by sensors and actual actor condition.

The remainder of the paper is organized as follows. In Sect. 2, we describe the basics of WSANs including research challenges and architecture. In Sect. 3, we describe the proposed systems. Simulation results are shown in Sect. 4. Finally, conclusions and future work are given in Sect. 5.

2 WSAN

Table 1 Parameters and their term sets
Table 2 FRB of FBS1

2.1 WSAN challenges

Some of the key challenges in WSAN are related to the presence of actors and their functionalities.

  • Deployment and positioning At the moment of node deployment, algorithms must consider to optimize the number of sensors and actors and their initial positions based on applications (Akbas and Turgut 2011; Akbas et al. 2010).

  • Architecture 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 (Melodia et al. 2007).

  • Real-time There are a lot of applications that have strict real-time requirements. In order to fulfill them, real-time limitations must be clearly defined for each application and system (Gungor et al. 2008).

  • Coordination In order to provide effective sensing and acting, a distributed local coordination mechanism is necessary among sensors and actors (Melodia et al. 2007).

  • Power management WSAN protocols should be designed with minimized energy consumption for both sensors and actors (Selvaradjou et al. 2010).

  • Mobility Protocols developed for WSANs should support the mobility of nodes, (Abbasi et al. 2009; Nakayama et al. 2011), where dynamic topology changes, unstable routes and network isolations are present.

  • Scalability Smart Cities are emerging fast and WSAN as a key technology will continue to grow together with cities. In order to keep the functionality of WSAN applicable, scalability should be considered when designing WSAN protocols and algorithms (Akbas et al. 2010; Nakayama et al. 2011).

2.2 WSAN architectures

Fig. 1
figure 1

Wireless sensor actor network (WSAN)

A WSAN is shown in Fig. 1. The main functionality of WSANs is to make 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. Here, the former scheme is called semi-automated architecture and the latter one fully-automated architecture (see Fig. 2). Obviously, 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. On the other hand, it has advantages, such as low latency, low energy consumption, long network lifetime (Akyildiz and Kasimoglu 2004), higher local position accuracy, higher reliability and so on.

Fig. 2
figure 2

WSAN architectures

3 Proposed systems

3.1 Problem description

After data has been sensed from sensors, they are collected to the sink for semi-automated architecture or spread to the actors for fully-automated architecture. Then a task is assigned to actors. In general, one or more actors take responsibility and perform appropriate actions. Different actors may be chosen for acting, depending on their characteristics and conditions. For example, if an intervention is required in a building, a flying robot can go there faster and easier. While, if a kid is inside a room in fire, it is better to send a small robot. The issue here is which of the actors will be selected to respond to critical data collected from the field (actor selection).

If WSAN uses semi-automated architecture, the sinks are used to collect data and control the actors. They may be supplied with detailed information about actors characteristics (size, ability etc.). If fully-automated architecture is being used, the collected data are processed only by actors, so they first have to decide whether they have the proper ability and right conditions to perform. Soon after that, actors coordinate with each-other, to decide more complicated procedures like acting multiple actors, or choosing the most appropriate one from several candidates. In this work, we propose two fuzzy-based systems in order to select an actor node for a required task.

3.2 System parameters

Fig. 3
figure 3

Structure of implemented FBS1

Fig. 4
figure 4

Structure of implemented FBS2

Based on WSAN characteristics and challenges, we consider the following parameters for implementation of our proposed system.

Job type (JT) A sensed event may be triggered by various causes, such as when water level passed a certain height of the dam. Similarly, for solving a problem, actors need to perform actions of different types. Actions may be classified regarding time duration, complexity, working force required etc., and then assign a priority to them, which will guide actors to make their decisions. In our system TRA is defined by five levels of difficulty. The hardest the task, the more likely an actor is to be selected.

Fig. 5
figure 5

FLC structure

Distance of actor from job place (DAJP) The number of actors in a WSAN is smaller than the number of sensors. Thus, when an actor is called for action near an event, the distance from the actor to the event is different for different actors and events. Depending on three distance levels, our system takes decisions on the availability of the actor node.

Fig. 6
figure 6

Triangular and trapezoidal membership functions

Fig. 7
figure 7

Fuzzy membership functions

Fig. 8
figure 8

Results for different values of DAJP (FBS1)

Table 3 FRB of FBS2
Fig. 9
figure 9

Results for \(DAJP=0.1\) (FBS2)

Fig. 10
figure 10

Results for \(DAJP=0.5\) (FBS2)

Fig. 11
figure 11

Results for \(DAJP=0.9\) (FBS2)

Remaining energy of actor (REA) As actors are active in the monitored field, they perform tasks and exchange data in different ways from each other. Consequently, also based on their characteristics, some actors may have a lot of power remaining and other may have very little, when an event occurs. We consider three levels of RP for actor selection.

Actor node speed (ANS) It is obvious that in a heterogeneous WSAN, actors are of different types and may operate in different environments. So, in order to judge the mobility degree of an actor, the system uses the speed of an actor.

Actor selection decision (ASD) Our system is able to decide the willingness of an actor to be assigned a certain task at a certain time. The actors respond in five different levels, which can be interpreted as:

  • Strong not select: It is not worth assigning the task to this actor.

  • Not select: There might be other actors which can do the job better.

  • Select not select: The Actor is ready to be assigned a task, but is not the “chosen” one.

  • Select: The actor takes responsibility of completing the task.

  • Strong select: Actor has almost all required information and potential and takes full responsibility.

3.3 Systems implementation

Fuzzy sets and fuzzy logic (Zadeh 1994) 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. In this work, we use fuzzy logic to implement proposed systems.

The structure of the proposed Fuzzy-Based Systems (FBS1 and FBS2) are shown in Figs. 3, 4 respectively. It consists of one Fuzzy Logic Controller (FLC), which is the main part of our system and its basic elements are shown in Fig. 5. They are the fuzzifier, inference engine, Fuzzy Rule Base (FRB) and defuzzifier.

As shown in Fig. 6, we use triangular and trapezoidal membership functions for FLC, because they are suitable for real-time operation (Mendel 1995; Esposito et al. 2015). The \(x_{0}\) in \(f(x)\) is the center of triangular function, \(x_{0}(x_{1})\) in \(g(x)\) is the left (right) edge of trapezoidal function, and \(a_{0}(a_{1})\) is the left (right) width of the triangular or trapezoidal function. We explain in details the design of FLC in following.

3.4 Description of FBS1

We use three input parameters for FLC of FBS1:

  • Job type (JT);

  • Remaining energy of actor (REA);

  • Distance of actor from job place (DAJP);

The term sets for each input linguistic parameter are defined respectively as shown in Table 1. The output linguistic parameter is the actor selection decision (ASD).

The membership functions are shown in Fig. 7 and the FRB of FBS1 is shown in Table 2. The FRB forms a fuzzy set of dimensions \(|\mu (JT)|\times |\mu (REA)|\times |\mu (DAJP)|\), where \(|\mu (x)|\) is the number of terms on \(\mu (x)\). The FRB of FBS1 has 45 rules. The control rules have the form: IF “conditions” THEN “control action”.

3.5 Description of FBS2

We consider four input parameters for FLC of FBS2:

  • JT;

  • REA;

  • DAJP;

  • Actor node speed (ANS).

We added ANS input parameter to FBS1 in order to consider the mobility of actor node. The term sets for each input linguistic parameter are defined respectively as shown in Table 1. The output linguistic parameter is the ASD. The membership functions are shown in Fig. 7 and the FRB of FBS2 is shown in Table 3.

4 Simulation results

We present the simulation results of FBS1 in Fig. 8. In Fig. 8a, we display how the output parameter ASD is affected by JT value, for different values of REA and DAJP = 0.1. Then, we increase the value of DAJP and repeat the simulations.

From simulation results of FBS1, we can observe that when the difficulty level of the job (JT) increases, ASD also increases. For different values of REA, the value of ASD differs in a way that actors with low battery are not involved in many task assignment. Thus, for lower values of REA, ASD decreases. In this way the network lifetime is increased. From Fig. 8a–e, the DAJP increases and ASD decreases. In this case, our system instructs actors that are near the event to be more active in task assignment, while for actors that are further away and need more time and energy to reach the event place not to be active. By doing this the response to emergency situations is improved and the energy management is better.

We present the simulation results of FBS2 in Figs. 9, 10, 11.

From simulation results of FBS2, as in general, we notice that as JT becomes difficult the ASD becomes higher because actors are programmed for different jobs, the same as FBS1. The DAJP defines the distance of the actor from the job place, so when DAJP is small, the ASD is higher. The actors closest to the job place use less energy to reach the job position. We also notice that for each value of DAJP, when the ANS increases the network topology is more dynamic. In this condition, the actor may loose connectivity and changes its condition (such as distance from job place) in a while, so it will be not reachable any more. However, when the actor is moving with higher speed, the response can be faster for emergency situations.

Comparing complexity of FBS1 and FBS2, the FBS2 is more complex than FBS1. However, it also considers mobility of actor nodes. Thus, the FBS2 is more flexible system than FBS1.

5 Conclusions and future work

The main challenges for WSANs have to do with node coordination, energy management and mobility. A WSAN can be implemented as semi-automated architecture (which is similar to WSN) and fully-automated architecture (which is the real challenge of embedded WSANs).

In this paper, we implemented and compared two fuzzy-based simulation systems for WSANs. The FBS1 has three input parameters and the FBS2 has four input parameters. The systems select the actor node in order to have short delays, low energy consumption and proper task assignment.

From simulation results, we found that the response of implemented system to emergency situations is improved and the energy management is better. Comparing complexity of FBS1 and FBS2, the FBS2 is more complex than FBS1. However, it considers also mobility of actor nodes. Thus, the FBS2 is more flexible system than FBS1.

In the future work, we will consider also other parameters for actor selection and make extensive simulations to evaluate the proposed system.