14
IEEE SYSTEMS JOURNAL, VOL. X, NO. X, DECEMBER 20XX 1 Routing-Aware Design of Indoor Wireless Sensor Networks Using an Interactive Tool Alberto Puggelli, Student Member, IEEE, Mohammad Mostafizur Rahman Mozumdar, Member, IEEE, Luciano Lavagno, Member, IEEE, Alberto L. Sangiovanni-Vincentelli, Fellow, IEEE Abstract—In this paper, we present an interactive design tool that can assist rapid prototyping and deployment of wireless sensor networks for building automation systems. We argue that it is possible to design networks that are more resilient to failures and have longer lifetime if the behavior of routing algorithms is taken into account at design time. Resiliency can be increased by algorithmically adding redundancy to the network at locations where it can be maximally leveraged by routing algorithms during operation. Lifetime can be increased by placing routers where they are most needed according to the expected data traffic patterns, to improve the quality of the transmission. The network synthesis problem is formulated as an optimization problem. We propose a mixed-integer linear program to solve it exactly, and a polynomial-time heuristics that returns close-to-optimal results in a shorter time. We analyze the performance of the designed networks by using OPNET simulation. Results show that our tool can assist designing sensor networks that have high throughput and consume power efficiently. Index Terms—resiliency; power consumption; routing algo- rithms; sensor network; graphical user interface. I. I NTRODUCTION Applications for Wireless Sensor Networks (WSN) have been expanding rapidly in many fields such as factory automa- tion, environmental monitoring, security systems and in a wide variety of commercial and military areas. Recently, efforts have been made to enable a large-scale deployment of WSN technology also in the field of Building Automation Systems (BAS). Applications in this domain range from health-care monitoring to home automation, and even more importantly, to the automation of power management. Recent studies show that building operations (such as lighting, Heating, Ventilation and Air Conditioning (HVAC)) represent around 40% of the total energy consumption in the United States [30]. It is widely believed that controlling these operations effectively can reduce energy consumption from 30% up to 70%. Wireless technology is highly promising, since its deployment costs Manuscript received March 18, 2013; revised September 23, 2013; accepted October 2, 2013. Date of publication December xx, 20xx; Date of current version xx xx, 20xx. This work was supported in part by TerraSwarm, one of six centers of STARnet, a Semiconductor Research Corporation program sponsored by MARCO and DARPA. A. Puggelli and A. L. Sangiovanni-Vincentelli are with the University of California at Berkeley, Berkeley, CA - USA (email: {puggelli,alberto}@eecs.berkeley.edu) M. M. R. Mozumdar is with the California State University Long Beach, Long Beach, CA - USA (email: [email protected]) L. Lavagno is with the Politecnico di Torino, Torino, Italy (email: [email protected]) Digital Object Identifier xx.xxxx/JSYST.20xx.xxxxxxxx are substantially lower than the ones associated with a wired solution, and since it is flexible enough to accommodate changes in the building usage, which are common over its life-cycle. To reduce the energy consumed by the building stock, both new constructions and existing buildings must be equipped with control solutions that increase the building energy ef- ficiency. From the BAS perspective, these solutions are com- bined with optimal architecture design (for the sensor-actuator network) and the use of advanced control algorithms that, based on measurements collected by sensors, compute an optimal control policy and send commands to actuators. Thus, the sensor-actuator network is a key element of building automation systems. The selection of an optimal network is driven by several metrics such as cost, network lifetime, throughput, and also the resiliency to sudden failures in the network architecture. Designing efficient WSN-based solutions for building au- tomation is a complex task, and we expect that multi- disciplinary teams will be involved in specifying, designing, implementing, deploying and maintaining them. These teams could involve architects as well as civil, electronics and telecommunication engineers, all with a common goal of sharing a unified representation of the network design, in order to optimize sensing, actuation, communication, power supply, maintenance access and so on. In order to support the rapid design, prototyping and de- ployment of WSN for BAS applications, we aim to develop a design framework that provides rich interfaces to capture inputs from designers with different fields of expertise, and a tool chain that processes these inputs and guides towards ro- bust solutions. Along this path, tools and methodologies have been developed for the modeling, simulation and automatic code generation of WSN applications [3], [4], [5]. In this paper, we present a graphical tool to support the design exploration and synthesis of network topology, i.e. the locations of nodes. An optimal topology should guarantee con- nectivity and support all functional requirements (e.g., latency, throughput, etc.), while optimizing several metrics such as cost, network lifetime, resiliency and others. The tool allows the designer to specify the location of the network end-devices (e.g., sensors, actuators and gateways) on a 2D schematic of the floor plan, and to enter quantitative parameters to capture the node behavior (e.g., bit rate, transmission power, etc.). Moreover, the tool provides interfaces to specify the characteristics of the network stack such as the behavior of 0000–0000/00$00.00 c 2013 IEEE

Routing-Aware Design of Indoor Wireless Sensor Networks Using an Interactive Tool

Embed Size (px)

Citation preview

IEEE SYSTEMS JOURNAL, VOL. X, NO. X, DECEMBER 20XX 1

Routing-Aware Design of Indoor Wireless SensorNetworks Using an Interactive Tool

Alberto Puggelli, Student Member, IEEE, Mohammad Mostafizur Rahman Mozumdar, Member, IEEE,Luciano Lavagno, Member, IEEE, Alberto L. Sangiovanni-Vincentelli, Fellow, IEEE

Abstract—In this paper, we present an interactive design toolthat can assist rapid prototyping and deployment of wirelesssensor networks for building automation systems. We argue thatit is possible to design networks that are more resilient to failuresand have longer lifetime if the behavior of routing algorithms istaken into account at design time. Resiliency can be increased byalgorithmically adding redundancy to the network at locationswhere it can be maximally leveraged by routing algorithmsduring operation. Lifetime can be increased by placing routerswhere they are most needed according to the expected data trafficpatterns, to improve the quality of the transmission. The networksynthesis problem is formulated as an optimization problem. Wepropose a mixed-integer linear program to solve it exactly, anda polynomial-time heuristics that returns close-to-optimal resultsin a shorter time. We analyze the performance of the designednetworks by using OPNET simulation. Results show that our toolcan assist designing sensor networks that have high throughputand consume power efficiently.

Index Terms—resiliency; power consumption; routing algo-rithms; sensor network; graphical user interface.

I. INTRODUCTION

Applications for Wireless Sensor Networks (WSN) havebeen expanding rapidly in many fields such as factory automa-tion, environmental monitoring, security systems and in a widevariety of commercial and military areas. Recently, effortshave been made to enable a large-scale deployment of WSNtechnology also in the field of Building Automation Systems(BAS). Applications in this domain range from health-caremonitoring to home automation, and even more importantly,to the automation of power management. Recent studies showthat building operations (such as lighting, Heating, Ventilationand Air Conditioning (HVAC)) represent around 40% of thetotal energy consumption in the United States [30]. It iswidely believed that controlling these operations effectivelycan reduce energy consumption from 30% up to 70%. Wirelesstechnology is highly promising, since its deployment costs

Manuscript received March 18, 2013; revised September 23, 2013; acceptedOctober 2, 2013. Date of publication December xx, 20xx; Date of currentversion xx xx, 20xx. This work was supported in part by TerraSwarm, oneof six centers of STARnet, a Semiconductor Research Corporation programsponsored by MARCO and DARPA.

A. Puggelli and A. L. Sangiovanni-Vincentelli are with theUniversity of California at Berkeley, Berkeley, CA - USA (email:puggelli,[email protected])

M. M. R. Mozumdar is with the California State University Long Beach,Long Beach, CA - USA (email: [email protected])

L. Lavagno is with the Politecnico di Torino, Torino, Italy (email:[email protected])

Digital Object Identifier xx.xxxx/JSYST.20xx.xxxxxxxx

are substantially lower than the ones associated with a wiredsolution, and since it is flexible enough to accommodatechanges in the building usage, which are common over itslife-cycle.

To reduce the energy consumed by the building stock, bothnew constructions and existing buildings must be equippedwith control solutions that increase the building energy ef-ficiency. From the BAS perspective, these solutions are com-bined with optimal architecture design (for the sensor-actuatornetwork) and the use of advanced control algorithms that,based on measurements collected by sensors, compute anoptimal control policy and send commands to actuators. Thus,the sensor-actuator network is a key element of buildingautomation systems. The selection of an optimal networkis driven by several metrics such as cost, network lifetime,throughput, and also the resiliency to sudden failures in thenetwork architecture.

Designing efficient WSN-based solutions for building au-tomation is a complex task, and we expect that multi-disciplinary teams will be involved in specifying, designing,implementing, deploying and maintaining them. These teamscould involve architects as well as civil, electronics andtelecommunication engineers, all with a common goal ofsharing a unified representation of the network design, in orderto optimize sensing, actuation, communication, power supply,maintenance access and so on.

In order to support the rapid design, prototyping and de-ployment of WSN for BAS applications, we aim to developa design framework that provides rich interfaces to captureinputs from designers with different fields of expertise, and atool chain that processes these inputs and guides towards ro-bust solutions. Along this path, tools and methodologies havebeen developed for the modeling, simulation and automaticcode generation of WSN applications [3], [4], [5].

