Wireless sensor networks (WSNs) are key components in the emergent cyber physical systems (CPSs). They may include hundreds of spatially distributed sensors which interact to solve complex tasks going beyond their individual capabilities. Due to the limited capabilities of sensors, sensor actions cannot meet CPS requirements while controlling and coordinating the operations of physical and engineered systems. To overcome these constraints, we explore the ecosystem metaphor for WSNs with the aim of taking advantage of the efficient adaptation behavior and communication mechanisms of living organisms. By mapping these organisms onto sensors and ecosystems onto WSNs, we highlight shortcomings that prevent WSNs from delivering the capabilities of ecosystems at several levels, including structure, topology, goals, communications, and functions. We then propose an agent-based architecture that migrates complex processing tasks outside the physical sensor network while incorporating missing characteristics of autonomy, intelligence, and context awareness to the WSN. Unlike existing works, we use software agents to map WSNs to natural ecosystems and enhance WSN capabilities to take advantage of bioinspired algorithms. We extend our architecture and propose a new intelligent CPS framework where several control levels are embedded in the physical system, thereby allowing agents to support WSNs technologies in enabling CPSs.

1. Introduction

Recent technological advances have been shifting computation to a wide variety of devices, including toys, home appliances, and phones. In addition to increasing their computing capabilities, advances are also enabling these devices to interact with each other in order to achieve individual or common goals which they are not able to achieve individually. These capabilities are bringing new research and development opportunities to a wide range of application domains, such as smart grid, healthcare, and intelligent road safety [1]. They are also bringing about new challenges with respect to the control of the physical environment of which computing capabilities have become an integral part. The concept of Cyber Physical System (CPS) has emerged as a promising tool where the operations of the physical and engineered systems are monitored, controlled, coordinated, and integrated by means of a computing and communication core [2]. In such system, sensors, actuators, and embedded devices are networked to sense, monitor, and control the physical world. The increasing pervasiveness of wireless sensor networks (WSNs) in many applications makes these technologies an important component of CPS designs [3]. WSNs are particularly deployed as interfaces through which in situ data are collected about/from the physical environment and then transferred to the cyber environment as well as interfaces through which new instructions/parameters are injected from the cyber environment to the physical environment.

Enabling Cyber Physical Systems with WSN technologies is not straightforward. Several challenges must be addressed, including the integration of appliances with different communication protocols, the mobility of sensor nodes, and the delivery of sensor data to the cyber system on time [3]. The solutions for such challenges will particularly depend on how researchers will deal with WSN recent emerging requirements, such as the ability to integrate spatial concepts, promote adaptability, support diversity and evolution, and allow low-cost, long-term evolutions when designing these systems [4]. These requirements cannot be fulfilled by simply adopting and adjusting traditional paradigms such as service-oriented architectures (SOA) [5] where services are triggered and coordinated according to predefined interaction patterns making self-adaptability and self-management hard to be integrated in a system [4].

In this context, a nature-inspired approach may be an important research direction. In such an approach, each service could behave as an autonomous organism in an ecosystem. An ecosystem can be defined as a dynamic compound formed by material circulation and energy flow, with reciprocity, interdependency, and self-organization functions within an interactive natural environment [6]. The physical, chemical, biological, and social interactions between system components are not determined by predefined centralized patterns but rather by a small set of natural laws [4] from which complex patterns of interactions dynamically emerge via self-organization.

Metaphors inspired by natural ecosystems, including digital [7], knowledge [8], and business ecosystems [9], have provided an important source of relevant knowledge, models, and algorithms thereby allowing efficient solutions in many fields. They are well suited for the development of new computing systems, particularly when these systems are complex, large-scaled, decentralized, open, and heterogeneous. This is the case with WSNs which commonly consist of spatially distributed nodes, operating unattended with severe restrictions on their computation capabilities, memory space, communication bandwidth, and battery lifetime. These nodes should self-organize while collaborating and/or competing for the limited resources in similar ways to the living organisms. We thus argue that an ecosystem metaphor would solve some of the current WSN problems and consequently enable the deployment of CPSs with WSN technologies. To fully exploit this metaphor, we propose a better mapping between WSNs and natural ecosystems. We adopt the multiagent system paradigm [10] which already has a well-defined set of formalisms, algorithms, and methodologies to bridge the gap between the WSNs and natural ecosystems. The multiagent system paradigm will particularly support the WSN in integrating the physical and the virtual environments of a CPS.

In the remainder of this paper, Section 2 describes the related works. Section 3 presents a mapping between sensors and living organisms as well as a mapping between natural ecosystems and WSNs. It also highlights the shortcomings of WSNs within this mapping. Section 4 describes our proposed agent-based architecture, called ABAMA, which aims to address the WSN shortcomings and improves the mapping between WSNs and natural ecosystems. Section 5 presents our new CPS architecture where software agents are used to intelligently bridge the cyber and physical worlds while integrating ABAMA concepts and capabilities. Section 6 presents few opportunities that this new architecture offers as well as the main challenges that the WSN community needs to investigate in the future.

