a model-based transformation framework for designing and...

13
Turk J Elec Eng & Comp Sci (2018) 26: 3274 – 3286 © TÜBİTAK doi:10.3906/elk-1711-122 Turkish Journal of Electrical Engineering & Computer Sciences http://journals.tubitak.gov.tr/elektrik/ Research Article A model-based transformation framework for designing and analyzing wireless sensor networks Raoudha SAIDA 1,2, ,, Yessine HADJ KACEM 3 ,, Mohammed Sulaiman BENSALEH 4 ,, Mohamed ABID 1,2 , 1 CES Laboratory, National Engineering School of Sfax, Sfax, Tunisia 2 Digital Research Center of Sfax (CRNS), Sfax, Tunisia 3 College of Computer Science, King Khalid University, Abha, Saudi Arabia 4 National Electronics, Communications, and Photonics Center, King Abdulaziz City for Science and Technology, Riyadh, Saudi Arabia Received: 14.11.2017 Accepted/Published Online: 26.06.2018 Final Version: 29.11.2018 Abstract: Wireless sensor networks (WSNs) comprise resource-constrained (e.g., memory, processing, and energy) sensor nodes that are deployed in different areas and are able to monitor environmental conditions. Simulation has been widely used in order to evaluate the network performance. In this context, software designers need to evaluate, refine, and validate high-level models for WSN applications at early stages of development via simulation tools, in particular for WSN applications supporting energy-harvesting devices. In the present paper, we propose a model-based transformation framework that allows the modeling and simulation of a WSN system supporting energy-harvesting capabilities. In this proposal, we start from a high-level specification based on the UML/MARTE profile, which describes an energy- harvesting WSN node. Then a model-to-text (M2T) transformation allows us to generate simulation scripts for analysis purposes by focusing on energy consumption. Key words: Wireless sensor network, model-driven engineering, model-to-text transformation, simulation, energy harvesting 1. Introduction Wireless sensor networks (WSNs) have seen growing interest in the past years. A WSN consists of a large number of sensors that can monitor and measure certain phenomena to accomplish a task such as environmental monitoring [1], health care monitoring [2], and many other applications. A WSN has many design challenges [3], especially the energy supply, which is still a limiting factor for such systems. In order to address this issue, the energy-harvesting alternative [4] is considered as a potential solution to energy restrictions problem. Hence, the use of engineering methods and techniques to manage the challenges of WSNs is required. Currently, designers have adopted high-level design approaches based on the model-driven engineering (MDE) paradigm [5] in the WSN domain [6,7] in order to deal with these challenges and prolong the WSN’s lifetime. Using UML profiles is a promising solution to decrease the WSN’s complexity. One variant of UML profiles is the Modeling and Analysis of Real-Time and Embedded (MARTE) systems [8] standard, which provides rich support for the modeling and analysis of real-time and embedded systems. On the other hand, designers are interested in checking the energy characteristics and timing constraints for WSN systems at early design stages, which is Correspondence: [email protected] This work is licensed under a Creative Commons Attribution 4.0 International License. 3274

Upload: others

Post on 30-May-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Turk J Elec Eng & Comp Sci(2018) 26: 3274 – 3286© TÜBİTAKdoi:10.3906/elk-1711-122

Turkish Journal of Electrical Engineering & Computer Sciences

http :// journa l s . tub i tak .gov . t r/e lektr ik/

Research Article

A model-based transformation framework for designing and analyzing wirelesssensor networks

Raoudha SAIDA1,2,∗ , Yessine HADJ KACEM3 , Mohammed Sulaiman BENSALEH4 ,Mohamed ABID1,2

1CES Laboratory, National Engineering School of Sfax, Sfax, Tunisia2Digital Research Center of Sfax (CRNS), Sfax, Tunisia

3College of Computer Science, King Khalid University, Abha, Saudi Arabia4National Electronics, Communications, and Photonics Center, King Abdulaziz City for Science and Technology,

Riyadh, Saudi Arabia

Received: 14.11.2017 • Accepted/Published Online: 26.06.2018 • Final Version: 29.11.2018

Abstract: Wireless sensor networks (WSNs) comprise resource-constrained (e.g., memory, processing, and energy) sensornodes that are deployed in different areas and are able to monitor environmental conditions. Simulation has been widelyused in order to evaluate the network performance. In this context, software designers need to evaluate, refine, andvalidate high-level models for WSN applications at early stages of development via simulation tools, in particular forWSN applications supporting energy-harvesting devices. In the present paper, we propose a model-based transformationframework that allows the modeling and simulation of a WSN system supporting energy-harvesting capabilities. Inthis proposal, we start from a high-level specification based on the UML/MARTE profile, which describes an energy-harvesting WSN node. Then a model-to-text (M2T) transformation allows us to generate simulation scripts for analysispurposes by focusing on energy consumption.