In this paper, we present a graphical tool to support thedesign exploration and synthesis of network topology, i.e. thelocations of nodes. An optimal topology should guarantee con-nectivity and support all functional requirements (e.g., latency,throughput, etc.), while optimizing several metrics such ascost, network lifetime, resiliency and others. The tool allowsthe designer to specify the location of the network end-devices(e.g., sensors, actuators and gateways) on a 2D schematicof the floor plan, and to enter quantitative parameters tocapture the node behavior (e.g., bit rate, transmission power,etc.). Moreover, the tool provides interfaces to specify thecharacteristics of the network stack such as the behavior of

0000–0000/00$00.00 c© 2013 IEEE

2 IEEE SYSTEMS JOURNAL, VOL. X, NO. X, DECEMBER 20XX

the routing protocol. To take environment effects into account,our tool contains models of physical channels and obstacles(e.g., walls). After collecting these data, the tool can guideusers towards an optimal placement of network relay-nodes(e.g., routers). Iterative refinements of the placement are alsoproposed when the users enter new data.

The tool facilitates users by reducing design time and byimproving the quality of the network topology with respect toa simulation-based approach, in which designers have to simu-late several different topologies and select the most performingone, with no guarantee of optimality. Based on user-definedrequirements, our tool proposes an initial solution, and thenusers can tune it iteratively to increase network robustness.Moreover, we identify common configuration parameters (e.g.,propagation loss coefficients for an indoor scenarios) forwireless BAS design and make them available to users in sucha way that both novice and advanced users can employ theirexpertise and knowledge to develop robust design solution, byeither using our built-in library of models and protocols, orby tuning its parameters.

This paper extends our work described in [1]. In particular,we extend its features and present a detailed case study todesign a multi-hop network that is based on a hierarchicalrouting protocol. We validate and analyze the designed sensornetwork by modeling and simulating it using a network simu-lator (OPNET [31]). Results confirm that the designed networkhas high throughput, consumes energy efficiently and meetsall required specifications. We provide details on how on-sitepropagation loss measurements can be entered in our tool toincrease its accuracy in modeling of the wireless medium andpropose a modified mathematical formulation of the networksynthesis problem, which removes possible ambiguous casesnot considered in [1]. Moreover, we elaborate the whole designflow so that the reader can have a better understanding of theproposed solutions for network synthesis and robust design.

The rest of the paper is organized as follows. We discussrelated works on strategies for network synthesis for BAS inSection II. In Section III, we give some background on WSN-oriented routing algorithms. Section IV describes the proposedtool and how it supports the design flow of a WSN. In Sec-tion V, we show details on the synthesis problem formulation,and we propose algorithms to solve it. In Section VI, we showa complete case study where a network is synthesized usingthe proposed tool and its performance analyzed using OPNET.Final conclusions are drawn in Section VII.

II. RELATED WORK

The problem of network synthesis has already been ad-dressed in the past [6], [16], [17], [18], [19], [20], [21], [22]and it is still an active topic of research despite the existence ofthe first industrial tools [24], [25]. These works propose severalalgorithms to guarantee field coverage and network connectiv-ity for indoor and outdoor applications, both in open field andin the presence of obstacles. Contrarily to these works, whichconsider networks made only of sensors relaying data to agateway, we consider heterogeneous networks, made of end-devices (sensors and actuators) and routers. We assume that

end-device locations are predefined and fixed, since in BASapplications end-device density is often standardized (e.g.,fire alarm sensors), and full sensing coverage is usually notrequired (e.g., HVAC systems) [7]. Our goal is to determineoptimal locations for the routers.

In [9], [10], the authors present a design tool for the auto-mated synthesis of WSNs satisfying connectivity and Qualityof Service (QoS) constraints on the functional requirements,e.g., network bandwidth, latency and packet-loss rate. Thevery general synthesis algorithm presented in [9] is basedon a Mixed-Integer Linear Program (MILP). The frameworkproposed in [9] allows also the introduction of specific ad hocalgorithms for particular domains. A possible strategy to makethe MILP approach scalable is to decompose the synthesisproblem into an optimal number of local sub-problems [10].The obtained results can be close to the globally optimalsolution (albeit it is not possible to guarantee it or to givea tight bound of the distance to the optimal solution) becausemost BAS networks indeed have a structure with mostlylocal interconnections. Our framework treats QoS as a set ofconstraints for the synthesis problem, and it implements poly-nomial time heuristics to find a locally optimal solution. Wediffer from previous work, because our proposed algorithmscan synthesize network structures that are much more generalthan the ones analyzed in [10], and in a much shorter time withrespect to[9]. Moreover, we optimize the synthesized networkwith the specific goal of increasing its resiliency to faults andreducing its power consumption in order to extend battery life.

Network resiliency is a fundamental property, both to in-crease the effectiveness of the provided service and to lowermaintenance costs. In [11], network lifetime is extended bymaximizing the time before the first device exhausts its battery.On the other hand, resiliency depends not only on devicelifetime but also on other factors, such as node failuresand the quality of the transmission links. Since it is verydifficult to thoroughly account for these factors at design time,network resiliency can be increased by adding redundancy toit [12]. Our tool increases network resiliency by augmentingthe network with redundant paths, along which packets canbe routed when the main path becomes faulty, at a minimalpenalty in terms of extra dissipated power.

The authors of [12] propose a set of polynomial timealgorithms for the synthesis of robust networks. While thesealgorithms select redundant paths only based on connectivity,we propose to synthesize redundant paths based on the pre-dicted behavior of the Routing Algorithms (RAs) that operatein the WSN. RAs route packets based not only on connectivitybut also on the data traffic patterns, and they rank pathsaccording to metrics across the Open Systems Interconnection(OSI) layers. In particular, one of the core contributions ofthe paper is the introduction of network-synthesis algorithmsthat allow designers to model most traffic patterns that arecommonly supported by WSNs (e.g., unicast, multicast, peer-to-peer, mobile nodes) [7]: the algorithms place routers alongthe shortest paths from sources to destinations, by rankingpaths according to the same metrics used in WSN-orientedRAs [27]. Since wireless transmission is the major source ofpower consumption in a WSN [28], a synthesis flow based

PUGGELLI et al.: ROUTING-AWARE DESIGN OF INDOOR WIRELESS SENSOR NETWORKS USING AN INTERACTIVE TOOL 3

on the emulation of the behavior of RAs also reduces thenetwork power consumption: it minimizes the total numberof hops of the wireless transmission, and it increases the linkquality along the paths, so that fewer transmissions (and re-transmissions) are needed. Moreover, our algorithms take QoSconstraints into account, and we propose heuristics whosecomplexity is lower than the one reported in [12].

In Section V-D, we will qualitatively compare the proposedsynthesis strategies with several works reported in this section,in terms of optimality of the generated solution, flexibilityof the approach and scalability of the synthesis algorithm tolarger networks.

We conclude this section by pointing out that other ap-proaches exist to achieve the goal of reducing network powerconsumption and extend its lifetime. These range from im-proving the hardware performance at the device level (e.g.,more efficient transmitter and receivers) and advanced node-scheduling strategies to balance the sleeping time amongnodes [13], [14], [15], [23] to optimized algorithms at theapplication level, where, for example, fewer data need to betransmitted while maintaining the same performance from theuser perspective [26]. The interested reader is referred to thesereferences for more details on the topic.

III. BACKGROUND

In order to motivate several choices that led to the finalimplementation of our tool, we now briefly describe themost commonly used traffic patterns that RAs for buildingapplications should support [7], and some of the guidelinesfor setting path-ranking cost functions [27].

The large variety of BAS and the severe constraints onpower consumption suggest the use of heterogeneous trafficpatterns to route packets, so that each application can choosethe one that results in the best performance. The basic trafficpattern to be supported is gateway/end-device unicast, sinceeach device needs to communicate with the gateway duringits lifetime. In principle, unicast is able to guarantee thefunctionality of most applications. On the other hand, a largeamount of power and computation resources can be saved withthe use of multicast and Peer-to-Peer (P2P) communication.Multicast allows a packet to be transmitted only once, whilereaching several destinations, thanks to the shared nature ofthe wireless link. P2P communication is particularly suitablefor applications in which local control is enough to guaranteethe desired performance (e.g., HVAC, lighting control): P2Prelaxes requirements on network delay, and it usually results inless power consumption, since fewer hops need to be traversedto process the data. Finally, RAs should also support mobiledevices (e.g., remote controllers): this capability reduces thenumber of required end-devices, and it might be required forsome applications (e.g., health monitoring).

Every RA ranks possible paths from source to destinationaccording to some predefined cost function. As suggestedin [27], RAs for WSNs should simultaneously minimize thenumber of hops from source to destination (at the networklayer of the OSI model), and maximize the quality of the linksalong the path (at the MAC and PHY layers). In the following,

Fig. 1. Work-flow of the tool

the link quality is evaluated in terms of the estimated Propa-gation Loss (PL) between two devices: even if this metric issubject to large variations in real scenarios, it is widely usedin RAs to rank paths because it can be easily computed onthe device (e.g., using the Received Signal Strength Indicator(RSSI), and knowing the transmitted power) [29]. Finally,nodes should be allowed to assert their willingness to routetraffic: battery-powered devices might refuse to route packetsif the traffic routed through them substantially reduces theirlifetime.