Cyber Physical Systems have special features in terms of their architectural design and operating mode. They connect distributed, potentially mobile and heterogeneous, devices which may collaborate or compete for resources for their optimal operations. In addition to providing these devices with the necessary data and instructions for their operations, the CPSs have to monitor these operations and ensure a fair, on-time, and convenient resource use and allocation to different parties. Thanks to their capabilities of remote and distributed sensing and their real-time data analysis and routing, WSNs are integral parts of CPSs. Lin et al. [3] summarized the research works that have addressed the fundamental role of WSN in CPS in terms of deployment (e.g., [11]), localization (e.g., [12]), coverage (e.g., [13]), data gathering (e.g., [14]), and communication (e.g., [15]). We argue that these benefits could be further enhanced if WSNs can use natural ecosystem concepts.

According to our literature review, no research work has identified the WSN itself as an ecosystem in the context of CPS. However, few researchers did explore this area in a pure WSN environment. In this context, Jones and colleagues [16] represented sensors as organisms in an ecosystem which are distributed throughout a geographic region. The proposed representation assumes that every sensor has exactly 8 neighbors and can only transmit to them. Barolli et al. [17] implemented a simulation system for WSN using an approach inspired by digital ecosystems. These systems use evolutionary computing to implement properties such as self-organization and scalability inspired by natural ecosystems. In spite of its good performance, the simulation did not highlight any similarities between WSNs and the natural ecosystem.

To the best of our knowledge, the only research work which has used the natural ecosystem as metaphor to model WSNs is presented by Antoniou and Pitsillides [18]. The authors proposed a bioinspired congestion control approach for streaming applications in WSNs and considered a WSN to be analogous to an ecosystem. In particular, sensors are compared to species which live and interact together to meet their needs for survival and coexistence. In WSNs, traffic flows are seen as species that compete with each other for resources through a multihop path leading to the sink. The network is divided into small groups of sensors, called subecosystems. Each subecosystem involves all nodes that send traffic to a particular one-hop-away node (parent node). We argue that the proposed mapping between natural species and WSNs is partial because it does not capture all the characteristics and behaviors of both systems in addition to being designed for congestion control problems only.

Furthermore, because of several WSN restrictions, including limited processing, storage, and context-awareness capabilities, many software agent-based approaches have been proposed to equip sensor nodes with the necessary autonomy and intelligence mechanisms for decision making, self-organization, and resource management processes. In this context, Malik and Shakshuki [19] proposed an approach where mobile agents are used to perform some of the required processing load instead of simply transferring the data to the sink. In this approach, each agent has to carry a code to a source node and bring back aggregated data to the sink, which reduces the communication cost. Garcia et al. [20] proposed to reduce the WSN energy consumption by using data aggregation algorithms whereby agents act as dynamic clustering points in the network. In addition to saving energy, agents can allow a more efficient use of sensor nodes’ memories in addition to supporting code distribution among sensors [21]. In terms of conceptualization, sensor nodes have been modeled as software agents to achieve various objectives, such as data sampling [22], improving task assignment [10], and making data routing more efficient [23].

3. Natural Ecosystem Metaphor for Wireless Sensor Networks

To fully exploit the natural ecosystem metaphor for WSNs, in this section we describe the characteristics of both systems and discuss where they match and where WSNs have shortcomings.

3.1. Characteristics of Ecosystems and Wireless Sensor Networks

An ecosystem is a very complex entity that exhibits complex behaviors resulting from the mutual interactions between many components with common, individual, and/or antagonistic goals and their environment. Ecosystems are dynamic and may be defined using a wide range of scales of observation. They include large quantities of matter, energy, and information flowing within and between components, in a way that is not yet completely understood [24]. These flows depend on the ecosystem structure and could be controlled by different parties including top predators’ feeding behavior (top-down control), primary producers (bottom-up control), some numerically abundant species (wasp-waist control), or a combination of some or all of these [24].

The functioning of an ecosystem stems from the organization of its species’ populations which have their own dynamics in terms of abundance, survival, growth, production, reproductive, and other strategies. The ecosystems’ structure, species composition, and functioning may change sometimes in uncontrolled and unpredictable ways [24]. Changes may consequently create uncertainty as to the future states and behavior of the system leading to potential risks for the ecosystem itself and its environment [24].

Wireless sensor networks are collections of spatially distributed nodes that commonly cooperate in order to achieve goals which are beyond their individual capabilities. These nodes may operate unattended in remote harsh areas wherein human interventions are often impossible. Due to a variety of causes including lack of support, spatiotemporal events, animals, and energy depletion of sensors, the topology of the network dynamically changes. Some sensor nodes may lose several of their neighbors and find themselves at the boundaries of physical, logical, malicious, and semantic holes [25], whereas others may be overloaded with data traffic due to the absence of alternative communication pathways.

To optimize the use of the limited resources and lengthen the lifetime of WSNs, several approaches [26, 27] have been proposed in recent years. Some of these approaches have provided the network with the capability to self-organize by creating clusters that may shrink or grow as sensors wake up, sleep, and/or move. The changes on every cluster are commonly controlled by a cluster head which is a sensor node generally selected for its extended capabilities, its residual energy, and/or its degree of connectivity.

3.2. Sensors as Living Organisms

