ME4AWSN - a Modeling Environment for Architecting WSNs
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

ME4AWSN - a Modeling Environment for Architecting WSNs

on

  • 722 views

Advanced Software Engineering course - Guest Lecture ...

Advanced Software Engineering course - Guest Lecture

ME4AWSN - a Modeling Environment for Architecting WSNs

Here you can find the research paper presenting the concepts described in this lecture: http://goo.gl/XBB4k

This presentation has been developed in the context of the Advanced Software Engineering course at the DISIM Department of the University of L’Aquila (Italy).

http://www.di.univaq.it/malavolta

Statistics

Views

Total Views
722
Views on SlideShare
719
Embed Views
3

Actions

Likes
0
Downloads
19
Comments
0

2 Embeds 3

https://twitter.com 2
http://www.docshut.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

ME4AWSN - a Modeling Environment for Architecting WSNs Presentation Transcript

  • 1. Università degli Studi dell’AquilaME4AWSN Ivano Malavolta DISIM Department, University of L’Aquila ivano.malavolta@univaq.it
  • 2. The material in these slides may be freely reproducedand distributed, partially or totally, as far as an explicitreference or acknowledge to the material author ispreserved. Ivano Malavolta
  • 3. Problem DefinitionME4AWSN Software Architecture Nodes Configuration Physical Environment Keeping Models IntegratedExample
  • 4. What is a Modeling Environment?A software application that provides comprehensivefacilities for developing models• model creation, deletion• model editing (graphical, textual, ...)• syntax rules enforcing ... what about modeling frameworks?• ...
  • 5. From the SESENA 2012CfP: Abstraction“the development of WSN software is still carried out in a ratherprimitive fashion, by building software directly atop the OS and byrelying on an individuals hard-earned programming skills”“WSN developers must face not only the functional applicationrequirements but also a number of challenging, non-functionalrequirements and constraints resulting from scarce resources” Separation of Model-based concerns Analysis
  • 6. Abstractionby masking the complexity of low-level, hardware details Separation of concernsby clearly separating SW, HW, and deployment aspects ofa WSN Model-based Analysisby facilitating the analysis of both functional and non-functional properties
  • 7. in this lecture we focus on this part Separation of Model-BasedAbstraction concerns Analysis
  • 8. Problem DefinitionME4AWSN Software Architecture Nodes Configuration Physical Environment Keeping Models IntegratedExample
  • 9. It is composed of 3 modeling languages Physical Details about environment WSN nodes SoftwareArchitecture
  • 10. Structure components ports application data messagesBehaviour events conditions actions
  • 11. Component. A unit of computation with internal state and welldefined interface. Each component can contain a behaviourspecification and a set of application data.MessagePort. Specifies the interaction point between acomponent and its external environment. Incoming messages arrive at InMessagePorts Outgoing messages are sent via OutMessagePortsConnection. It is a unidirectional communication channelbetween two message ports.
  • 12. Application Data. Local variables declared in the scope of thecomponent. It is manipulated by actions defined in thebehaviour of the component.There are two types of application data:• Primitive • integer, string, real, boolean• Structured • Enumeration • Structure
  • 13. Operations on Application Data:• arithmetic • + - / * Assignment is done via• boolean a dedicated Action in • AND, OR, NOT the behaviour• relational • > >= < <= !=Application data referenceStructure Member reference
  • 14. Each Component can contain a description of its behaviourThe behaviour is based on:1. Events-conditions-actions2. Modes
  • 15. Each Component can perform actions: Sense gets some data from a sensor and stores the read value into a specific application data ex: get current temperature Actuate activates and actuator, optionally an application data can be used to pass a parameter to the actuator ex: actuate a water sprinkler
  • 16. SendMessage sends a message via a specific message portOptionally, the payload of the message can be specified bypassing an application data as parameterTypes of available messages: Unicast to a single receiver Multicast to a set of receivers Broadcast to every node containing the target component
  • 17. StartTimer starts a timer which can be triggered latercyclic: true if the timer must be periodicdelay: the time (in millisecs) that must pass before the first activationperiod: the period of the timer (in millisecs), if it is a cyclic oneStopTimer stops a previously started timerStoreData puts some (manipulated) data into anapplication data of the component
  • 18. SyncServiceCall calls an external service (ex. web service)data: optional, it is the parameters that can be passed to the servicedataRecipient: the application data which will be filled with the resultAsyncServiceCall calls an external service, the result of thecall will be available via a dedicated eventdata: optional, it is the parameters that can be passed to the serviceFork and Join are used to sync the control flow
  • 19. Each component can react to specific kinds of events: ServiceCallback is triggered when the result of an AsyncServiceCall is available dataRecipient: the application data which will be filled with the result ReceiveMessage is triggered when the component receives a message dataRecipient: the application data which will contain the payload fromMessagePort: the port that received the message TimerFired is triggered when a previously started timer is activated
  • 20. Behavioural flow is specified by means of LinksA link can exist:1. from an event E to an action A: in this case after the event E is triggered, A will be executed2. from an action A1 to another action A2: in this case, A2 is executed immediately after A1Conditions are boolean expressions (optionally) associated to linksThe execution flow goes through a link only if its condition evaluates to true
  • 21. A mode is a specific status of the component ex. sleeping mode, energy saving mode, etc.Initial Mode is the first mode which is active when the componentstarts upAt any given time, one and only one mode can be active in acomponentThe component reacts only to those events which are definedwithin its currently active mode
  • 22. A component can switch from a mode to another by means ofmode transitionsMode transitions link together modes by passing... from a special kind of action called ExitMode to a special kind of event called EnterModein this way actions and events can be linked to modes entry and exit points,creating a continuous flow among modes
  • 23. Problem DefinitionME4AWSN Software Architecture Nodes Configuration Physical Environment Keeping Models IntegratedExample
  • 24. Types of nodes OS MAC protocol routing protocol installed sensors installed actuators energy sources communication devices
  • 25. A nodes specification is composed of a set of WSN node typesNode Attributes:• OS • ex. TinyOS, Contiki, Mantis, LiteOS, ...• macProtocol • ex. T-MAC, S-MAC, WiseMAC, SIFT, ...• routingProtocol • ex. GEAR, LEACH, HEED, ...
  • 26. Node Sensors Sensors Microcontroller Sensors Memory RF MemoryADC Memory CPU Actuators CPU CPU ActuatorsDAC Actuators Timer RFMemory Program memory RF RF Energy Source Energy Source Energy Sources
  • 27. The following elements can be attached to a WSN node:• energy sources (one or more) • continuous • degradable (initialStoredEnergy in Joule) • harvested (initialStoredEnergy in Joule, harvestingEnergyRate in Joule)• sensors (zero or more) energyConsumptionPerSample (mJ), idleEnergyConsumption (mJ) ex. light sensor, temperature sensor, radio sensor, ...• actuators (zero or more) energyConsumptionPerSample (mJ), idleEnergyConsumption (mJ) ex. water sprinkler, leds, lights, heating system switch, ...
  • 28. A node can contain the following elements:• RF Communication Device (zero or more) represents the radio device to communicate with other nodes Attributes: float transmissionPower in dBm float receiveSensitivity in dBm float[1] frequency in MHz float antennaGain in dBd String modulation // name of the modulation method String encryption // name of the enc. algorithm
  • 29. A node can contain the following elements:• Memories (one or more) represents external storage memories of the node Attributes: float averageReadingEnergyConsumption in mW float averageWritingEnergyConsumption in mW int[1] size in Kb
  • 30. Microcontroller (one) represents the entity which performs tasks, processes data and controls the functionality of other components in the sensor node Microcontroller 0_1 1_* 0_* ADC RF CPU CPU 0_* DAC CPU Timer 1_* Memory Program memory 1_1 1_1
  • 31. • ADC (zero or more) Attributes: int resolution // # discrete values it can produce int bits // 8 bits, 16 bits int channels // #channels• DAC (zero or more) Attributes: int resolution // # discrete values it can produce int bits // 8 bits, 16 bits
  • 32. • Processor (one or more) Attributes: int[1] frequency in MHz float[1] cpi // cycles per instruction• Timer (one or more) Attributes: int bits // 8 bits, 16 bits• RF Communication Device (0_1) – internal radio transceiver• Memory (one) – same role as RAM memory in PCs• Program Memory (one) – stores the program running on the node
  • 33. A Node can specify a set of Power ModesEach power mode identifies a set of node elements (such asmemory, DAC, RF comm. device, etc.) and distinguishes betweenwhich elements are active and which elements are disabled Mode A Mode B
  • 34. Problem DefinitionME4AWSN Software Architecture Nodes Configuration Physical Environment Keeping Models IntegratedExample
  • 35. A 2D space with obstacles freely positioned with their own shape with attenuation coefficients
  • 36. The Environment represents the overall area in the 2D space inwhich the WSN will be deployedAttributes: string name // the name of the area float [1] width // the width of the bounding box of the area float [1] height // the height of the bounding box of the area imagePath // the image used as background in the editorThe environment contains a set of Obstacles
  • 37. An Obstacle specifies any kind of relevant element which can beplaced in the environmentAttributes: string material // the name of the material of the obstacle (ex. concrete wall, wooden door, glass, ...) float [1] attenuation // the “thickness” of the obstacle // it ranges from 0 to 1 Coordinate [2_*] shell // the perimeter of the obstacle in the 2D space
  • 38. Problem DefinitionME4AWSN Software Architecture Nodes Configuration Physical Environment Keeping Models IntegratedExample
  • 39. Two special models that link together SA, nodes andenvironment specifications
  • 40. Weaves together an SAML model and a NODEML modelIt defines how components are deployed into each configured nodesTypes of link:• Mapping maps a component to its corresponding node configuration• Sensor Mapping maps a Sense action in a component to a Sensor ina node• Actuator Mapping similar to the Sensor Mapping, but for actuators• Communication Device Mapping maps a Message Port in acomponent to an RFCommunicationDevice in a node• Mode Mapping maps a Mode in a component to a Power Mode in anode
  • 41. MAPML models semantically represent the classical notion ofdeployment of software components onto HW nodesSeparation of ConcernsIt helps in clearly separating the application layer of a WSN fromall the other lower levels this aspect is new in the WSN domainArchitects can focus on the application from a functional point of view inSAML, and only later they will focus on low-level aspects
  • 42. Weaves together a NODEML model and an ENVML modelIt defines how node configuration are1. instantiated, and2. virtually deployed in the physical environmentA DEPML model presents a single type of link: Deployment LinkA deployment link considers a node configuration in the NODEMLmodel, and assigns it to an area within the physical environment
  • 43. An area is a portion of physical environment (i.e., the environmentelement defined in the ENVML model)Each node type can be instantiated ”n” times within a specific area this allow architects to focus on generic components andnode types in SAML and NODEML, while in DEPML we consider thefinal shape of the networkAn area has two properties:1. Shape: the perimeter of the area defined as a set of coordinates2. NodesDistribution: how the “n”nodes are positioned in the area
  • 44. Nodes can be distributed in three different ways: Random Grid Custom each node is placed nodes are placed on a each node can be manually grid with a certainrandomly within the area placed within the area number of rows and columns N2 N1 N1 BS N3
  • 45. In custom distribution, each node can be N2 N1individually specified in the area by: N1 BS1. its name N32. the coordinates of its positionA nodes name pattern cane be given to an area independently from the distribution type they are used to have a way to refer to the names used as targets of Send Message actions in SAML models Available patterns: name<number>, name<Letter>, name
  • 46. Graphical and Tree-based editor for SAMLmodels graphical editor palette bird view properties
  • 47. NODEML: Graphical and Tree-based editorDEPML: Graphical editor with background imageMAPML: Tree-based editorDEPML: Tree-based editor
  • 48. languages programming refinement framework definitionmodeling code generators model-based editors analysis tools
  • 49. The fire alarm system considered is composed of two types of sensors thatare temperature and smoke sensors. There are also sprinkler actuators thatare used to enable the water flow in case of fire.Temperature sensors monitor the temperature at regular intervals (every 30seconds). When a temperature sensor reads a value that exceeds a specifiedthreshold, it sends an alert message to the base station.Each smoke sensor receives the alert and checks for smoke. When a smokesensor detects smoke it sends an alarm message to the sprinklers to activatethe water flow.The automatic heating system is composed of the same temperature sensorsof the fire alarm system, a base station and various heaters.Temperature sensors send readings every 30 seconds to a base station. Thisis placed at the centre forming a star topology.The base station averages the readings and decides whether or not thecentral heating system should be on.