IV. DESIGN FLOW

In this section, we present the design flow of our tool, devel-oped using the Matlab GUI Development Environment [33].The workflow of the tool is shown in Figure 1.

In the Application Development phase, the application en-gineer is concerned with placing sensors and actuators wherethey are needed, and with defining the traffic patterns thatregulate the flow of data among the nodes. The tool allowsone to upload a 2D floor plan of the environment, where end-devices (sensors/actuators) and routers can be placed simplyby clicking on the floor plan area. The users can specifyor load from the Parameter Library: 1) the floor plan andsize; 2) the channel modeling parameters (i.e. transmissionand reception power/gain, radio frequency, wall loss); 3) thedesired level of redundancy and QoS requirements, expressedin terms of network bandwidth, latency and Bit-Error Rate(BER) [8], and; 4) the traffic patterns (peer-to-peer, unicast,multi-cast) between different types of nodes. For example,peer-to-peer communication can be set by entering the indicesof the source-destination pair nodes, while a set of end-devices that communicate via multicast can be graphicallyselected by highlighting the floor plan area surrounding them.In general, nodes can be assigned to more than one trafficpattern. Moreover, our tool can model mobile end devicesfor which users need to configure the trajectory by selectingmultiple waypoints.

After specifying the BAS requirements and the parametersrelated to wireless networks, the tool synthesizes a tentative

4 IEEE SYSTEMS JOURNAL, VOL. X, NO. X, DECEMBER 20XX

layout of the network with the desired level of redundancy andQoS. At this step, errors may occur because the tool modelsthe quality of the wireless link using Free-Space (FS) andMulti-Wall (MW) propagation models [34], and it assigns adefault value of bit rate to nodes. Nevertheless, the designedtopology represents a good starting point for the subsequentrefinement steps, which will require more information fromthe designers.

In the Network Analysis and Synthesis phase, the commu-nication engineer can refine the design of the network byadding information that guides the synthesis flow towards amore accurate result. First, the actual bit rate for each pathcan be added (including header sizes down to the MAC layer,if this information is available) to properly account for powerdissipation in the network. Network synthesis can be run afteradding this information. Based on the result of the previousstep, the synthesis algorithm first tries to incrementally rerouteonly those paths whose bit rate has increased: in this way, theoptimized network is only perturbed where it is needed, andresults are produced in a short time; if the incremental stepdoes not work, all paths are rerouted to obtain a valid network.

Secondly, all valid paths are processed to measure thepower consumption of the network devices. The results of theanalysis are shown graphically by changing the color of thenodes according to a color scale (e.g., red for nodes with highpower consumption). The designer can mark some routers tobe main-power supplied (i.e. the algorithm disables the powercheck for them), duplicate some routers to achieve a betterpower balancing across the network, and change the locationof some routers: user-entered routers are marked to be thepreferred choices to route paths in the subsequent steps ofsynthesis.

Finally, a Site Survey is usually required to correctly eval-uate the characteristics of the network working environment.Our framework gives the capability of integrating data col-lected during the site-survey, and to adjust the design ofthe WSN, thus combining at synthesis time the flexibility ofpropagation models to the accuracy of measurements [35].

At the network level, the field engineer can input in thetool accurate values for the parameters of the FS and MWpropagation models, determined through measurements. At thesingle link level, the tool can store measured values of PLinto a Link Status Database. The database becomes importantbecause it is difficult to fit the model parameters so that allthe PL estimations are correct, due to the heterogeneity of theenvironment.

More accurate models of the BAS (e.g., [37]) and of itsenvironment might result in better predictions, at the cost ofincreased computational and field data collection complexity.We instead opted for using simple models in the first steps ofsynthesis, and to refine the design when on-field measurementsare available. First, the PL for each link synthesized in theprevious steps should be measured and stored in the database.Second, the synthesis is run again, and the tool adjusts thenetwork topology, by taking the new information into account.A few measurement iterations might be needed if the algorithmroutes paths through different routers with respect to theprevious step, since the quality of the new links might need

to be assessed. However, we will show in Section V thatthe number of measurements needed is roughly linear in thenetwork size, so data collection is simplified, and the databasecan be efficiently processed.

V. NETWORK SYNTHESIS

We cast the synthesis problem for resilient and powerefficient WSNs into an optimization problem, formally definedas follows:

Problem Statement. Given: 1) a set D of end-devices(sensors, actuators and a base station BS), and a set Rof pre-defined fixed routers with their locations; 2) a setof source-destination pairs Q = q=(s, d) | s, d ∈ D withthe associated bit rate rq , where Q is partitioned in Q =Quni ∪ Qmulti ∪ Qmob ∪ Qp2p to differentiate among trafficpatterns; 3) for each path q ∈ Q, a desired number mof redundant replicas, a maximum latency Lq and bit-errorrate BERq , and; 4) a maximum bandwidth BW , input fan-in IN and average power consumption PC sustainable byevery node. Compute the set AR of Additional Routers andtheir corresponding locations that minimizes network powerconsumption subject to guaranteeing the connectivity and QoSof m redundant paths ∀q ∈ Q.

In our implementation, the set Q is partitioned manuallyduring the Application Development phase, as described inSection IV. In particular, paths p ∈ Qmulti are clustered in(possibly overlapping) Multicast Groups (MG), where a localBase Station (BS) sends each packet to more than one node.In an MG, the same messages are transmitted along all paths,so we set rq = rMG ∀q ∈MG.

In this section, we propose two algorithms to solve theabove optimization problem. Both algorithms initially pop-ulate the floor plan with a set VR of virtual routers, i.e.potential locations for routers to be added to the network. Inour implementation, VRs are uniformly distributed over thefloor plan at discrete locations on a grid. Indeed, most non-pathological networks can be synthesized if W = m ·

(AAc

)virtual routers are placed with this pattern, where A is thetotal area of the facility, and Ac is an estimate of the routerconnectivity area. Other approaches have been proposed inthe literature (e.g., [10]) to place VRs only at locationsthat are most promising for final deployment (e.g., closeto walls). These approaches could be seamlessly integratedin our framework without changing the overall flow, shouldexperimentation suggest it. The synthesis algorithms thenselect the set AR ⊆ VR to optimize for power consumption,while satisfying all constraints.

The algorithms are different from one another because theytrade-off the optimality of the solution with running time. InSection V-A, we formulate the synthesis problem in terms ofa MILP, which returns the globally optimal network topology.On the other hand, it is known that the execution time ofalgorithms for the solution of MILPs is not polynomiallybounded, so solving them is not in general computationallyefficient. High running times have been reported even forthe synthesis of small networks (∼ 30 end-devices) [9].During the network design cycle, a faster response time from

PUGGELLI et al.: ROUTING-AWARE DESIGN OF INDOOR WIRELESS SENSOR NETWORKS USING AN INTERACTIVE TOOL 5

minr,w,x,y,z

P = α∑

i (pi · xi) + β ·(eRXij + eTX

ij

)·[∑

q,k

∑i,j

(yq,kij · r

q,kij

)+∑

MG,k

∑i,j

(zMG,kij · rMG

)]s.t. (Topological)1) Cyq,k = bq, ∀q ∈ Q,∀k2)

∑mk=1

(yq,kij

)− 1 ≤ 0, ∀i, j ∈ C, ∀q ∈ Q

3) xi + xj − 2yq,kij ≥ 0, ∀i, j ∈ C,∀q ∈ Q,∀k4) wij − yq,kij ≥ 0, ∀i, j ∈ C,∀q ∈ Qmulti,∀k5)

∑i wij ≤ IN, ∀j ∈ C

(Power Accounting)6) rq,kij = rq , ∀i, j ∈ C, ∀q ∈ Q \Qmulti,∀k7)

∑q∈MG y

q,kij ≤ B · z

MG,kij , ∀i, j ∈ C,∀MG ∈ Qmulti,∀k

8) pj + eRXij ·

[∑MG,k

(zMG,kij · rMG

)+∑

q,k

∑i

(yq,kij · r

q,kij

)]. . .

+eTXji ·

[∑MG,k

(zMG,kji · rMG

)+∑

q,k

∑i y

q,kji · r

q,kji

]≤ PC, ∀vrj ∈ V R

(QoS)9)

∑MG,k

(zMG,kij · rMG

)+∑

q,k

(yq,kij · r

q,kij

)≤ BW, ∀i, j ∈ C

10)∑

ij yq,kij · lij ≤ Lq, ∀q ∈ Q,∀k

11)∑

ij yq,kij · log (1− bij) ≥ log (1−BERq) , ∀q ∈ Q,∀k

12) xi, wij , yq,kij , z

MG,kij ∈ 0, 1 , rq,kij ≥ 0 ∀i, j ∈ C,∀q ∈ Q,∀MG ∈ Qmulti,∀k