Key words: Wireless sensor network, model-driven engineering, model-to-text transformation, simulation, energyharvesting

1. IntroductionWireless sensor networks (WSNs) have seen growing interest in the past years. A WSN consists of a largenumber of sensors that can monitor and measure certain phenomena to accomplish a task such as environmentalmonitoring [1], health care monitoring [2], and many other applications. A WSN has many design challenges[3], especially the energy supply, which is still a limiting factor for such systems. In order to address thisissue, the energy-harvesting alternative [4] is considered as a potential solution to energy restrictions problem.Hence, the use of engineering methods and techniques to manage the challenges of WSNs is required. Currently,designers have adopted high-level design approaches based on the model-driven engineering (MDE) paradigm[5] in the WSN domain [6,7] in order to deal with these challenges and prolong the WSN’s lifetime. Using UMLprofiles is a promising solution to decrease the WSN’s complexity. One variant of UML profiles is the Modelingand Analysis of Real-Time and Embedded (MARTE) systems [8] standard, which provides rich support forthe modeling and analysis of real-time and embedded systems. On the other hand, designers are interested inchecking the energy characteristics and timing constraints for WSN systems at early design stages, which is∗Correspondence: [email protected]

This work is licensed under a Creative Commons Attribution 4.0 International License.3274

SAIDA et al./Turk J Elec Eng & Comp Sci

useful for establishing a reliable development process and avoiding failures. A MDE model represents the systemspecifications at a high level of abstraction, but it must be verified. To address this concern, several simulationtools [9] are applied in order to verify a WSN’s constraints. Simulation helps developers and designer of WSNapplications to detect and correct code bugs before deployment in the real world thanks to its advantages, ease ofimplementation, lower cost, and practicality of testing. In this paper, we address the modeling and simulationof energy-harvesting WSN nodes. We furthermore introduce a framework that permits us to describe andsimulate an energy-harvesting sensor node by using a high-level modeling approach based on the UML/MARTEprofile in order to verify nonfunctional properties and evaluate the WSN’s performances (power consumptionand time constraints). The described models use new extensions of the MARTE profile for energy-harvestingtechniques proposed in a previous work [10]. In this previous work, we proposed a generic model for energy-harvesting devices through MARTE extensions. We suggested how to use UML (Unified Modeling Language)and MARTE languages in order to transform the energy-harvesting requirement into modeling specifications.However, our present work does not consist of proposing MARTE extensions; rather, it lies in representing acomplete framework that starts with high-level design referring to the suggested energy-harvesting models toestablish the power supply modeling of a WSN system and leads to M2T transformations to automaticallygenerate executable scripts in order to validate the design by a simulation step.

The advantages of this proposed work come from the fact that it:

3 Uses the MDE paradigm that offers high-level designs.

3 Utilizes UML and the MARTE standard that provides comprehensible models.

3 Uses the MDE transformation engine to automatically generate code from high-level models.

3 Includes a simulation step for analysis purposes.

The paper is organized as follows. In Section 2, we provide the related work. In Section 3, we give anoverview of modeling technologies and simulation tools used in this work. In Section 4, we describe our adoptedmethodology proposed in this paper. In Section 5, we give a case study illustrating our work and we showsimulation results. Finally, in Section 6, we conclude the paper.

2. Related workSeveral approaches have been investigated for model-driven development for WSN applications. They aimed toimprove the design of applications through domain-specific languages or UML profiles with the goals of automaticcode generation, simulation, and performance analysis. In [11], the authors addressed the energy-aware systemdesign of WSNs with the design language SDL [12]. The authors identified energy mode signaling and energyscheduling as two conceptual approaches to specify energy aspects into SDL, and then these approaches wereapplied in order to control the energy consumption of the CPU and transceiver of an Imote2 platform. Anotherframework for modeling, simulation, and code generation of WSNs was presented in [13]. In this proposal, theauthors modeled the application using high-level abstractions and simulated it using configurable and realistictopologies. The framework was based on MathWorks tools. Applications were modeled using Simulink andStateflow. The code was automatically generated by using the Embedded Coder for two target platforms:TinyOS [14] and MANTIS [15], with energy considered as the main issue. In [16], a model-driven developmentprocess for low-cost prototyping and optimization of WSN applications was proposed. In this work, the

3275

SAIDA et al./Turk J Elec Eng & Comp Sci