In order to fully exploit the ecosystem metaphor, it is important to compare the low-level entities in natural ecosystems and WSNs, namely, living organisms and sensors. On the one hand, living organisms have 7 main characteristics [28]: (1) nutrition (provides the resources required to fulfill all the other functions of the organism); (2) excretion (set of chemical reactions to remove toxic materials, waste products, and substances in excess of requirements from the organism); (3) respiration (releases the energy from the nutrients); (4) sensitivity (ability to detect or sense changes in the environment and to respond); (5) reproduction (process that generates new organisms of the same species); (6) growth (concerns the increase in size and number of the living organisms); and (7) movement (action by which an organism changes its position). On the other hand, sensors are commonly deployed in closed or open spaces. They are capable of sensing some parameters of interest within their environments, processing and storing data, and communicating with neighboring peers within their communication ranges. In this communication, sensors can support each other (e.g., to heal voids or track intruders), compete (e.g., obtain the necessary resources for their own tasks), or show an antagonistic behavior (e.g., spy nearby peers or jam their communications). A sensor may also move (if equipped with appropriate actuators) to join or leave a subgroup of sensors. This is the case, for example, when a sensor may relocate to prevent any potential physical damage due to new environmental conditions such as fire or heavy rain. During such activity, the sensor may use its limited on-board memory to store new data and experience. It may also demonstrate a certain level of cognition by learning from its previous experiences [16].

Given the characteristics discussed above of both sensors and living organisms, we argue that the capabilities of sensors do not fully equate to those of living organisms. There is indeed a need to extend these capabilities with more flexibility, autonomy, intelligence, and context awareness as shown in Table 1.

3.3. Mapping Ecosystems onto Wireless Sensor Networks

Jones et al. [16] and Antoniou and Pitsillides [18] have argued that the WSN could be modeled based on observations of living systems which are likely to provide realistic models for sensor network design. Indeed, rather than adapting conventional techniques of centralized computer control, new techniques dependent on local cooperation among network nodes will lead to self-sustaining communities of machines with emergent behavior that autonomously operate and adapt to changes in the environment [18]. According to this vision, Jones and colleagues [16] have perceived massively deployed motes as organisms which interact, learn, and make local decisions to achieve globally meaningful effects within their community. We also share this vision and propose, in Table 2, a mapping between WSN and ecosystems. Our mapping is basically done by emphasizing the three basic elements of an ecosystem which are [28] structure (represents a high level view of the ecosystem and refers to all of the living and nonliving physical components that make up that ecosystem), composition (refers to the variety of living entities found within an ecosystem as well as their types/roles), and function (reflects the dynamic behavior of the ecosystem and refers to the natural ecological processes of the ecosystem). Furthermore, we emphasize additional features by comparing the topologies resulting from the organization of the entities found in ecosystems and WSNs. We also highlight the aims behind organism organizations as well as the communication between the different components of the system. Based on our mapping (as shown in Figure 1), we argue that in terms of logical view (components, organizations, and their relationships) and functional view (aims), ecosystems and WSN match quite well. However, WSN presents several shortcomings for the dynamic view (behavior). This may be explained by the limited capabilities of sensors that do not usually allow for complex, efficient behavior of WSNs.

4. ABAMA: New Ecosystem-Oriented Architecture for Wireless Sensor Networks

In order to design effective, pervasive WSN services that exploit the benefits of ecosystems’ features, we should define adequate methodologies and tools for the dynamic and decentralized control of the system. This control should support a tradeoff between top-down adaptation and a bottom-up one. We should also monitor the overall system by measuring its behaviors in order to make sure that the control is effective [4]. By taking into consideration these requirements, we propose a new ecosystem-oriented architecture for WSNs that we call ABAMA (agent-based architecture for mapping natural ecosystems onto wireless sensor networks). The use of the multiagent system technology in our architecture (Figure 2) is motivated by its proven flexibility, autonomy, and intelligence to solve complex problems within highly dynamic, constrained, and uncertain environments [29]. This technology is particularly used wherever and whenever the WSN fails and needs support to match the natural ecosystem. Following Zambonelli and Viroli’s vision [4], ABAMA allows sensors to behave like natural organisms while keeping control of the overall network. ABAMA reflects the fact that sensors could be collaborating, competing, and even antagonistic. Several notations and acronyms on Figure 2 will be explained in the upcoming subsections.

As a WSN may be deployed to provide several services to end-users concurrently, subsets of sensors with each subset including a population of sensors can be created in response to one or more users’ queries. The structure and composition of each subset (that we call here service sensor network (SSN)) may be dynamic particularly because users may request the same service from different areas with different quality of service parameters. SSNs may compete with each other to acquire/secure the necessary resources for their tasks. Sensors in each SSN along with the supporting software agents form a small-scale ecosystem that we call EcoSSN (as shown in Figure 2).

We describe in the next sections some important tasks carried out by our proposed architecture, namely, processing users’ requests, creating service sensor networks (SSNs), controlling SSNs by agents, monitoring agents and monitoring the whole WSN, and multilevel collaborations. The different types of agents used in ABAMA to achieve these tasks are summarized in Figure 5.

4.1. Processing Users’ Requests