the tool could be desired because new data (e.g., from SiteSurvey ) may be available incrementally, and to try multipledifferent solutions (e.g., different communication protocols,which result in different bit rates). To address this problem,we propose in Section V-B a polynomial-time heuristic thatsynthesizes the network in a shorter time, at the expense ofreturning a (possibly) sub-optimal solution. The user can selectthe synthesis algorithm that is most suitable for the ongoingdesign stage. For example, in the case studied presentedin [1], we first run the MILP-based synthesis to get a goodinitial design; we then run fast heuristic-based syntheses tolocally tune the topology while adding information during theNetwork Analysis and Synthesis and Site Survey phases. Weconcluded the design by running again a MILP-based synthesisto further improve performance. A similar approach is usedalso in the case study presented in Section VI.

A. MILP-based Synthesis

The MILP representation is based on the one proposedin [9], but we modify it to model the power consumptionof data traffic patterns, and to add redundancy to the net-work. We interpret the network as a graph, where verticesrepresent devices and edges represent connection betweendevices, established based on the FS and the MW propagationmodels. A preprocessing step computes the incidence matrixC of the network. Each device is associated to a row ofC, and each column represents a connection. The elementcij = 1 (cij = −1) if connection j exits (enters) devicei. If the link is bidirectional, we add two rows to C. Thealgorithm then enriches the network with a set of virtualrouters VRs, positioned on an equally-spaced grid, and updatesC appropriately. Each vr ∈ VR is assigned a Boolean variable

xi, whose value represents whether the router is installed ornot in the synthesized network. The network is now formedby nodes n ∈ N = D ∪ R ∪ VR. Each edge in the networkgraph is assigned m · |Q| Boolean variables yq,kij for k = 1

to m, ∀q ∈ Q: yq,kij is true if the edge (ni, nj) is alongthe kth replica of path q ∈ Q. Moreover, each edge is alsoassigned a variable wij , which is set to true if any pathq ∈ Q uses that link. In order to correctly compute the powerconsumed in transmission, we associate to each variable yq,kij

a variable rq,kij , which models the bit rate of the transmissionthrough the link (ni, nj) along the kth replica of path q. Thecorrect computation of rq,kij for each link in the network isfundamental to compute the energy consumption of each node.For a path q ∈ Q \ Qmulti, we set rq,kij = rq . On the otherhand, for each Multicast Group (MG) ∈ Qmulti, the followingequality holds: ∑

q∈MG

rq,kij · yq,kij = rMG · zMG,k

ij (1)

where zMG,kij = 0, 1. Equation (1) sets the bit-rate to be

either null, if the link is not used by any path in the MG, or tosaturate to rMG, no matter how many paths in the MG use thatlink. The Left-Hand Side (LHS) of Equation (1) is not linear,so this quantity cannot be added to the MILP formulationto account for the energy consumption. To overcome thisproblem, in the MILP formulation above we will substitute theLHS with the Right-HS, which is linear (see the cost functionand Constraints 8− 9). The correct value of zMG,k

ij can thenbe assigned by adding the constraint∑

q∈MG

yq,kij ≤ B · zMG,kij

6 IEEE SYSTEMS JOURNAL, VOL. X, NO. X, DECEMBER 20XX

where B is a big number (e.g., B = |MG|), so that zMG,kij = 1

only if the link is used at least by one path in the MG.A path (s, d) ∈ Q is connected if there exist a solution to the

equation Cy = b, where b [s] = −1,b [d] = 1,b [j 6= s, d] =0. The Topological constraints enforce that:• m replicas ∀q ∈ Q are connected (1),• the m replicas are all disjoint (2) (an edge can be picked

at most once, when routing the m replicas of path q ∈ Q),• routers are installed, if they are used (3), and• each node has a limit on the maximum fan-in (4− 5).

The Topological constraints route all paths as if they were uni-cast paths. We add Power Accounting constraints to correctlydifferentiate among data traffic patterns. In Constraint (6),unicast, P2P and mobile paths are assigned an input bit rate:for the mobile paths, this assignment corresponds to a worstcase scenario. Constraint (7) sets the value of zMG,k

ij foreach link, so that the bit-rate through the link is boundedby a constant even though multiple paths belonging to thesame MG are routed through it: this constraint models thesharing of the wireless medium. Constraint (8) then limits themaximum average power consumption of a node. The constantpj is the fixed power consumption (standby and processing) ofthe router; eTX

ij and eRXij is the energy consumed to transmit

and receive a bit over the link (ni, nj), respectively (eTX andeRX depend on the link quality and they are computed ∀i, jin a preprocessing step). This constraint can be interpretedas the willingness of a router to route packets, and it setsa lower bound on the device lifetime. Finally, in order tosynthesize a working WSN, we also need to guarantee somelevel of QoS in the network. Constraint (9) limits the sumof the bit rates to be transmitted across a link to the linkbandwidth; Constraints (10− 11) limit the maximum latencyand the maximum BER of a path, where lij (bij) is the latency(BER) across the edge (ni, nj).

The cost function is made of two components. The first onerepresents the fixed power consumption of the routers; thesecond one represents the total power dissipated in transmis-sion. The two components of the cost function are weightedby constants α and β (α+ β = 1), in order to explore dif-ferent regions of the optimization space. While fixed powerconsumption increases linearly with the number of routers,this penalty might be balanced by savings in power consumedin transmission, because more routers connect the networkmore effectively. Finally, we note that minimizing for poweralso enables the correct assignment of multicast paths, sincemulticast transmission is more power efficient than the unicastcounterpart (constraint 9).

The algorithm returns the set AR = vri ∈ V R | xi = 1.

B. Heuristic-based Synthesis

In this section, we propose a polynomial time algorithmwhose output result satisfies the same constraints enforcedin the MILP. Moreover, the returned solution is close-to-optimal if the network has mostly local interconnections, as itcommonly happens in BAS applications [10]. The incidencematrix C allows us to represent the network as a graph:paths among nodes can now be computed using shortest path

Algorithm 1. Synthesis of Power-optimized WSNs

1: Given Sets of end-devices D, routers R, virtual routersVR

2: Input Incidence matrix C, set Q of pairs (s, d), redun-dancy m, QoS requirements (bandwidth, latency, BER)

3: Output Set of synthesized paths P4: //Process paths with unicast/P2P/mobile traffic pattern.5: for k = 1 to |Quni|+ |Qp2p|+ |Qmob| do6: Ck ← disconnect end devices(C, qk)7: for j = 1 to m do8:

[pjk, conn

]← Dijkstra(Ck, sk, dk)

9: P ← P ∪ pjk10: Ck ← disconnect path

(Ck, p

j−1k

)11: //Process paths with multicast traffic pattern.12: for l = 1 to #MG do13: for j = 1 to m do14:

[P jmulti, conn

]← Dijkstra(C,BSl,MGl)

15: P jmulti ← sort paths

(P jmulti

)16: for k = 2 to |MGl| do17: C ← set path cost to 0

(C,P j

multi [k − 1])

18: P jmulti [k]← Dijkstra(C, sk, BS)

19: P ← P ∪ P jmulti

20: C ← disconnect paths(C,P j

multi

)21: [BW,PC, IN ]← path accounting(P )22: P ← reroute shortest paths(C,P,BW,PC, IN)23: return(P )

algorithms. In fact, RAs use shortest path algorithms to routepackets: we emulate their behavior, as if they were to be runin a network populated also by VRs. Moreover, shortest pathsminimize the number of hops and maximize the quality ofthe transmission, so less power is consumed in transmission.After all paths are routed, all the VRs that appear along atleast one of the paths are collected in the set AR, and theresulting network satisfies all constraints.