authors described a model by using domain-specific modeling language at the highest degree of abstraction.Transformation rules were used to convert a highly abstract model to an executable one for optimizing theperformance and energy analysis. The authors proposed in [17] a MDE platform for rapid implementationand testing of WSN applications. The authors presented a feature model that gives a view of the system’sfeatures and their constraints. A formal method was used to estimate various properties of the application,such as network lifetime. In the same context, the MDE framework for architecting and analyzing WSNs wasprovided in [18]. In this work, the authors proposed a framework based on the MDE paradigm that separatelymodels the software architecture of the WSN, the hardware specification of the WSN nodes, and the deploymentenvironment. M2T transformations were proposed to generate executable code for energy-consumption analysispurposes. In [19], the authors investigated a model-based approach to combine the modeling and performanceanalysis for WSNs. They introduced a UML-based framework that models the hardware platform using NesCand performance parameters using the UML/MARTE standard. A set of transformations was used that alloweda network performance analysis. Other related works [20–22] proposed different frameworks that dealt with thesimulation of energy-harvesting WSNs. However, these approaches do not support MDE terminologies such asmodels and model transformations. The common downside of the studied works is that they do not supportenergy-harvesting techniques in the proposed frameworks. What makes our work different is that it offers amodel-based transformation framework that allows modeling and simulating a WSN system supporting energy-harvesting capabilities. The originality of this work is combining high-level specifications with a WSN simulationenvironment in order to automatically generate code for targeted simulations. We present a model based on theMARTE profile as an OMG standard for the design of an embedded system that models real-time properties ofa sensor node. In addition, we adopt a WSN simulator that allows the simulation of sensor networks supportingharvesting capabilities, which is not the case with other simulators.

3. High-level methodologies and WSN simulation tools

In this section, we outline different tools, languages, and WSN simulation platforms used in our proposedframework to establish WSN simulation.

3.1. Model-driven engineering

The concept of models has become a considerable paradigm in software engineering applications. The use ofmodels offers a significant advance in terms of continuity, scalability, level of abstraction, etc. MDE [5] is asoftware development methodology in which applications are generated from models. MDE is considered apromising alternative since it aims to decrease the development of complex systems and improve their qualityas well as the capture and validation of constraints. The MDE development process starts with using modelsat different levels of abstraction and leads to a specific model through a set of transformations and refinements.MDE focuses on three main concepts, which are meta-model, model, and model transformation. A model canbe described by using a domain-specific language such as UML, MARTE, etc. A set of transformations can beapplied to this model including model-to-model (M2M) and model-to-text (M2T) transformations. The M2M[23] transforms one model into another model that may conform to the same based on existing transformationlanguages such as Qvt and ATL. The M2T technique represents a mapping from a model to a text based onmapping templates [23] such as Acceleo [24] and MOFScript [25]. All the tools used in this work, includingmodels and model transformations, are provided by the Eclipse platform. In particular, Papyrus is used toenable the modeling of the UML/MARTE based designs and Acceleo for model-to-text transformation.

3276

SAIDA et al./Turk J Elec Eng & Comp Sci

3.2. MARTE standardThe UML profile for MARTE is inspired by the Schedulability, Performance, and Time (SPT) profile [26]. It isan OMG standard profile that specializes in UML by adding domain-specific concepts to support foundations formodel-based descriptions and analysis of real-time and embedded systems like WSNs. MARTE has three mainpackages (Foundation Package, MARTE Design Model, and MARTE Analysis Model Package) and each packagehas specific purposes. MARTE has several subprofiles providing specific stereotypes and different attributes toannotate models. In particular, the MARTE subprofiles that fit our modeling and analysis include the GlobalResource Modeling (GRM) that supports static and dynamic modeling of software/hardware resources and theHardware Resource Modeling (HRM) that specifies hardware resource modeling. MARTE supports only solarenergy harvesting that is limited to outdoor applications with sufficient sunlight. In this context, new extensionsof the MARTE profile were proposed in a previous work [10] to support other unlimited WSNs energy-harvestingtechniques. These proposed extensions are used in this paper to evaluate the WSN performance analysis.

3.3. WSN simulation platformsWhile sensor networks have grown as an important field and have become useful in many application domains,a simulation environment would be very beneficial in terms of time and cost. In this context, various networksimulation environments [27] have been proposed in the literature, such as NS-2 [28], ATEMU [29], Avrora [30],WSNet [31], TOSSIM [32], etc. Some of the highlighted simulators are used to emulate a processor in sensornodes for certain platforms. Others are dedicated to testing some properties of an algorithm and other simulatorsare used in traditional data networks, which can be modified to serve the WSN community. Considering theenergy consumption analysis, not all the cited simulation tools have support for energy consumption, such asthe TOSSIM simulator. Additionally, they are sensor platform-specific. In our work, the Castalia simulator[33] has been adopted for the simulation of the WSN and performance evaluation. Castalia is a frameworkbased on the OMNeT++ [34] platform and extends it with the models for a simulation of WSNs. We built ourchoice on Castalia, which is a network simulator that does not emulate specific existing operating systems orspecific hardware platforms. Additionally, the Castalia simulator has accurate and advanced wireless channelmodels and radio models. The input file of the simulation tool is a text file (.ini file) that defines all the energyconsumption and temporal information. Consequently, we address in the present paper a transformation of theproposed MARTE model supporting WSN energy-harvesting techniques to the Castalia metamodel for energyand time analysis.