ABAMA receives requests for services from end-users or from other WSNs through an agent input/output interface (AIOI). When a query is received, the agent AIOI compares the service requested with the services which were recently delivered by the CPS as well as with those currently in progress. This will allow for assessing the necessary processing within the right spatial areas. The agent AIOI will then make a filtered request to an agent controller (AC as shown in Figure 2) that monitors the different agents, the whole WSN, and the progress of delivering the requested services. The agent AC will request the necessary processing from the WSN based on the data collected from the WSN itself (i.e., from the sensor nodes) as well as the agents which continuously monitor specific aspects of the network such as the network connectivity, energy levels, communication pathways, and progress in supporting current services. The decision of the agent AC is also based on the available spatial data that helps in identifying the distributed areas of interest (AoIs) from which data will be collected.

If the service was already requested by a previous user and is currently being processed, then the agent AC assigns the request to an existing agent service sensor network (ASSN) which is in charge of monitoring the current requested service. Since the users might not necessarily request the same service from the same AoIs, the agent AC also informs the agent ASSN about the additional sensors that will be used to provide the service from the right spatial areas. Once the service is achieved, the agent ASSN notifies the agent AC which in turn replies back to the result to the agent AIOI. If the service was not requested before, then the agent AC passes the request along with the AoIs to the WSN in order to create the SSN necessary to provide the requested service. The agent AC also creates a new agent ASSN that will be in charge of controlling the new SSN. The algorithm of processing users’ requests is depicted in Algorithm 1. The process of creating an SSN is described in Section 4.2.