We assume in the following that matrix C is sparse, dueto the limited connectivity range of wireless devices. Hencein most practical cases C has O (|N |) non-zero entries. Thisconfirms that only O (|N |) measurements need to be taken dur-ing the Site Survey to characterize it, as argued in Section IV.Edges are assigned a weight, in the range [1− 4], to representtheir Link Quality (LQ) (a low value represents high LQ).The weights are computed by estimating the link path lossusing FS and MW models. We then use a modified versionof the Dijkstra algorithm to route paths. The cost functionC = f (#H,LQ) ranks paths according to the number of hops(#H) to the destination, and the LQ of each hop, followingthe indications in Section III. Moreover, edges entering user-defined routers (r ∈ R) are heuristically counted as a half hop,so they are the preferred choice to route paths, with respectto VRs.

Algorithm 1 shows how paths are calculated in our im-

PUGGELLI et al.: ROUTING-AWARE DESIGN OF INDOOR WIRELESS SENSOR NETWORKS USING AN INTERACTIVE TOOL 7

plementation. As far as routing is concerned, unicast, P2Pand mobile traffic patterns are treated in the same way (lines4− 10). For mobile nodes, the area Am in which they can bemoved is divided into s =

(Am

Ac

)sections, and a path is routed

from the center of each section to the destination. The algo-rithm processes one path at a time: first, it disconnects fromC all edges entering end-devices (apart from the destination),since no paths can be routed through them; second, it traversesthe graph from source to destination. Since we aim at routingm independent replicas ∀q ∈ Q, at each iteration of the innerloop (line 7) the algorithm disconnects from the graph the paththat has just been computed (line 10). The following iterationwill thus find a path that is completely independent from theprevious ones. The complexity of this part of the algorithm isO (m · |Q| · |N | · log (|N |)).

The algorithm presented above would not generate acceptableresults when modeling multicast traffic, since it synthesizes aset of unicast paths from the BS to all the nodes of the MG,which results in a waste of power. Since in multicast severalnodes can be reached with a single packet transmission, nomore power is dissipated if we connect an end-node to a routerthat has already been selected. We thus aim at determiningthe smallest set of VRs that is capable of connecting theMG to the BS: since each router only transmits once, theoverall power consumption is minimized. Lines 12 − 20in Algorithm 1 present an O

(#MG ·m · |N |2 · log (|N |)

)approach to achieve this goal. MGs are processed one at atime. Pmulti is the set of paths from the BS to each nodein the MG (line 14). At line 15, the elements of Pmulti aresorted according to the cost to get to the BS. Paths are thenprocessed in increasing order of cost: the path from the BS tothe node with the least cost is taken, since that is the shortestpath to get to the MG. The key point of the algorithm is thatthe cost of the first path can now be set to 0: if any othernode chooses that path, no more power is consumed due tomulticast propagation. The second least costly path of the setis then rerouted, and the newly obtained path replaces the oldone in Pmulti, since its cost is less or equal (line 18). Thisprocess is then iterated for each path of the set. Finally, theroutine is iterated m times (line 13), in order to generate thedesired level of redundancy.

While computing paths, the algorithm also checks whetherthe solution satisfies path-related QoS constraints, which area function of the path cost (maximum latency and BER arepassed to the Dijkstra routine as parameters). If any path doesnot satisfy all constraints, the algorithm returns an empty set ofpaths. When all paths are computed, the algorithm also checksconstraints on link maximum bandwidth, and device maximumpower consumption and in-degree (line 21). Even if some ofthese constraints are not fulfilled, an acceptable solution maystill be obtained simply by ripping-up and rerouting some ofthe paths in excess through other nodes in the graph [38]. Inparticular, the algorithm selects the paths to be rerouted bysorting them in terms of cost, and by rerouting the ones withthe lowest cost (line 22), since those are more likely to fulfillall constraints also after rerouting. Constraints are checkedonce again after rerouting: if the network still does not satisfy

them, the algorithm returns failure.At the beginning of the section, we argued that the user

can use the two synthesis algorithms interchangeably, de-pending on the ongoing design phase. However, the MILP-based algorithm is more flexible, since it is able to exploredifferent regions of the design space by tuning parameters αand β, while the heuristic one, as it has been presented sofar, always returns the same network topology. Consequently,when switching from one synthesis algorithm to the other,the heuristics could return an unnecessarily perturbed networktopology, if it is not able to emulate the MILP parametertuning. To partially overcome these problems, we present inthe following paragraph four synthesis strategies that can bepursued with the heuristics algorithm to emulate the tuning ofthe MILP parameters α and β.

1) A synthesis strategy equivalent to β > α is obtainedby populating the network with all W candidate VRs.The resulted network has lower transmission powerconsumption, since a tailored path is synthesized foreach end-device, but higher fixed power consumption,since there is less sharing of VRs among different paths.

2) In a second synthesis strategy, the network is popu-lated with few VRs at the beginning (lower effectiveW , Weff <W ), and the number of VRs (Weff ) isincrementally increased every time Algorithm 1 returnswith a failure. In order to limit the number of itera-tions, Weff is increased exponentially, for a total ofO (log (W )) iterations. This strategy is equivalent toβ < α, since the algorithm finds a solution with fewerrouters than the previous strategy, but more power isspent in transmission, since paths are made of more hopswith worse link quality.

3) Instead of adding fewer VRs to C before synthesizingthe network, the algorithm can produce results consistentwith the ones obtained by setting β < α in the MILPalso by disconnecting as many VRs as possible afterthe synthesis, and checking that all constraints are stillsatisfied. In this third strategy, VRs are sorted in termsof transmission power consumption after running Algo-rithm 1; the routine then tries to disconnect them usinga binary search, starting with the least used. The binarysearch results in a logarithmic number of iterations, soit makes the strategy computationally practical.

4) Finally, a fourth possible strategy combines the in-cremental addition of VRs and the post-processing ofthe synthesized network: this is equivalent to settingβ << α.

All strategies have been implemented, and the designer canuse the above guidelines to choose among them, dependingon the desired result.

C. Algorithm Benchmarking

In order to benchmark the implemented algorithms, we syn-thesized several different instances of the network presentedin Section VI, while varying the number of end-devices (D).In all examples, we first run the MILP-based synthesis toget a starting point for the design; after adding measurement

8 IEEE SYSTEMS JOURNAL, VOL. X, NO. X, DECEMBER 20XX

TABLE IPERFORMANCE OF THE SYNTHESIS ALGORITHMS

Input MILP (α = 0) First Strategy MILP (α = 0.6) Second Strategy|D| T[s] Final #H LQ T[s] Final #H LQ T[s] Final #H LQ T[s] Final Weff #H LQ25 1980 28 2 2.47 6.8 29 2.16 2.75 1960 19 2.3 2.85 0.82 20 64 2.4 3.230 2590 37 1.9 2.43 9.4 37 2.1 2.65 2630 26 2.37 2.7 1.4 26 64 2.5 350 3582 53 2.23 2.38 20 55 2.38 2.7 3512 40 2.62 2.8 2.83 39 64 2.76 3.11

Average 2717 39 2.04 2.42 12 40 2.21 2.7 2700 28 2.43 2.8 1.68 28 64 2.55 3.175 TO - - - 28 128 2.6 2.7 TO - - - 52 128 256 2.6 2.7100 TO - - - 95 77 2.6 3 TO - - - 25 39 128 3 3.2

results, we run both the MILP-based and the heuristic-basedsyntheses to compare their performance. We solved the MILP-based synthesis problems using the Matlab API functionsto LPsolve [39]. The values for p, eRX , eTX were takenfrom measurements reported in [40]. We also synthesizedthe network using all four strategies of the heuristic-basedalgorithm. The first, second and third strategies returnedtopologies similar to the ones obtained after solving the MILPfor α = 0/0.6/0.45, respectively. These values of parameterα show that the strategies are tailored to the synthesis ofnetworks where transmission power is higher than standby andcomputation power. The fourth strategy returns results similarto the second one because the fewer added routers are allnecessary to guarantee connectivity, so it will not be furtherconsidered in the following.

Table I summarizes the results in terms of computation time(T) (on an Intel T7300 2GHz, 2GB of RAM), number of finalrouters, average number of hops per path (H), and average linkquality in the synthesized network (LQ). The value of Weff

is also reported for the second strategy, which incrementallyincreases it. The last row summarizes the average performancein bold. We only report results obtained for α = 0 (α = 0.6)to be compared with the first (second) strategy, due to spacelimitations. The MILP-based synthesis outputs a network with5% (8%) fewer hops and 11% (10%) better LQ, on average,with respect to the first (second) strategy. On the other hand,it is able to synthesize networks only up to 50 devices withinthe one hour Time-Out (TO) that we set, while all polynomialtime synthesis strategies finish within tens of seconds.

Overall, experiments show that the heuristic-based approachis able to return close-to-optimal results in a short time,thus enabling an interactive usage of the tool. Enhancedperformance can then be obtained by running a final MILP-based synthesis.

D. Comparison with the State-of-the-Art

In this section, we qualitatively compare the performanceof the proposed algorithms to several algorithms proposedin the literature, as introduced in Section II. The results ofthis comparison are summarized in Table V-C, which reportsfrom line 2 to 6: 1) the algorithmic approach used to solvethe synthesis problem; 2) how many space dimensions thealgorithm can handle; 3) whether the algorithm is capable offinding the optimal solution of the synthesis problem or justreports an approximation; 4) the flexibility of the approach,intended as a metric on how easily the algorithms can be

augmented or modified to take more constraints or a differentcost function into account, and; 5) whether the runtime of thepresented implementations of the algorithms scales graciouslywhile increasing the size of the network to be synthesized.

The works reported at the top of Table V-C aim to syn-thesize networks where only sensing coverage and networkconnectivity are guaranteed. The approach based on simulatedannealing [16] aims to stochastically swap in and out networknodes until a connected network with full coverage and a mini-mal number of nodes is found. This approach is not guaranteedto find the optimal solution, and the quality of the synthesizednetwork can be traded-off with the runtime by appropriatelychanging the cooling schedule. An arbitrary cost function canthen be used, thus guaranteeing flexibility during synthesis.The multi-objective genetic algorithm proposed in [19] giveshigh flexibility in setting up the cost function, but it is notguaranteed to find the optimal solution apart in the limit ofinfinite mutations. Moreover, the networks analyzed in thiswork have at most 9 nodes with running time in tens ofminutes, thus showing possible scalability issues. Researchersin [18] solve the coverage and sensing problem while takinginto account that sensors succeed in sensing and transmittingonly with a finite probability. Their greedy heuristics are notguaranteed to report the optimal solution, and they are tailoredto the specific problem, thus making it not trivial to extend thepropose framework. On the other hand, the low theoreticalcomplexity of this approach makes it suitable to scale to thesynthesis of large networks.