3.4. Proposed methodology

The main objective of our work is to take advantage of MDE techniques, in particular the UML/MARTE profile,to support an analysis framework for improving WSNs. Figure 1 shows an overview of our proposed framework,which includes three main parts: the WSN modeling phase, the code generation phase, and the simulationphase.

The WSN modeling phase defines two modeling instances: the node model and the network model. Figure2 shows the node model design. It describes hardware details of a sensor node with an energy-harvesting devicethat can be used in a WSN application. This model contains low-level information of the node, such as itsrouting protocols, MAC protocols, energy sources, sensors, and others. The network model describes networkbehavior and components such as its topology, its dimension, positions of existing nodes, and other information.The network model is depicted in Figure 3.

3277

SAIDA et al./Turk J Elec Eng & Comp Sci

Figure 1. Overview of the proposed modeling framework.

<<HW_Processor>>

Processor

<<HW_Harvesting>>

HarvesterModule

<<HW_PowerSupply>>

name : String [1]

EnergySource

initialStoredEnergy: NFP_Energy [1]

<<HW_Sensor>>

sensorType : TT String [1]

Sensor

powerConspowerConsumedPerSample: NFP_Power [1]Power [1]

<<HW_IO>>

name : String [1]

RadioCommunicationDevice

transmissionPower: NFP_Power [1]

ReceiveSensetivity: String [1]

RadioFrequency: NFP_Frequency [1]

macProtocol: String [1]

routingProtocol: String [1]

Node

NodeID: Integer [1]

OS: String [1]

1

1

1

1..*processor

node

11

node

radio

1

1 node

sensor

harvestermodule

energysource

energysource

1

node1

Figure 2. Node model description using MARTE profile.

The code generation phase involves code generation engines. The described models are translated intoscripts for analysis purposes of the WSN into the Castalia simulator. This M2T transformation is implementedby using the Acceleo [24] transformation engine, which is the Eclipse implementation of the OMG M2Tspecification. Figure 4 represents the Acceleo template, in which the model is transformed into a Castaliaconfiguration file. Fundamentally, our Acceleo template contains a set of transformations of UML/MARTEconcepts into Castalia metamodel concepts. The transformation rules for M2T are shown in Table 1. Forexample, the stereotype «Network» is converted into the SN element in Castalia. The stereotype «HWSensor»is transformed into the element SensorManager. Its attribute «PowerConsumedPerSample» is transformed tothe parameter pwrConsumptionPerDevice. The «EnergySource» stereotype, which models energy sources, istransformed into the element ResourceManager. The energy-harvesting device is described by two elements

3278

SAIDA et al./Turk J Elec Eng & Comp Sci

<<HW<<HW_Harvesting>>

HarvesHarvesterModule

<<HW_PowerSupply>>

name : String [1]

EnergySource

initialStoredEnergy: NFP_Energy [1]

<<HW_Sensor>>

sensorType : TT String [1]

Sensor

powerConsumedPerSample: NFP_ er [1]Power [1]

<<HW_Processor>>sor>>

Processor

Network

NbreNodes: Integer [1]

<<HW_IO>>

name : String [1]

RadioCommunicationDevice

transmissionPower: NFP_Power [1]

ReceiveSensetivity: String [1]

RadioFrequency: NFP_Frequency [1]

macProtocol: String [1]

routingProtocol: String [1]

Topology

Entity: Node [1]

Node

NodeID: Integer [1]

OS: String [1]

BaseStation

CoverageArea: NFP_Area [1]

SubNetworkArea

HorizentalArea: NFP_Area [1]Level: Integer [1]

NbreNode: Integer [1]

Router EndPoint

Coordinate

X: Integer [1]

Y: Integer [1]

RSSI

TxRxDistance: Integer [1]

BatteryLevel

"reshold: Integer [1]

networknetwork

subnetworkarea

router endpoint1

1 1

1

rssi batterylevel

1

1

1

1..*

11

1

1

1

1

1

1 1

1

1

1

1

Figure 3. Network model description using MARTE profile.

into Castalia HarvesterName and HarvestedEnergy. The «Node» stereotype is converted into the element node.The stereotype «RadioCommunicationDevice» is transformed into the communication element. Its attributes«macProtocol» and «routingProtocol» are transformed respectively into the parameters «MACProtocol» and«RoutingProtocol».

The Simulation phase uses Castalia as a simulator of WSNs for analysis purposes. We look for energyconsumption analysis by focusing on the advantage of the use of a harvester device in a WSN. As Castalia’sResourceManager module models resources of a node such as CPU time and consumed energy, we propose toextend this module with energy-harvesting functionalities and information. In the generated .ini file, we canconfigure the following parameters for a harvester module:

• HarvesterName: gives the name of the used energy harvester device. It can be Vibration, Thermal,Acoustic, etc.

• HarvestedEnergy: the amount of the gathered energy from environment.

The proposed simulation framework permits the application of the energy harvester device, which leadsto the performance of network lifetime and affects the energy consumption.

4. Case studyThis section presents the application of our methodology for energy consumption analysis of a water pipelinemonitoring system of a city. We describe the network model and the generated script and we discuss simulationresults.

3279

SAIDA et al./Turk J Elec Eng & Comp Sci

Figure 4. Acceleo template for MARTE to .ini generation.

4.1. Case study overview

Energy limitation is a popular problem in WSN applications. Some research works have focused on energyharvesting techniques such as solar, thermal, and mechanical methods in order to provide the required power.Energy harvesting from the ambient environment in water pipeline applications would enhance the lifetime ofthe node and ensure continuous monitoring. In fact, this contribution is a part of a research project calledthe Energy-Aware Reconfigurable Node (EARN) project [35], which aims at designing a low-power sensor nodebased on a system-on-chip for water pipeline monitoring applications. That is why we used the water pipelineas an illustrative example. In order to evaluate the validity of our methodology, we propose a small prototypeof the water pipeline distribution and we place five sensor nodes to monitor and obtain information aboutwater quality in the pipeline. Figure 5 represents the structure of the prototype design. A very simple formof star topology is presented: every node is connected to the base station (BS). The measurements are sent tothe BS, which receives data from sensor nodes and further transmits the received data to the public user forthe observation of changes. Each sensor node is occupied by a PS-1 wireless pressure sensor, a CC2420 radiocommunication device (transmission power equal to –5 dBm and radio bandwidth equal to 20 MHZ), and anAA lithium battery (3.9 V). The T-MAC is used as a MAC protocol. Since battery power is limited, harvesting

3280

SAIDA et al./Turk J Elec Eng & Comp Sci

Table 1. Transformation M2T rules from MARTE to Castalia.

MARTE Castalia simulator

Network annotations «Network»NbreNodes

SNnumNodes

Node annotation «Node» Node

Energy sources annotations «EnergySource»initialStoredEnergy

ResourceManagerinitialEnergy

Energy harvestingannotation

nameinputEnergy

HarvesterNameHarvestedEnergy

Sensor annotationsSensorManagersensor.typePowerConsumedPerSample

SensorsensorTypespwrConsumptionPerDevice

Communication deviceannotations

«RadioCommunicationDevice»RadioFrequencytransmissionPowermacProtocolroutingProtocol

CommunicationcarrierFreqTXOutputPowerMACProtocolRoutingProtocol

energy from the water distribution can be a potential option to enhance the network lifetime. Three methodsare proposed to harvest energy from water pipelines [36]. The first is to harvest the kinetic energy directlyfrom the water flow using turbines. However, this technique either wastes water or cannot produce enoughpower for sensor nodes. The second is to harvest the thermal energy that represents the heat flow producedby the water/air temperature difference. This method can be reliable for applications in harsh environments,but using only a thermal energy harvester is unsuitable for powering sensor nodes due to the dependence onweather conditions. The third is to harvest the energy from vibration sources in the water distribution. Flow-induced vibration is one of the important energies to be harvested. This method is the most applicable in waterdistribution systems because it utilizes small parts, is simple to integrate in the WSN node, and provides feasiblepower for sensor nodes. We present in the following subsection different simulation results for each method inthe proposed case study. Figure 6 illustrates the modeling of the described water pipeline monitoring systemusing the UML/MARTE profile. Using the Acceleo plugin in Eclipse, the model is transformed into the .ini file,the configuration file of the Castalia simulator. Figure 7 represents the generated .ini file’s content. This fileis composed of different modules: the ResourceManager module, which describes node resources and proposedenergy harvester specifications; the SensorManager module, which describes sensor specifications; the Radiomodule, which describes communication within the network; and the MAC module and the routing protocol.The simulation parameters, presented in the configuration file, are listed in Table 2. Each simulation lasts 1000s. The communication device is the CC2420 radio. Sensor nodes operate at a maximum transmission powerlevel equal to –5 dBm. We use the default MAC protocol given by the Castalia simulator, the Bypass MACprotocol.

4.2. Simulation results and discussionIn the present section, we discuss the application of our approach to the water pipeline monitoring case study.In this work, we are interested in energy analysis. In the Castalia simulator, the energy consumption modelis represented by the ResourceManager module. The ResourceManager module is responsible for calculating

3281

SAIDA et al./Turk J Elec Eng & Comp Sci

Figure 5. The structure of the proposed prototype

NetworkStar_Topology

BaseStation