ProcessRequests(service, AoI)
//check list of current and recently offered services
checkServices(service, QoS); //QoS: Quality of Service
if (service recently offered with the required QoS) {
 reply(AIOI, service, QoS);
 //find the necessary areas of interest if not explicitly specified
 //by the user
 //AoI where service is being offered
 //AoIunav = AoI where service is not offered
AoIav, AoIunav = findAoI(service);
 if (service being offered) {
  inform(ASSN, service, AoIav, QoS);
  inform(ASSN, service, AoIunav, QoS);
  prepare message JoinService(); //Table 3
  inform(WSN, AoI, QoS, JoinService());
  create(ASSN, service, AoI);
  //inform Event Chasing Agent (Figure 5) for support
  inform(ECA, ASSN, service, AoI, Qos);
  //inform Resource Chasing Agent (Figure 5) for support
  inform(RCA, ASSN, service, AoI, Qos);

4.2. Creating Service Sensor Networks (SSNs)

In order to create a new SSN, the base stations in the WSN broadcast a message JoinService() within the AoIs (explicitly selected by the user or identified by the agent AC). If a given sensor has already received this message, then it simply acknowledges it. Otherwise, before broadcasting this message, it sets up its role to be either a backbone sensor (BS) or a support sensor (SS). The sensor is a BS if it is able to collect the requested type of data (e.g., sensor is a BS if it is a pressure sensor and the requested service is to measure the current atmospheric pressure); otherwise, it is a SS which simply serves as relay to route the data collected by the BSs. Every BS that receives a JoinService() message directly from a base station or from a sequence of SS sensors only (i.e., does not include any other BS sensor) will be elected as a cluster head (CH). Every sensor will then promote the cluster head to which it belongs. All the clusters heads in a given AoI form the AoI board group (AoIBG). The AoIBG is responsible for monitoring the AoIsubnet which comprises all the sensors used to achieve the requested service in that particular spatial area. To this end, the CHs may, for example, mutually lend resources (basically mobile sensors) or route the data of each other in order to support their mutual operations.

In addition to the JoinService() message, any given sensor may receive a ReplyJoinService() message or a RollBack() message (as shown in Table 3). In the first case, the sensor stores the role, the ID, and the type of the sender sensor and marks it as a next hop. In the second case, the sensor receives the paths leading to all the leaf sensors through the sender sensor. The sensor waiting time for incoming messages is delimited by a timer. Once this timer expires, it aggregates all the paths received from all its next hops and then sends a RollBack() message to its predecessor sensor. Every cluster head will aggregate all the paths received from its next hops. It will also nominate one of the members of its cluster as a cluster subordinate sensor (CSS) (as shown in Figure 3). The CSS sensor, which is selected based on its current energy and the number of hops it is away from the cluster head, will be delegated to carry out some processing (such as broadcasting updates within the cluster) ultimately freeing the cluster head and preserving its energy. Our algorithm for creating part of an SSN in a given area of interest is depicted in Algorithm 2.

//AoIs is the set of areas of interest
sensor s within an AoI, do
//the sensor checks the type of the message received
  if (JoinService() message is received) {
 save sender as previous hop
 save sender id, role and type
 if (JoinService() is received for the first time by s) {
set role s
send ReplyJoinService()
broadcast JoinService()
set timer to predefined value
 else //message was received before
send ReplyJoinService
  else if(ReplyJoinService() message is received) {
save sender as next hop
save sender id, role and type
  else //RollBack message is received
aggregate paths from s to leaves
Wait for new messages and repeat steps
if no new message (Join/Rep/RollBack) after timer expired
   send RollBack(path, ids) to the CH sensor to which s belongs

4.3. Controlling Service Sensor Networks with Agents

An efficient functioning of an SSN should result from the mutual interactions among its sensors. However, unlike living organisms which can have dense interactions among each other, sensors usually have to run under limited resources and thus cannot have a similar flow of interaction. To prevent any misuse of the network resources, controlling mechanisms within every SSN are necessary. Control in WSN is often assigned to gateways which are specific sensor nodes with extended capabilities. Similar to the entities controlling colonies in ecosystems, gateways have limited awareness of the geographic space where the WSN is deployed. To overcome this shortcoming (as presented in Table 2), software agents are used to enhance the control of SSNs while adding flexibility to clusters to self-organize and increase their awareness of sensors’ communications and mobility. As previously discussed, an SSN is essentially composed of sensors collecting and/or routing data to cluster head sensors located in distributed areas of interest. Based upon the SSN structure, we propose to monitor all SSN operations according to four control levels, namely, atom, macro, meso, and micro (Figure 4). The atom control level is implemented on each individual sensor by means of an agent sensor (AS) that manages the local resources, plans, and carries out local data processing. The micro control level is achieved by a set of agents, each of which is assigned to a specific cluster and hosted on the cluster head sensor. Each of these agents, called ACH (agent cluster head), collects information about the current processing activities, energy level, and connectivity of each sensor within its cluster. Some of this information is reported via a mobile agent created by the ACH and named Agent Cluster Delegate (ACD, shown in Figure 5). The mobile agent can migrate within the cluster to collect data on site and/or collaborate with other agents ACD from the same SSN. In this case, these agents agree and meet on a specific sensor node where they interact and make joint decisions on behalf of their agents ACH.

The agents ACH mutually report information on their own resource usage and processing activities. They may assign resources to each other as for example, when mobile sensors from one cluster move to support activities in a neighboring cluster. The coordination and the monitoring of interactions between the different agents ACH is achieved at the meso control level (as shown in Figure 4) by an agent called AAoI (agent area of interest). This agent is responsible for monitoring the progress of operations related to its corresponding service within its corresponding AoI. Thanks to their extended context-awareness, the agents AAoI commonly make recommendations to their agents ACH. Furthermore, several agents AAoI may coexist in the same AoI when more than one service is requested from this same area. In this case, these agents AAoI have to collaborate to ensure fair use of resources based on the priority of services being processed. All agents AAoI belonging to the same service are monitored at the macro control level by an agent ASSN (as described in Section 4.1). In addition to the micro, meso, and macro control levels within each SSN, a final major control level is achieved by the agent AC (as shown in Figure 2) which is in charge of monitoring all the agents ASSN.

The agents ASSN, AAoI, ACH, and AS perform several functions to achieve a better mapping of sensors into living organisms and therefore overcome the shortcomings of  WSN (as shown in Table 2). For the sake of illustration, we enumerate below some of the functions which are carried out by an agent ASSN.

Collecting Data. Similar to living organisms which take substances from their surroundings for their vital nutrition, sensors need data from their immediate contexts as inputs for their operations. Because of their limited sensing capabilities, some of the required information is provided to sensors by the appropriate agents at the appropriate control levels. For example, an agent ASSN may exchange data about some events of interest (e.g., spreading wildfire) with other agents ASSN and then recommend better sampling rates to some of its agents AAoI based on processing priorities and available resources. The agent ASSN may also recommend specific data acquisition algorithms (e.g., Dendritic Cell Algorithm like in [30]) depending on particular ongoing circumstances such as sensors’ connectivity and spatial events.

Balancing Energy. Based on the collected data, an agent ASSN should be able to predict and delimit the boundaries of potential energy holes [31]. Preventive actions can then be taken to ultimately balance energy over the SSN. For instance, certain nodes may be asked to take over the duties of some sensors with low energy levels while others may be asked to reduce their communication range in order to save energy. Similar behavior can be observed with certain living organisms which intentionally put their metabolisms or some of their functions on standby mode when they lack energy. To achieve the task of load balancing, the agent ASSN may use a bio-inspired load balancing technique such as one based on pheromone signaling (e.g., [32]). The agent ASSN may also use an approach benefiting from the mobility of its agents (ACHD, RSA, etc.) like in [33].

Dealing with Dynamism. Sensors are usually prone to failure thereby causing several unpredictable modifications in the topology of the WSN and leading to route changes. Transferring data through the network could then become a time and energy-consuming process. On their own, sensors are usually unable to establish and maintain communication pathways, particularly because of their limited (local) view of the SSN. In contrast, thanks to its global view of the topology of the SSN (e.g., sleep/wakeup cycles of sensors) and a better awareness about the environment’s changing conditions (e.g., heavy rain), the agent ASSN may predict changes in the topology of the network and determines alternative communication pathways on time. The agent ASSN may also instruct some sensors to move in order not to lose connectivity in some areas. The relocation of mobile sensors can be implemented using, for example, a bio-inspired Digital Hormone Mode approach (as in [34]) or using other techniques as described in [34]. To optimize communication costs, an Ant Colony Optimization approach (e.g., [35]) could be used.

Secure Processing. Some sensors may exhibit malicious behaviors causing several problems, including communication jam, data loss, and energy depletion. For example, in a black hole attack, a malicious node attracts all the traffic by advertising that it has the shortest path in the network. Once it receives the packet from other nodes, it drops all the packets causing loss of critical information. Sensors could collectively identify malicious nodes at the expense of communication and energy-consumption overheads. Moreover, if the malicious nodes are moving from one cluster to another, the same processing efforts are more likely to happen to identify and prevent the effect of these nodes. To track malicious nodes efficiently while learning from previous experiences, an agent ASSN can analyze the data communication traffic in its SSN to identify antagonistic sensor nodes. This could be implemented, for example, with a bio-inspired machine learning approach (as in [36]). The agent ASSN can secure the data routing with an ant-based approach (e.g., [37]). The agent can then finally share its experience with other agents ASSN in order to prevent redundant processing (e.g., identifying malicious sensor nodes).

4.4. Monitoring Agents and the Wireless Sensor Network

The agent controller (AC), which is physically hosted along with agent input/output interface (AIOI) on the cyber side of the cyber physical system (CPS), is in charge of monitoring the agents ASSN as well as the entire WSN. To achieve the first task (i.e., monitoring agents ASSN), different strategies can be implemented. The Agent AC may, for example, request, when needed, information from each agent ASSN on the progress of delivering the assigned service. Alternatively, agents ASSN may periodically notify agent AC about their progress. A hybrid strategy may combine both mechanisms whereby information on the progress of service delivery is reported to the AC whether upon its request or when initiated from any agent ASSN. The aim of the current work is not to discuss the details of agent AC functioning but mainly to explain the motivations for using this agent.

Actually, by monitoring the agents ASSN, the agent AC is also overseeing the overall performance of the WSN. Indeed, after collecting information about the progress of delivering a given service within a certain SSN, the agent AC has to take the best decisions which better fulfill the user requirements and improve the overall performance of the network. These decisions are communicated to the concerned agent ASSN and may consist in one of the following:

(1) Resume/Start Service. Based on its global view of the network, the running services, and pending requests, the agent AC may request a certain agent ASSN to start or resume a specific service.

(2) Stop Service. Agent AC may ask an agent ASSN to cancel the ongoing work. This may happen if agent AC infers that the resources of a given SSN should be assigned to tasks of higher priority. Cancelling the ongoing work may also be decided based on the request of an agent ASSN itself which discovered that the service cannot be achieved with the requested quality given the available resources.

(3) Update Service. As the environment is highly dynamic, agent AC may judge, at run-time, that the service assigned to a given agent ASSN has to be updated because of the new environmental constraints. For instance, the agent ASSN may be asked to change some sensing parameters within its SSN. It is then the responsibility of the agent ASSN to plan the appropriate steps within the SSN in order to meet the new requirements.

(4) Void. If agent AC is satisfied with the service progression, no notifications are needed.

It is worth mentioning that the communication between agent AC and the different agents ASSN (regarding progression and decisions) is done via short messages and only when needed. These messages are used by agent AC and agents ASSN to monitor the entire WSN, oversee the quality of offered services, and optimize the use of resources. These message exchanges do not generate an extra overhead for the network. To the contrary, they reduce the overall load of the network by avoiding running services which would not have met the desired requirements.

4.5. Multilevel Collaboration

Similar to living organisms in ecosystem populations, sensors in WSN may move from one cluster to another freely or under the control of some monitoring nodes such as gateways. The movement of sensors may enforce the collaboration between clusters. This is the case, for example, when a given cluster is unable to maintain efficient data traffic because of communication holes and receives the support from neighboring clusters that relocate some of their mobile sensors to heal those holes. In a natural ecosystem, collaboration is achieved using several approaches such as Quorum Sensing [38]. In the present work, we allow every agent ACH to identify a list of Ranger Sensors (RSs) which are actually redundant mobile sensors that will be relocated to support other sensors inside or outside its cluster. The selection of RSs is based on their proximity to neighboring clusters and their degree of connectivity within the current cluster. When local RSs fail to address some deficiencies, the ACH may request help from neighboring clusters. The agents ACH of the clusters which have received the request determine the RS sensors to move and then respond back to the agent ACH which made the request. The latter compiles all responses and then confirms its needs to the selected supporting agents ACH. This approach may result in some communication overhead; however, it prevents relocating more RSs than what is actually needed.

To increase the collaboration among clusters, every agent ACH creates a mobile agent called Agent Cluster Delegate (ACD, as described in Figure 5). This agent maintains a list of redundant sensors that could be used as RSs when needed. It keeps an inventory of the available resources, processing capabilities, and routing paths. In case of severe resource deficiency or on a routine basis, the agents ACH may instruct their agents ACD to move to a meeting infrastructure (for example, a specific node in the sensor network) where they will negotiate the mutual needs of their respective clusters and cooperate on joint solutions to current and future problems. Every agent ACD reports the results of the negotiation to its agent ACH, which in turn reports the information to its agent AAoI.

Similar collaboration mechanisms can be implemented between neighboring areas of interest and SSNs where mobile agents (AoID (AoI Delegate) and ASSND (ASSN Delegate)) are created and used to collect specific information, including the number and locations of redundant sensors and the areas facing communication and/or sensing problems. Similar to agents ACD, the agents AoID and ASSND migrate when needed to a meeting infrastructure (i.e., gateway or remote sensor node) to make collaborative decisions and share knowledge and experience learned from previous experiences at low costs. The increased energy consumption resulting from the migration of mobile agents to a meeting infrastructure is irrelevant comparing to the benefits of the approach [39]. The information reported by the different mobile agents to their respective superior agents is then sent to a specific agent called the resource chasing agent (RCA in Figure 5). This agent is constantly updating information on available resources and making recommendations to the agent AC for a better use of the WSN resources and an enhanced optimization of collaborative processing.

5. Toward a New Cyber Physical System Architecture

CPSs are being implemented for a variety of applications, where processing capabilities located on a cyber system are using a communication infrastructure to monitor the physical world. In this configuration, sensors are being seen as an important component through which the access and control of physical, application-related resources can be achieved in situ and on time. Sensors can be either part of the application resources or an interface through which instructions are disseminated from the cyber system to the physical system and data are pushed in the reverse flow. In order to improve the limited processing and context-awareness capabilities of sensors, we are using software agents to particularly inject autonomy and flexibility in sensors and the whole sensor network. We believe that agents can also be efficiently used to strengthen the link between the cyber and physical worlds. We thus propose to extend ABAMA to a new CPS architecture (Figure 5) where agents are deployed on the cyber and physical sides of the CPS. Some of our agents (ASSN, AAoI, ACH, ASS, ACSS, ABS, and ARS) are being used to implement an embedded multilevel control over the WSN and the application resources. These agents are hosted on physical sensors and can be supported by some mobile agents (ASSND, AoID, and ACD) in collecting specific data (such as the availability and state of application resources, sensors’ connectivity, and routing paths). At any moment, these mobile agents can move to the cyber system wherein extended communication and processing facilities and data are available. They can also be used to make soft copies of some capabilities of a given sensor and share or implement them on other sensors.

In addition to the communication infrastructure, the cyber side of our architecture includes a data module, a service module, and a major control module. The data module contains a spatial database for the identification of areas of interest, the location of sensors, and the application resources and a database containing several bioinspired algorithms that could be used as needed by the agent AC. It also contains a record of the recent services it has provided and the ongoing services to reduce user queries’ response times. The service module contains the agent AIOI which is responsible for collecting and responding to the user requests. After checking the ongoing and recent services provided, the agent AIOI sends a request to the agent AC in the major control module. This agent is supported by two special agents: RCA (resource chasing agent) and ECA (event chasing agent). The goals and use of the AC and RCA were explained in the previous sections. The ECA is used to track and detect events of interest within the spatial areas where the WSN and the application resources are located. This agent is important especially since sensors as well as the application resources may be heavily affected by some events (e.g., heavy rain) or are tracking events of interest (e.g., level of water in specific areas). The details on the use of the ECA will be the objective of a future work. The three modules can communicate using the communication infrastructure. This infrastructure is also used by some of the agents on the WSN to exchange data and knowledge and migrate from one sensor to another.

6. Opportunities and Challenges

On its own, a WSN has limited capabilities in terms of self-organization, learning, processing, and detection of malicious nodes. However, with the help of software agents, it is possible to enhance the capabilities of the physical network and ultimately match them with those of a natural ecosystem. Indeed, the agents of ABAMA can implement appropriate bioinspired algorithms, including Ant Colony Optimization (ACO), particle swarm optimization (PSO), intelligent weeds optimization (IWO), and bee colony optimization (BCO) to optimize data traffic and carry out the right processing at the right time. With similar bioinspired approaches, software agents can strengthen the link between the cyber and the physical systems and enable a smooth, efficient, and timely communication.

To take full advantage of the natural metaphor and enjoy the opportunities presented above, there are several issues that must be addressed toward the implementation of our new CPS architecture. In what follows, we outline some of the challenges and opportunities related to the implementation, evaluation, scalability, and seamless integration of our proposed CPS architecture with Big Data and the Internet of Things.

Implementation. Within the specific context of our new CPS architecture, several bioinspired approaches can be used to deliver a given service. This is highlighted by the availability of a database containing bioinspired algorithms on the cyber side. In addition to the complexity of some of these algorithms that may not be suitable to run on sensors with limited resources, it is important to make sure that the appropriate algorithm is used for the right task at the right time. Although multiagent system approaches can bring relatively efficient solutions, this goal remains difficult to achieve because the efficiency of each algorithm may closely depend on the current sensors’ requirements, the environmental conditions, and the required QoS (quality of service). Moreover, although sensor agent technology has become sufficiently reliable for operational use in the field [10], deploying agents on sensor nodes suggests additional research efforts that take into account the WSN constraints for the sake of increasing sensors’ knowledge, competencies, and context awareness without consuming a lot of the limited energy of the network. Mobile agents allow for the reduction of energy consumption; however, they cannot carry out extended expertise while moving. Collaboration and negotiation algorithms should also be tailored to use as least interaction as possible. Furthermore, because of the variety of behaviors that a sensor may exhibit (e.g., collaborative, competitive, and antagonist) and the change of its capabilities and processing loads, several algorithms based on the theories and models of natural ecosystems have to be further adapted to coexist within the same WSN and eventually on the same sensor node.

Evaluation. Several metrics could be used in order to assess the performance of our CPS design in terms of data routing efficiency, energy consumption, security, reliability, and resource availability. These metrics can be computed using analytical techniques such as those based on continuous time Markov chains (CTMC) and reward functions. As our CPS architecture is targeting several functionalities with varying priorities and objectives, we may have opposing goals for some metrics, for some criteria. A tradeoff must then exist, for example, between data routing efficiency and energy consumption because efficiency is generally linked to communication overhead. Reducing this overhead may in turn lower the expectations in terms of QoS. Moreover, our architecture emphasizes the control of the WSN and the application resources to optimize operations and resource consumption. This control generally results in additional energy-consumption overheads, leading to unsatisfactory results for specific metrics measuring individual criteria. However, we argue that the overall performance of the CPS could be improved. Furthermore, performance of measures depends on specific conditions, including the WSN configuration, current spatiotemporal events, and the number and scope of services required. It is thus important to explore the possibility to adapt some metrics to WSN and CPS related features.

Scalability. We argue that the agents of our CPS architecture can handle the addition of new sensors and network topology changes with a reasonable operational, communication, time, power, and reliability cost overhead. This is because multiagent systems have proven good performance for the development of new computing systems, particularly when these systems are complex, large-scaled, decentralized, open, and heterogeneous [10]. In addition, the mobility of agents can push most of the processing load out of the network to the cyber system where extended capabilities are easy to be made available. This is particularly helpful in dealing with the additional data acquisition, processing, and routing requirements of any additional sensor. Our CPS architecture offers reasonable scalability and it can smoothly integrate and interact with other systems through the communication infrastructure.

Seamless Integration with Internet of Things. WSN technology is a fundamental component of the Internet of Things (IoT). WSN integration is expected to allow sensor nodes to join the Internet dynamically and use it to collaborate and accomplish their tasks. However, we must carefully investigate and analyze this integration as it is likely to open up further issues related to security, quality of services, increasing processing and communication loads, and interoperability. These challenges will need to be addressed in the context of our CPS architecture when the WSN is integrated with the IoT. Nevertheless, this integration would allow for several opportunities, especially resource availability and participatory data acquisition and processing. The first opportunity provides, in general, the CPS with the required resources to implement an efficient communication between the cyber and the physical systems while improving its control over the WSN and the application resources. Typically, CPS can select the appropriate additional resources for its processing without being limited to its own resources. The second opportunity allows sensors to mutually support each other by exchanging available data and available bioinspired algorithms. This exchange of data and algorithms could be extended to include sensors from other CPSs or tier systems (e.g., external WSNs). Sensors may also delegate some of their processing and sensing loads to other sensors from tier systems while respecting predefined trust and security mechanisms.

Seamless Integration with Big Data. Sensors are known to be able to collect real-time, in situ data on a variety of events of interest. The larger the WSN is, the bigger the quantity of data collected is. Such data could reveal important knowledge on the events of interest if it is archived and analyzed carefully. On the one hand, with the continuous use of sensors, huge amounts of collected data need to be stored, modeled, and handled with efficient theoretical and practical background of the Big Data field. Big Data technology could be seen in this case as an important enabler that helps toward making the best use of sensor data. On the other hand, sensors may allow enhanced processing of Big Data, particularly when real-time data streams coming from sensors are to be integrated with available data. In the context of our CPS architecture, the cyber system could be extended to host all the collected sensor data as well as techniques for Big Data management. Software agents can be used in order to filter and aggregate data as per the requirements of data processing.

7. Conclusion

Ecosystems and WSN exhibit several similarities, particularly in terms of structure and goals. They are indeed both composed of interactive components (organisms and sensors) which could self-organize, collaborate, and compete to achieve complex functions far more than what they are capable of. We found that a big gap exists between both systems in terms of behaviors due to the limited capabilities of sensors. We argued that the use of a multiagent system approach could bridge the gap between natural organisms and sensors and thus allows for an efficient use of an ecosystem-based metaphor for WSNs. To this end and while identifying the need for sensors to be more flexible, autonomous, and intelligent, we proposed the ABAMA architecture where software agents can ensure a better use of the limited WSN resources by implementing a multilevel control (over the entire network and over individual sensors). These agents are located either on sensor nodes or on a virtual platform where the heavy processing tasks of the WSN are migrated to so that we can increase sensors’ context awareness and save energy. We extended our ABAMA architecture to a new CPS architecture where the cyber system incorporates a major control level over the physical system while enforcing the multilevel control embedded on WSN.

Our CPS architecture offers enough flexibility to integrate with new hardware and software capabilities. It is also open to a seamless integration with current hot research and development fields, including IoT and Big Data. In addition to a more in-depth investigation of the roles of the resource chasing agent (RSA) and the event chasing agent (ECA), our future works will focus on selecting the appropriate criteria to adapt some available metrics to the contexts of WSN and CPS.


This paper is an extended version of an invited paper which previously appeared in the Proceedings of the 9th International Conference on Future Networks and Communications in 2014.

Conflict of Interests

The authors, Nafaâ Jabeur, Nabil Sahli, and Sherali Zeadally, declare that there is no conflict of interests regarding the publication of this paper.


The authors thank the anonymous reviewers for their useful comments and suggestions which helped us to improve the quality and presentation of this paper. They would also like to thank the guest editors for providing them with the opportunity to extend the paper into a journal paper for consideration for the special issue.