The works reported at the bottom of Table V-C aim toguarantee also some level of QoS and energy-awareness,while still enforcing network connectivity and sensing cov-erage. The approach based on a Mixed-Integer Non-LinearProgram [17] is very generic in its formulation and leadsto an optimal solution, but it can be solved efficiently onlyin a 1D scenario. The MILP formulation proposed in [9]partially relaxes this problem, thus enabling the synthesis alsoof 2D networks. On the other hand, we mention that therunning time of our heuristic-based algorithm is more thantwo orders of magnitude faster than the one reported in [9]for networks of comparable input size (30 end-devices). Thesynthesis tool proposed in [10] exploits the characteristics ofa Self Growing Neural Gas optimization algorithm to rapidlysynthesize networks with a topology particularly suitable toindoor scenarios, i.e., nodes are placed next to the walls. Onthe other hand, this approach seems hard to expand to genericnetwork topologies and it is not guaranteed to produce anoptimal solution in a finite time. Finally, the polynomial-timeroutines proposed in [12] are capable of rapidly synthesizing

PUGGELLI et al.: ROUTING-AWARE DESIGN OF INDOOR WIRELESS SENSOR NETWORKS USING AN INTERACTIVE TOOL 9

TABLE IIQUALITATIVE COMPARISON WITH STATE-OF-THE-ART SYNTHESIS ALGORITHMS

Ref. Algorithm Dimensions Optimality Flexibility ScalabilityCoverage and Connectivity[16] Simulated Annealing 3D X

√ √

[19] Genetic Algorithm 2D X√

X[18] Polynomial-time Heuristics 3D X

√X

Energy-Aware and QoS[17] MINLP 1D / 2D

√/ X

√ √/ X

[9] MILP 2D√ √

X[10] Self Growing Neural Gas 2D X X

[12] Polynomial-time Heuristics 2D X√ √

Ours MILP 2D√ √

XOurs Polynomial-time Heuristics 2D X

√ √

fairly generic networks, but they cannot guarantee optimalityin the solution. We note the runtime of our polynomial-time heuristics is longer than the one reported in [12], eventhough their theoretical complexity is lower. We think that thereasons for poorer performance are: 1) the algorithm in [12]does not take QoS constraints into account, so it performsfewer checks and it finds more quickly what it considers anacceptable solution, and; 2) Matlab code, which is used in ourimplementation, is not compiled but interpreted.

In conclusion, we argue that the key advantages of thesolution proposed in this paper are the availability in our toolof both an exact synthesis formulation and of fast approxi-mated synthesis routines, and the possibility of using theminterchangeably in different phases of the network design, asexemplified in the case study presented next.

VI. CASE STUDY OF DESIGNING INDOOR SENSORNETWORKS

To verify our tool and design methodology, we designed asensor network for our office. In the following sub-sectionswe first provide a brief overview of the routing algorithm thatwe modeled to guide the network synthesis; we then describehow we designed the sensor network using our tool; finally,we present simulation results obtained with OPNET, whichconfirm the robustness of the synthesized network to nodefailures.

A. Hierarchical WSN Architecture for Building Automationand Control Systems

The modeled routing algorithm is inspired to the onepresented in [2]: the algorithm implements gradient-basedrouting for collecting data and a label-switching table fordisseminating configuration commands, thereby supportingupstream and downstream data flows across the network. Thealgorithm assumes that the network architecture is organizedinto a hierarchy of components that include end devices, accesspoints and a base station. An end device is a sensor or anactuator. Each device has a floor and a room ID and is able tojoin the network through any access point on the same floor(in a star configuration), which also ensures in-network load

balancing. The requirement to join nodes on the same flooris due to the fact that most office buildings are divided intofloors that may be occupied by different companies, whoseheating and air conditioning is managed independently. Asensor node could be configured for periodic or thresholdcrossing reporting depending on the quantity to be measured(e.g temperature, light and occupancy).

An access point is part of the backbone network that isused for data collection and command routing. These devicescan be always on and capable of low power listening tominimize energy consumption. Each access point has a floorID and a network-wide unique ID. These devices permit end-devices to join the network and to send data to collectionpoints, to construct aggregated packets and to route them to thebase station. The base station uses access points to configuresensors and actuators.

A base station has wireless connections with access pointsand an Ethernet connection for LAN access. A base stationworks as a master and initiates the formation of the backbonenetwork. It collects the sensor data and logs them into adatabase, where they can be analyzed by a suitable controlalgorithm. There could be one or more base stations for thewhole system, depending on the network size.

The network is formed and activated by following a seriesof phases. First, the backbone network is formed. The basestation and the access points participate in this phase. Then,end devices join by connecting to the access points. Eachaccess point sends a report of the connected end devices to thebase station. The base station sends configuration commandsto activate/deactivate sensors and actuators. After activation,end-device sensors periodically report to the associated accesspoint node, which aggregates sensor data to construct a singlepacket that is routed to the base station.

The main purpose of the backbone network is to supportrouting of messages in the network. We use gradient-basedrouting to form the backbone. The formation of the backbonenetwork is initiated by the base station, which constructs andbroadcasts the Beacon Packet (BP). Access points that are inthe radio range of the base station receive the BP and set theirlevel to 1, and base station as their parent. An access pointalways broadcasts the BP after updating its level and/or parent

10 IEEE SYSTEMS JOURNAL, VOL. X, NO. X, DECEMBER 20XX

Fig. 2. The figure shows the GUI interface of the tool and the loaded floor plan, where end-devices and the base station have been placed.

value. When broadcasting, an access point node modifies theBP by incrementing the level by one, and by setting senderIDto its own ID. While broadcasting the BP, the node waits fora random time and uses a simple CSMA/CA protocol at theMAC layer to reduce collisions. This process of controlledflooding continues until the backbone network is formed.

A tributary network is then formed between access pointsand end devices. After power-up, each end-device constructsand broadcasts the EJRR (End-device Join Request Response)packet, which contains floorID, nodeID, packet type andgradient-level information. Any access point node after re-ceiving the EJRR packet checks the floorID. If the end-devicejoining request is coming from other floors it is ignored,otherwise it modifies the EJRR packet with its informationand then rebroadcasts it. An end-device might get multipleresponses from different access points, but it chooses theaccess point with the lowest gradient. Ties are broken choosingthe best link quality. After network formation, the base stationconfigures the end-devices to activate the desired sensors andtheir reporting interval. After receiving configuration com-mands, the end-devices start sending sensing data to the basestation based on these settings. The base station logs andanalyzes sensor reports and, if necessary, it sends commandsto the actuators based on application requirements. Details ofthe routing, network formation and maintenance are describedin [2].

B. Network Design

The floor plan of the office is shown in Figure 2. Weidentified 18 locations to collect report for temperature andlight. We allocated temperature sensors for some rooms andlight sensors for the corridor and the lounge (12 temperaturesensors, 6 light sensors). After identifying sensor locations, we

marked their positions on the 2D diagram shown in Figure 2.We then identified the location of the base station. Temperatureand light sensors communicate to the base station via unicast,which is the default traffic pattern. We set the propagationmodel to use the 2.4GHz frequency and used default valuesto rank link quality on a scale from 1 to 4 (as explainedin Section V-B). We also initially set the redundancy valuem = 1, and R = ∅, i.e. no initial routers preferences. Usingthe MILP formulation, the tool synthesizes a first layout ofthe network with the desired level of redundancy, and QoSrequirements, based on the information entered up to thispoint. At this step, some choices may need to be correctedbecause the tool modeled the quality of the wireless linkwith the free-space and multi-wall propagation models, andit assigned a default value of bit rate to nodes. Nevertheless,the output topology represented a good starting point for thesubsequent refinement steps, which required more informationfrom the designer. In the first synthesis, the tool added 14routers to meet the specifications.

As a first design refinement step, we added the actual bitrate for each node, by taking into consideration the MAClayer and considering packet headers. These data can beretrieved for each type of packet (e.g., beacon, EJRR) in [2].In our application, temperature and light sensor report every2 minutes. A new synthesis can be run after adding thisinformation. In particular, in the Network Synthesis phase,we used the heuristic synthesis algorithm, and the secondstrategy of populating the network with VRs, as describedin Section V-B. This choice minimizes the number of com-ponents and installation dollar cost of the network, at theexpense of higher maintenance costs, since each device willswitch the radio on more often and thus consume more batterypower. Based on the result of the previous step, the synthesis

PUGGELLI et al.: ROUTING-AWARE DESIGN OF INDOOR WIRELESS SENSOR NETWORKS USING AN INTERACTIVE TOOL 11

Fig. 3. The figure shows the measured and estimated values of PL for thetwo scenarios (top); the location in which we took the measurements (inset);the absolute error in the model (bottom).

Fig. 4. Non-Redundant network (redundancy = 1) - each end device hasat least one path towards the base station.

algorithm at first recalculates the load at each router and incase a router is overloaded, it splits the load by adding morerouters. In our case, 3 extra routers were added to cope withthese additional constraints.

As mentioned earlier, our tool has the capability to integratedata collected from the site survey to adjust the propagationmodel. To further refine the design, we took measurementsof the PL between two nodes, as a function of the distancebetween them, using TelosB nodes by Crossbow [36]. We con-sidered both a corridor scenario and a multi-room scenario. Forthe FS and MW models, we used the standard formulas [34].