Node_1

Radio_C2420_1

battery_1CPU_1 VibrationHarvester_1

PressureSensor_1

Node_2

Radio_C2420_2

battery_2CPU_2 VibrationHarvester_2

PressureSensor_2

Node_3Radio_C2420_3

battery_3

CPU_3

VibrationHarvester_3

PressureSensor_3

Node_4Radio_C2420_4

battery_4

CPU_4 VibrationHarvester_4PressureSensor_4

11

1

1

1

1

1

1

1

1

1

1

1

11

11

1

1

1

1

Figure 6. Case study modeling using UML/MARTE profile.

Table 2. Simulation parameters for the case study.

Simulation parameter ValueSimulation time 1000 sNode number 5Communication device CC2420 radioTxPower –5 dBmMAC protocol Bypass MAC

the energy consumed by each node in the network. It thus permits calculating the remaining energy in eachnode after each simulation. The amount of consumed power corresponding to the radio modes depends onthe radio device type. As used sensor nodes are based on CC2420 radios, the radio consumes 1.4 mW insleeping state and 62 mW in the receiving or listening states. We consider two simulation scenarios. The first

3282

SAIDA et al./Turk J Elec Eng & Comp Sci

Figure 7. The generated omnetpp.ini file

scenario is for energy consumption without energy harvesting and the second scenario is for energy consump-tion with energy harvesting. We present in the second scenario the energy-harvester techniques previouslycited: thermal, kinetic, and vibration energy-harvesting methods. We consider the simulation parameterspreviously presented for the two scenarios. For the second scenario, we added the energy harvesting parame-ters (SN.node.ResourceManager.HarvesterName and SN.node.ResourceManager. HarvestedEnergy). Figure 8shows the remaining energy at the end of each scenario. Node 0 represents the BS. Nodes 1, 2, 3, and 4 mon-itor the pressure in the water pipeline. Simulation results show that introducing an energy-harvesting devicewould be an optimistic proposal for continuous monitoring in the water pipelines. It can be seen also that avibration harvester can produce more power than thermal or kinetic harvesters for the proposed sensor node.For instance, node 3 can save 35 J of energy thanks to the use of a vibration harvester when compared to nouse of this kind of harvester. However, it can save only 2 J when using a thermal harvester. We can concludethat using a vibration harvester in the presented case study can provide the highest power for supplying thebattery. In addition, this method is easy to integrate in the sensor node. To better highlight the usefulness ofthe energy-harvesting methods in the WSN to solve the energy-consumption problem, we calculate the energyconsumption by each node in the designed water distribution network. Table 3 shows the consumed energyvalue for each sensor node with and without using a vibration harvester.

We can conclude from Table 3 that the energy consumed decreases in the case of introducing the vibrationharvester. For example, the energy consumed by node 2 decreases from 290 J to 262 J when using a vibrationharvester, which improves the recharging of the battery and offers the extension of the network lifetime and theminimization of energy consumption.

We can conclude that using a high-level model for the development of a WSN system presents benefitscompared to the low-level development methods. It enables the reuse of models by separating hardware details

3283

SAIDA et al./Turk J Elec Eng & Comp Sci

9000

9020

9040

9060

9080

9100

9120

9140

9160

0 1 2 3 4

Remaining Energywithout energyharvester(Joules)

Remaining Energy with

vibrationharvester(Joules)

Remaining Energy withKinetic harvester(Joules)

Remaining Energy with"ermal harvester(Joules)

Figure 8. Remaining energy in each node, with and without energy harvester.

Table 3. Consumed energy value by each sensor node with and without a vibration harvester (J).

Node 0 Node 1 Node 2 Node 3 Node 4Consumed energy for node 270 295 290 280 310without vibration harvester (J)Consumed energy for node 235 210 262 245 302with vibration harvester (J)

and the network behavior description of a WSN. For example, it is possible to change the specification ofmotes without the other network definitions being affected and running new experiments. In addition, itimproves abstraction by decreasing the growing complexity of low-level hardware descriptions. It providesperformance analysis by automatically generating executable code from the models. In that sense, the newproposed framework is very useful for the development and analysis of WSN architectures from different aspects.

5. ConclusionIn the present paper, we present a high-level model-based framework for designing WSN applications. It relieson three parts: the WSN modeling framework based on the UML/MARTE profile, a code generation framework,and a simulation framework. M2T transformation rules from the MARTE profile to the Castalia simulator arepresented. The main interest of this work is that it supports modeling and simulation of energy-harvestingdevices for powering WSN nodes. A WSN-based water distribution system is used to evaluate our proposedmethodology. We plan in future work to extend our proposed framework in order to support adaptive WSNs.

Acknowledgment

This work was supported by the King Abdulaziz City for Science and Technology (KACST) and the DigitalResearch Center of Sfax (CRNS).