PLFS = L0 + 10 · n · log (d) + Ωshadowing

PLMW = LFS + #W · LW + LW,0 + Ωshadowing

Figure 3 shows the measured (markers) and modeled (lines)values of PL, obtained from fitting (L0 = 37.6dB, n =2.2, LW = 3.2dB,LW,0 = 1.2dB, Ω∼N (0, 2.25dB)), whilekeeping the transmission power constant to PTX = 0dBm.The inset shows the part of the floor where we collected data

Fig. 5. Redundant network (redundancy = 2) - each end device has atleast two disjoint paths towards the base station.

using TelosB nodes. While most PL values are predicted bythe model with an error (ε) within ±2σΩ = ±3dB of theshadowing noise, a few values are very far (|εmax| = 9dB).Analyzing the data, we found that larger errors occur whenthe environmental conditions present discontinuities (e.g., thepresence of the hall at the end of the corridor in the insetof Figure 3). In order to correct these errors, we also tookmeasurements of the PL of all the links selected in the previoussynthesis step, and stored these data in the database.

Figure 4 shows the final layout of the network, obtainedafter two iterations of measurements. The algorithm added 2more routers (for a total of 19 routers), and it changed thelocation of three routers after taking into consideration themeasurements of the link quality.

Following the same steps, we also designed a redundantnetwork, with m = 2, for the same number of end devices.Now by setting redundancy equals to two, we enforce theconstraint that for each end-device node there should be atleast two disjoint paths towards the base station. Figure 5shows the designed redundant network, which includes 27router nodes.

C. Network Verification by Simulation

To verify the functionality and QoS of the designed sensornetwork, we modeled the nodes (end device, router, and basestation) and routing protocol in OPNET. Overall, the nodemodels contain around 1.4k lines of code. OPNET has threehierarchical component levels: the network level creates thetopology of the network, the node level defines the behaviorof the node and controls the flow of data between differentfunctional elements inside the node, and the process level de-scribes the underlying protocols by using finite state machines(FSMs). Based on this node library, we designed two networkscenarios both for the redundant and the non-redundant cases.While constructing these scenarios in OPNET, we enforcedconnectivity and link status between nodes to be the same asin the network synthesized by the tool. We also configured theradio parameters in OPNET, so that they match the parametersettings used during network synthesis.

12 IEEE SYSTEMS JOURNAL, VOL. X, NO. X, DECEMBER 20XX

Fig. 6. Packet delivery rate as a function of the average node failure rate.

Fig. 7. Energy consumption at different packet delivery rate.

Simulations confirmed network functionality and QoS whenall nodes were operating properly. In the following, we onlypresent the results of a sensitivity analysis of network robust-ness with respect to node failures, obtained by running severalsimulations while varying the average node failure rates forrouter nodes. In particular, we collected simulation resultsin terms of: 1) Packet Delivery Rate (PDR), defined as theratio between the number of packets received by the basestation and the number of packets sent by the end-devices,which we used as a synthetic estimation of network QoS,and; 2) energy consumption (we assumed that for each packettransmission and reception a node consumes eTX = 0.6µJand eRX = 0.7µJ respectively [40]). Figure 6 depicts the PDRfor both the redundant and non-redundant networks at differentaverage node failure rates. With no router failures, the PDRfor the Redundant (R) and Non-Redundant (NR) networks is87.65% and 82.94% respectively (packet drops are due onlyto collisions in accessing the wireless channel). If we injectrandom failures in the routers (by deactivating/activating themfor random periods of time), the non-redundant setup drops amuch larger number of packets compared with the redundantone. This confirms that the redundancy introduced by our

tool is capable of increasing network robustness, as desired.Moreover, Figure 7 shows that the increase in robustnessis obtained with a moderate increase in the network powerconsumption (on average ∆ER

tot = +22.75%ENRtot ).

VII. CONCLUSION

In this paper, we presented a tool to assist the design flow ofWSNs for building applications. The tool optimizes networkresiliency and power consumption by emulating the behaviorof routing algorithms. We cast the synthesis problem into anoptimization problem, and we proposed both a MILP-basedalgorithm that returns an exact solution, and a polynomial-timeheuristics that returns close-to-optimal results in a shorter time.Designers can use the exact algorithm to generate a tentativeinitial topology and to further improve network performanceat the end of the design; the heuristics on the other handis most suitable during intermediate design steps when newinformation is incrementally added by designers based e.g., onfield measurements.

We validated the proposed tool by designing a sensornetwork for our office, and verified its functional correctnessand robustness using simulations in OPNET.

As future work, we plan to validate the proposed frameworkby deploying the network whose design was used as anexample in the paper. Collected measurements on networkresiliency and lifetime will allow us to further tune thesynthesis strategies.

ACKNOWLEDGMENTS

The authors thank Z. Hongye for developing the firstprototype of the graphical interface, and A. Seeralan for helpin reviewing the material in the Related Work section of thepaper.

REFERENCES

[1] A. Puggelli, M. Mozumdar, L. Lavagno, and Alberto L. Sangiovanni-Vincentelli, “A Routing-Algorithm-Aware Design Tool for Indoor Wire-less Sensor Networks”, Proc. of the IEEE International Conferenceon Computing, Networking and Communications (ICNC), pp. 964–969,Maui, Hawaii, 2012.

[2] M. Mozumdar, A. Puggelli, A. Pinto, L. Lavagno, and Alberto L.Sangiovanni-Vincentelli, “A Hierarchical Wireless Network Architecturefor Building Automation and Control Systems”, Proc. of the Interna-tional Conference on Networking and Services (ICNS ’11), pp. 178–183,2011.

[3] M. Mozumdar, F. Gregoretti, L. Lavagno, L. Vanzago, and S. Olivieri, “AFramework for Modeling, Simulation and Automatic Code Generationof Sensor Network Application”, Proc. of the IEEE International Con-ference on Sensing, Communication and Networking (SECON), pp. 515–522, 2008.

[4] M.M.R. Mozumdar, L. Lavagno, L. Vanzago, and Alberto L.Sangiovanni-Vincentelli. “HILAC: A framework for Hardware In theLoop simulation and multi-platform Automatic Code Generation ofWSN Applications,” Proc. of the International Symposium on IndustrialEmbedded Systems (SIES), pp. 88–97, Italy, 2010.

[5] Z. Song, M.M.R. Mozumdar, M. Tranchero,L. Lavagno, R. Tomasi, andS. Olivieri. “Hy-Sim: model based hybrid simulation framework forWSN application development,” Proc. of the International Conferenceon Simulation Tools and Techniques (SIMUTools), pp. 1–8, Spain, 2010.

[6] Y. Wang, C. Hu, and Y. Tseng, “Efficient Deployment Algorithmsfor Ensuring Coverage and Connectivity of Wireless Sensor Net-works”, Proc. of the International Wireless Internet Conference (WiCon),pp. 114–121, 2005.

PUGGELLI et al.: ROUTING-AWARE DESIGN OF INDOOR WIRELESS SENSOR NETWORKS USING AN INTERACTIVE TOOL 13

[7] J. Martocci, P. De Mil, N. Riou, and W. Vermeylen, “Building Automa-tion Routing Requirements in Low-Power and Lossy Networks”, June2010.

[8] E. Crawley, R. Nair, B. Rajagopalan and H.!Sandick, “A Framework forQoS-Based Routing in the Internet,” RFC 2386, 1998.http://www.ietf.org/rfc/rfc2386.txt

[9] A. Pinto, M. D’Angelo, C. Fischione, E. Scholte, and A. Sangiovanni-Vincentelli, “Synthesis of Embedded Networks for Building Automa-tion and Control”, Proc. of the American Control Conference (ACC),pp. 920–925, 2008.

[10] A. Guinard, A. Mc Gibney, and D. Pesch, “A Wireless Sensor NetworkDesign Tool to Support Building Energy Management”, Proc. of theACM Workshop On Embedded Systems For Energy-Efficient Buildings(BuildSys), pp. 25–30, 2009.

[11] H. Kim, T. Kwon, and P. Mah, “Multiple Sink Positioning and Routingto Maximize the Lifetime of Sensor Networks”, IEICE Transactions onCommunications, vol. E91-B, no. 11, Nov. 2008.

[12] M. Ahlberg, V. Vlassov, and T. Yasui, “Router Placement in WirelessSensor Networks”, Proc. of the International Conference on Mobile Ad-hoc and Sensor Systems (MASS), pp. 538–541, 2006.

[13] D. Tian, N. D. Georganas, “A node scheduling scheme for energy con-servation in large wireless sensor networks”, Wireless Communicationsand Mobile Computing, Vol. 3, No. 2, pp. 271–290, March 2003

[14] M. Cardei and D.-Z. Du, “Improving Wireless Sensor Network Life-time through Power Aware Organization”, Wireless Networks, Vol. 11,pp. 333–340, Nov. 2005.

[15] S. Slijepcevic, M. Potkonjak, “Power Efficient Organization of WirelessSensor Networks”, Proc. of the IEEE Internationcal Conference onCommunication (ICC), Vol. 2, pp. 472–476, 2001.

[16] J.-J. Chang, P.-C. Hsiu and T.-W. Kuo, “Search-Oriented DeploymentStrategies for Wireless Sensor Networks”, Proc. of the IEEE Inter-national Symposium on Object and Component-Oriented Real-TimeDistributed Computing (ISORC), pp. 164–171, 2007.

[17] P. Cheng, C.-N. Chuah and X. Liu, “Energy-Aware Node Placement inWireless Sensor Networks”, Proc. of the IEEE Global Telecommunica-tions Conference (GLOBCOM), Vol. 5, pp. 3210–3214, 2004.

[18] S. S. Dhillon and K. Chakrabarty, “Sensor Placement for EffectiveCoverage and Surveillance in Distributed Sensor Networks”, Proc. of theIEEE Wireless Communications and Networking Conference (WCNC),Vol. 3, pp. 1609–1614, 2003.

[19] D. Jourdan and O. L. de Weck, “Multi-Objective Genetic Algorithmfor the Automated Planning of a Wireless Sensor Network to Monitora Critical Facility”, Proc. of SPIE Sensors, and Command, Control,Communications, and Intelligence, 2004.

[20] K. Kar, S. Banerjee, “Node Placement for Connected Coverage in SensorNetworks”, Proc. of WiOpt: Modeling and Optimization in Mobile, AdHoc and Wireless Networks, 2 pages, 2003.

[21] Akshay, N. ; CVR Coll. of Eng., Hyderabad, India ; Kumar, M.P. ; Har-ish, B. ; Dhanorkar, S., “An Efficient Approach for Sensor Deploymentsin Wireless Sensor Network”, Proc. of the International Conferenceon Emerging Trends in Robotics and Communication Technologies(INTERACT), pp. 350–355, 2010.

[22] X. Bai, S. Kumar, D. Xuan, Z. Yun and T. H. Lai, “Deploying WirelessSensors to Achieve Both Coverage and Connectivity”, Proc. of the ACMInternational Symposium on Mobile ad Hoc Networking and Computing(MobiHoc), pp. 131–142, 2006.

[23] A. Pinto, R. Kumar and S. Xu, “Synthesis of Wireless Time-TriggeredEmbedded Networks for Networked Control Systems”, Proc. of the IEEEConference on Automation Science and Engineering (CASE), pp. 397–402, 2009.

[24] Awe communications. http://www.awe-communications.com/[25] Sensicast Site Survey Toolkit. http://www.sensicast.com/[26] G. Kucuk, C. Basaran, “Reducing Energy Consumption of Wireless Sen-

sor Networks through Processor Optimizations”, Journal of Computers,Vol. 2, No. 5, pp. 67–74, July 2007.

[27] P. Levis, A. Tavakoli, and S. Dawson-Haggerty, “Overview of ExistingRouting Protocols for Low Power and Lossy Networks”, April 2009.

[28] V. Raghunathan, C. Schurgers, S. Park, and M. Srivastava, “Energy-Aware Wireless Microsensor Networks”, IEEE Signal Processing Mag-azine, no. 3, pp. 40–50, March 2002.

[29] M. Lu, P. Steenkiste, and T. Chen, “Design, Implementation and Evalua-tion of an Efficient Opportunistic Retransmission Protocol”, Proc. of theACM International Conference on Mobile Computing and Networking(MobiCom), pp. 73–84, 2009.

[30] “Energy Future: Think Efficiency”, The American Physical Society, Sept.2008.

[31] Application and Network Performance with OPNEThttp://www.opnet.com/

[32] The Network Simulator - NS-2 http://isi.edu/nsnam/ns/[33] The MathWorks - Matlab and Simulink for Technical Computing.

http://www.mathworks.com[34] G. L. Stuber, “Principles of Mobile Communication”, Kluwer Academic

Publishers, 1996.[35] S. Zvanovec, P. Pechac, and M. Klepal, “Wireless LAN Networks

Design: Site Survey or Propagation Modeling?”, Radioengineering,vol. 12, no. 4, Dec. 2003, pp. 42–49.

[36] http://www.willow.co.uk/TelosB Datasheet.pdf[37] P. Pechac and M. Klepal, “Effective Indoor Propagation Predictions”,

Proc. of the Vehicular Technology Conference (VTC), pp. 1247-1250,2001.

[38] W. Dees and P. Karger, “Automated Rip-Up and Reroute Techniques”,Proc. of the Design Automation Conference (DAC), pp. 432–439, 1982.

[39] http://lpsolve.sourceforge.net/5.5/[40] G. de Meulenaer, F. Gosset, F. Standaert, and O. Pereira, “On the

Energy Cost of Communication and Cryptography in Wireless SensorNetworks”, Proc. of the IEEE International Conference on Wireless andMobile Computing, Networking and Communications (WiMob), pp. 580–585, 2008.

Alberto Puggelli (S’09) received the B.Sc. degreefrom Politecnico di Milano, Milan, Italy in 2006 andthe double M.Sc. degree in Electrical Engineering(summa cum laude) from Politecnico di Milano,Milan, Italy and Politecnico di Torino, Turin, Italy,in 2008. In 2009, he was with ST-Ericsson as anintern analog designer. In 2009, he joined the EECSdepartment at the University of California at Berke-ley, where he is currently pursuing the Ph.D. degree.From 2011 to 2013, he hold intern positions in theR&D and product divisions at Texas Instruments

(Kilby Labs) and Lion Semiconductor. Mr. Puggelli is the recipient of twoBest Student awards at Polytechnic of Milan, the AEIT fellowship entitled to”Isabella Sassi Bonadonna” for the year 2010, and the 2012 Margarida JacomeGSRC Best Poster Award. He also serves as a reviewer for the Transactionson Circuit and Systems II. His research interests include methodologies forthe design of energy-efficient systems-on-chip and techniques for the formalverification of nonlinear and stochastic hybrid systems.

Mohammad Mostafizur Rahman Mozumdar(S’08, M’10) is a tenure track faculty in the Electri-cal Engineering department of the California StateUniversity at Long Beach and an ex-postdoc fromthe University of California, Berkeley. He receiveda Ph.D. in electronics and communication engi-neering from Politecnico di Torino, Turin, Italy.His novel ideas of model based design for sensornetworks made profound impact on engineering andindustrial communities and have been published inbook chapter, renowned journals, reputed conference

proceedings, major scientific magazines and also translated in several differentlanguages. Dr. Mozumdar’s research interests include methodologies and toolsfor embedded system especially in the domain of sensor networks; energyefficient building information and control system design; cloud computing;cyber physical system; methodology for the design of distributed embeddedsystems typically subjected to high real time, safety and reliability constraints.

14 IEEE SYSTEMS JOURNAL, VOL. X, NO. X, DECEMBER 20XX

Luciano Lavagno (S’88, M’93) received the Laureadegree (summa cum laude) in Electrical Engineer-ing from Politecnico di Torino (Italy) in 1983 andreceived his Ph.D. in Electrical Engineering andComputer Science from the University of Californiaat Berkeley in 1992. From 1984 to 1988 he waswith CSELT Laboratories (Torino, Italy), where hewas work package leader in the ESPRIT 802 CVSproject. In 1988 he joined the Department of EECSat UC Berkeley, where he worked on logic synthe-sis and testing of synchronous and asynchronous

circuits. Between 1993 and 2000 he has been the architect of the POLISproject. He then participated in the architecting and development of the VCCsystem-level design tool from Cadence Design Systems and was involvedin the ESPRIT 25443 COSY project, which applied VCC to designs fromPhilips and Infineon. He has served on the technical committees of severalinternational conferences, workshops and symposia in his field (technicalProgram Chair of the Design Automation Conference in 2002 and 2003).He is a Professor at Politecnico di Torino, Italy and also a Senior Scientistat Cadence Research, USA. His research interests include embedded systemdesign, with a special focus on wireless sensor networks, and asynchronouscircuit design and testing.

Alberto L. Sangiovanni-Vincentelli (M’74, SM’81,F’83) received the degree in electrical engineeringand computer science (Dottore in Ingegneria) summacum laude from the Politecnico di Milano, Italy, in1971. He holds the Edgar L. and Harold H. Buttnerchair of electrical engineering and computer sciencesat the University of California at Berkeley. In 1987,he was a visiting professor at the MassachusettsInstitute of Technology.He was a cofounder of Ca-dence and Synopsys, the two leading companies inthe area of Electronic Design Automation. He is a

member of the board of directors of Cadence and the chair of its TechnologyCommittee, UPEK, Sonics, and Accent. He was a member of the HP StrategicTechnology Advisory Board and is a member of the Science and TechnologyAdvisory Board of General Motors. He is a member of the High-Level Group,the steering committee, the governing board, and of the Public AuthoritiesBoard of the EU Artemis Joint Technology Undertaking. He is a member ofthe scientific council of the Italian National Science Foundation (CNR) and amember of the executive committee of the Italian Institute of Technology. Hereceived the Kaufman award of the Electronic Design Automation Councilfor pioneering contributions to EDA and the IEEE/RSE Wolfson James ClerkMaxwell Medal for groundbreaking contributions that have had an exceptionalimpact on the development of electronics and electrical engineering or relatedfields. He is an author of more than 800 papers, 15 books, and three patents.He is a fellow of the IEEE and a member of the National Academy ofEngineering.