3284

SAIDA et al./Turk J Elec Eng & Comp Sci

References

[1] de Lima G, e Silva L, Neto P. WSN as a tool for supporting agriculture in the precision irrigation. In: 2010 SixthInternational Conference on Networking and Services; 7–13 March 2010; Cancun, Mexico. New York, NY, USA:IEEE. pp. 137-142.

[2] Al Ameen M, Liu J, Kwak K. Security and privacy issues in wireless sensor networks for healthcare applications. JMed Syst 2012; 36 : 93-101.

[3] Swati AJ, Priyanka R. Wireless sensor network (WSN): Architectural design issues and challenges. Int J ComputSci Eng 2010; 2: 3089-3094.

[4] Castagnetti C, Pegatoquet A, Belleudy C, Auguin M. A framework for modeling and simulating energy harvestingWSN nodes with efficient power management policies. Eurasip J Emb Syst 2012; 2012: 8.

[5] Schmidt DC. Guest Editor’s introduction: model-driven engineering. Computer 2006; 39: 25-31.[6] Fuchs G, German R. UML2 activity diagram based programming of wireless sensor networks. In: Proceedings of

the 2010 ICSE Workshop on Software Engineering for Sensor Network Applications; 2–8 May 2010; Cape Town,South Africa. New York, NY, USA: ACM. pp. 8-13.

[7] Glombitza N, Pfisterer D, Fischer S. Using state machines for a model driven development of web service-basedsensor network applications. In: Proceedings of the 2010 ICSE Workshop on Software Engineering for SensorNetwork Applications; 2–8 May 2010; Cape Town, South Africa. New York, NY, USA: ACM. pp. 2-7.

[8] OMG. A UML profile for MARTE, Beta 1. Needham, MA, USA: Object Management Group, 2007.[9] Musznicki B, Zwierzykowski P. Survey of simulators for wireless sensor networks. Comm Com Inf Sc 2012; 5: 23-50.

[10] Saida R, Kacem YH, BenSaleh M, Abid M. A UML/MARTE extension for designing energy harvesting in wirelesssensor networks. In: Damiani E, editor. Intelligent Interactive Multimedia Systems and Services. Berlin, Germany:Springer, 2016. pp. 427-438.

[11] Gotzhein R, Krämer M, Litz L, Chamaken A. Energy-aware system design with SDL. Lect Notes Comp Sci 2009;5719: 19-33.

[12] Sandhu KK. Specification and description language (SDL). In: IEE Tutorial Colloquium on Formal Methods andNotations Applicable to Telecommunications; 19 March 1992; London, UK. New York, NY, USA: IET. pp. 3/1-3/4.

[13] Mozumdar MMR, Gregoretti F, Lavagno L, Vanzago L, Olivieri S. A framework for modeling, simulation andautomatic code generation of sensor network application. In: 2008 5th Annual IEEE Communications SocietyConference on Sensor, Mesh and Ad Hoc Communications and Networks; 16–20 June 2008; San Francisco, CA,USA. New York, NY, USA: IEEE. pp. 515-522.

[14] Hill JL, Szewczyk R, Woo A, Hollar S, Culler DE, Pister KSJ. System architecture directions for networked sensors.In: Proceedings of the Ninth International Conference on Architectural Support for Programming Languages andOperating Systems; 13–15 November 2000; Cambridge, MA, USA. New York, NY, USA: ACM. pp. 93-104.

[15] Abrach H, Bhatti S, Carlson J, Dai H, Rose J, Sheth A, Shucker B, Deng J, Han R. Mantis: System supportfor multimodal networks of in-situ sensors. In: Proceedings of the 2nd ACM International Conference on WirelessSensor Networks and Applications; 19 September 2003; San Diego, CA, USA. New York, NY, USA: ACM. pp.50-59.

[16] Shimizu R, Tei K, Fukazawa Y, Honiden S. Model driven development for rapid prototyping and optimization ofwireless sensor network applications. In: Proceedings of the 2nd Workshop on Software Engineering for SensorNetwork Applications; 21–28 May 2011; Honolulu, HI, USA. New York, NY, USA: ACM. pp. 31-36.

[17] Boonma P, Somchit Y, Natwichai J. A model-driven engineering platform for wireless sensor networks. In: 2013Eighth International Conference on P2P, Parallel, Grid, Cloud and Internet Computing; 28–30 October 2013;Compiegne, France. New York, NY, USA: IEEE. pp. 671-676.

[18] Doddapaneni K, Ever E, Gemikonakli O, Malavolta I, Mostarda L, Muccini H. A model-driven engineering frame-work for architecting and analysing wireless sensor networks. In: 2012 Third International Workshop on SoftwareEngineering for Sensor Network Applications; 2 June 2012; Zurich, Switzerland. New York, NY, USA: IEEE. pp.1-7.

3285

SAIDA et al./Turk J Elec Eng & Comp Sci

[19] Berardinelli L, Cortellessa V, Pace S. Modeling and analyzing performance of software for wireless sensor networks.In: Proceedings of the 2nd Workshop on Software Engineering for Sensor Network Applications; 21–28 May 2011;Honolulu, HI, USA. New York, NY, USA: ACM. pp. 13-18.

[20] Allen J, Forshaw M, Thomas N. Towards an extensible and scalable energy harvesting wireless sensor network simu-lation framework. In: Proceedings of the 8th ACM/SPEC on International Conference on Performance EngineeringCompanion; 2017; L’Aquila, Italy. New York, NY, USA: ACM. pp. 39-42.

[21] Dall’Ora R, Raza U, Brunelli D, Picco GP. SensEH: From simulation to deployment of energy harvesting wirelesssensor networks. In: 39th Annual IEEE Conference on Local Computer Networks Workshops; 8–11 September 2014;Canada. New York, NY, USA: IEEE. pp. 566-573.

[22] Rajaram ML, Kougianos E, Mohanty SP, Choppali U. Wireless sensor network simulation frameworks: a tutorialreview: MATLAB/Simulink bests the rest. IEEE Consumer Electronics Magazine 2016; 5: 63-69.

[23] Stahl T, Völter M, Bettin J, Hasse A, Hilson S. Model-Driven Software Development: Technology, Engineering,Management. New York, NY, USA: Wiley, 2013.

[24] Brambilla M, Cabot J, Wimmer M. Model-Driven Software Engineering in Practice. New York, NY, USA: Morgan& Claypool, 2010.

[25] Oldevik J. Mofscript User Guide. Version 0.6 (MOFScript v 1.1. 11), 2006.[26] Medina J, Harbour M, Drake J. The UML profile for schedulability, performance and time in the schedulability

analysis and modeling of real-time distributed systems. In: SIVOES-SPT Workshop; May 2004; Toronto, Canada.[27] Kuri M. A survey of wireless sensor network hardware platforms and simulation tools. Int J Com Sci 2013; 4: 26-31.[28] Chen Q, Schmidt-Eisenlohr F, Jiang D, Torrent-Moreno M, Delgrossi L, Hartenstein H. Overhaul of IEEE 802.11

modeling and simulation in ns-2. In: Proceedings of the 10th ACM Symposium on Modeling, Analysis, andSimulation of Wireless and Mobile Systems; 22–26 October; Chania, Greece. New York, NY, USA: ACM. pp.159-168.

[29] Polley J, Blazakis D, McGee J, Rusk D, Baras JS. Atemu: A fine-grained sensor network simulator. In: 2004 FirstAnnual IEEE Communications Society Conference on Sensor and Ad Hoc Communications and Networks; 4–7October 2004; Santa Clara, CA, USA. New York, NY, USA: IEEE. pp. 145-152.

[30] Titzer BL, Lee DK, Palsberg J. Avrora: Scalable sensor network simulation with precise timing. In: IPSN 2005Fourth International Symposium on Information Processing in Sensor Networks; 15 April 2005; Boise, ID, USA.New York, NY, USA: IEEE. pp. 477-482.

[31] Fraboulet A, Chelius G, Fleury E. Worldsens: Development and prototyping tools for application specific wirelesssensors networks. In: Proceedings of the 6th International Conference on Information Processing in Sensor Networks;25–27 April 2007; Cambridge, MA, USA. New York, NY, USA: ACM. pp. 176-185.

[32] Rincón FJ, Susu AE, Sánchez-Élez M, Atienza D, De Micheli G. A simulation model for wireless sensor networksbased on tossim. In: Proceedings of the XXII Conference on Design of Circuits and Integrated Systems; 21–23November 2007; Seville, Spain. pp. 278-283.

[33] Rastegarnia A, Solouk V. Castalia network animator (CNA): A visualization tool for Castalia wireless sensornetwork simulator. In: 2012 Ninth International Conference on Information Technology - New Generations; 16–18April 2012; Las Vegas, NV, USA. New York, NY, USA: IEEE. pp. 48-53.

[34] Varga A, Hornig R. An overview of the Omnet ++ simulation environment. In: Proceedings of the 1st InternationalConference on Simulation Tools and Techniques for Communications, Networks and Systems & Workshops; 3–7March 2008; Marseille, France. New York, NY, USA: ACM. pp. 60:1-60:10.

[35] Karray F, Garcia-Ortiz A, Jmal MW, Obeid M, Abid M. Earnpipe: A testbed for smart water pipeline monitoringusing wireless sensor network. Procedia Comput Sci 2016; 96: 285-294.

[36] Ye G, Soga K. Energy harvesting from water distribution systems. J Energ Eng 2011; 138: 7-17.

3286