model+baseddesignof/energy+efficient/ …...a.u.th. 2...

37
A.U.Th. Alexios Lekidis, Panagiotis Katsaros Department of Informatics, Aristotle University of Thessaloniki 1st International Workshop on Methods and Tools for Rigorous System Design (MeTRiD) Thessaloniki, Greece 15 April, 2018 Modelbased design of energyefficient applications for IoT systems 1

Upload: others

Post on 26-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th.

Alexios  Lekidis,  Panagiotis  Katsaros

Department of Informatics, Aristotle University of Thessaloniki

1st International Workshop on Methods and Tools for Rigorous System Design (MeTRiD)

Thessaloniki, Greece15 April, 2018

Model-­‐based  design  of  energy-­‐efficient  applications  for  IoT systems

1

Page 2: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 2

1) Challenges  towards  energy  estimation  in  the  IoT  ecosystem

2) Model-­‐based  characterization  of  energy  consumption  through  the  Contiki  OS  • Rigorous  system  design  method  based  on  the  

BIP  framework• Accurate  energy  profiling  through  powertrace  

3) Case  study:  Energy-­‐aware  building  management  system• Application  of  the  proposed  method• Requirement  verification

4) Conclusion  and  ongoing  work

Outline

Page 3: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 3

1) Challenges  towards  energy  estimation  in  the  IoT  ecosystem

2) Model-­‐based  characterization  of  energy  consumption  through  the  Contiki  OS  • Rigorous  system  design  method  based  on  the  BIP  framework• Accurate  energy  profiling  through  powertrace  

3) Case  study:  Energy-­‐aware  building  management  system• Application  of  the  proposed  method• Requirement  verification

4) Conclusion  and  ongoing  work

Outline

Page 4: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 4

• Resource  limitations  (e.g.  memory,  CPU,  battery)• System  heterogeneity• Sensors,  actuators• Operating  systems  (e.g.  Android,  iOS,  Contiki OS,  TinyOS)• Web  service  interaction  patterns  (e.g.  REST)• Connectivity  (e.g.  WiFi,  ZigBee,  Bluetooth,  NFC)• Measurement  units  (e.g.  Celsius,  Fahrenheit)

• Overall  code  complexity

IoT applications:  Constraints

Page 5: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 5

IoTsecurity

privacy storage

implementation

standardizationconnectivity Energy

management

Main  challenges  towards  IoT adoption

Page 6: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 6

IoTsecurity

privacy storage

implementation

standardizationconnectivity Energy

management

Main  challenges  towards  IoT adoption

Page 7: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 7

Why  energy  is  important?

Page 8: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 8

IoT  devices

Usually battery supply to widen the

applicable deployment possibilities

Page 9: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th.

• Special  purpose  tools  to  provide  feedback  about  overall  energy  consumption  by  simulation  or  after  the  deployment  

ü fine-grained analysis of the energy consumption at the network-level

Direct interaction with device hardware (not always supported)Device manufacturer characteristics, are not always accurate when compared with real measurements

Existing  approaches

Page 10: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 10

Ø Method allowing the proper characterization of all the parameters and scenarios that are impacting the energy consumption on a system-level

Solution:  Energy  characterization  

• Energy  characterization  through  distribution  fitting  • Energy  evolution  estimation  over  time

Average  power  consumption  of  the  device

(Source:  Borja  Martinez,  Marius  Monton,  Ignasi  Vilajosana  &  Joan  Daniel  Prades  (2015):  The  power  of  models:  Modeling  power  consumption  for  IoT  devices.  IEEE  Sensors  Journal  15(10),  pp.  5777–5789)

Page 11: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 11

1) Challenges  towards  energy  estimation  in  the  IoT  ecosystem

2) Model-­‐based  characterization  of  energy  consumption  through  the  Contiki  OS  • Rigorous  system  design  method  based  on  the  BIP  framework• Accurate  energy  profiling  through  powertrace  

3) Case  study:  Energy-­‐aware  building  management  system• Application  of  the  proposed  method• Requirement  verification

4) Conclusion  and  ongoing  work

Outline

Page 12: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 12

Introduction  to  Contiki IoT systems• Modular:  layered  system  construction• Full  support  from  application  development  libraries  to  integration  of  IoT platforms    • Native  simulation  environment  (i.e.  Cooja)• Loosely  coupled  REST  web  services  for  IoT application  development

Page 13: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 13

Energy  parameter  categoriesØ Analysis remark: The energy consumed when a device is in transmitting/receiving mode is

up to 5 times greater than in any other state

• Parameters  influencing  transmit/receive  functionalities  derive  in  their  majority  from  the  network  stack  • Grouping  according  to  the  layers  of  the  Contiki  stack  they  belong• MAC  layer• Application  layer• Physical  layer

Page 14: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 14

• Parameters  influencing  transmit/receive  functionalities  derive  in  their  majority  from  the  network  stack  • Grouping  according  to  the  layers  of  the  Contiki  stack  they  belong• MAC  layer• Application  layer• Physical  layer

Ø Analysis remark: The energy consumed when a device is in transmitting/receiving mode is 5 times greater than in any other state

Energy  parameter  categories

Page 15: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 15

Radio  duty  cycling  mechanismMAC

Energy  parameter  categories

Page 16: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 16

Application

• Protocol  choice  up  to  the  application  needs• Performance  (i.e.  CoAP)  vs  reliability  (i.e.  MQTT)

• Header  should  contain  all  the  contextual  info  for  packet  identification• In  scenarios  as  packet  forwarding  compression/decompression  is  very  energy  demanding

CoAP vs  MQTT usage  in  IoT applications  

Energy  parameter  categories

Page 17: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 17

Ø Definition:  Interference  is  defined  in  the  form  of  additive  noise from  simultaneous  transmissions  with  the  same  radio  frequency  from  proximity  networks• Increased  packet  collision• Nodes  remain  in  Tx for  longer  time  durations

CommMedium

Energy  parameter  categories

Page 18: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 18

Proposed  method

Page 19: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 19

Proposed  method

Page 20: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 20

Proposed  method

Page 21: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 21

Proposed  method

Page 22: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 22

Proposed  method

Page 23: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th.

• BIP  models  for  every  level  of  the  IoT architecture  with  two  layers:– RESTful  Application  Model  (REST  module  allocated  to  every  node)– Contiki Kernel  Model  (Contiki OS,  protocol  stack)

Modeling  Contiki IoT systems  in  BIP[Wiley  SPE,  2018]

Page 24: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 24

Proposed  method

Page 25: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th.

• Contiki library  for  monitoring  the  energy  flow  in  IoT devices

25

• Monitoring  in  distinct  operating  modes:• Low  Power  (LPM):  idle  device  waiting  for  events• CPU:  used  for  calculations/data  processing• Radio  transmission  (Tx):  data  transmission• Radio  reception  (Rx):  data  reception

Powertrace

• Duty    cycle:  percentage  of  time  that  a  device  remains  in  one  operating  mode• Lifetime:  total  time  duration  for  autonomous  operation

Page 26: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th.

• Injects  energy-­‐oriented  behavior  and  characteristics  to  the  model  for  every  operating  mode  of  each  device:

• Calibrated  by  probabilistic  distributions  – Obtained  from  the  analysis  of  debugging  traces  from  the  Contiki

simulation  environment  as  well  as  the  powertrace module

ρ1

λTx

ρ2

λRx

Energy  model

Page 27: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 27

1) Challenges  towards  energy  estimation  in  the  IoT  ecosystem

2) Model-­‐based  characterization  of  energy  consumption  through  the  Contiki  OS  • Rigorous  system  design  method  based  on  the  BIP  framework• Accurate  energy  profiling  through  powertrace  

3) Case  study:  Energy-­‐aware  building  management  system• Application  of  the  proposed  method• Requirement  verification

4) Conclusion  and  ongoing  work

Outline

Page 28: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 28

Building  Management  System  topologyAim: Energy management through remote control of buildings by a WAN network that consists of multiple WPAN networks, one for each building floor

WPAN network WPAN network

WAN network

Page 29: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 29

BMS  network  architecture

Floor  1

B-­‐RTR

B-­‐RTR

B-­‐ASC

B-­‐ASC

CoAP

 /  M

QTT

Network  switch

B-­‐ASC

B-­‐RTR

B-­‐ASC

B-­‐RTR

Floor  2

Floor  3

Floor  4

Zolertia  Z1controller

Sky  motecontroller

OpenMotecontroller

SimpleLink  Sensortagcontroller

Page 30: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 30

Verification of  example requirements• Concern  the IoT device lifetime, as well as the IoT device duty-

cycle in different operating modes• Requirement 1. Device lifetime should be at least 1 week.• Requirement 2. The duty-cycle in the LPM mode should remain

higher than 90% during working hours.• Requirement 3. The duty-cycle in the Rx mode should not exceed

20% during working hours.

Page 31: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 31

• Concern  the IoT device lifetime, as well as the IoT device duty-cycle in different operating modes

• Requirement 1. Device lifetime should be at least 1 week.• Requirement 2. The duty-cycle in the LPM mode should remain

higher than 90% during working hours.• Requirement 3. The duty-cycle in the Rx mode should not exceed

20% during working hours.

Verification of  example requirements

Page 32: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 32

Energy parameter impact  in  device lifetime𝜑" = 𝑙𝑓 ≥ 168

𝑃(𝜑") =  0.9  𝑓𝑜𝑟:1)  𝑓𝑖𝑥𝑒𝑑  𝑑𝑒𝑓𝑎𝑢𝑙𝑡  𝑝𝑎𝑟𝑎𝑚𝑒𝑡𝑒𝑟  𝑣𝑎𝑙𝑢𝑒𝑠2) 𝑝𝑎𝑟𝑎𝑚𝑒𝑡𝑒𝑟  𝑣𝑎𝑙𝑢𝑒𝑠  𝑤𝑖𝑡ℎ𝑖𝑛  𝑡ℎ𝑒  𝑎𝑙𝑙𝑜𝑤𝑒𝑑  𝑡𝑜𝑙𝑒𝑟𝑎𝑛𝑐𝑒  

Page 33: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 33

• Concern  the IoT device lifetime, as well as the IoT device duty-cycle in different operating modes

• Requirement 1. Device lifetime should be at least 1 week.• Requirement 2. The duty-cycle in the LPM mode should remain

higher than 90% during working hours.• Requirement 3. The duty-cycle in the Rx mode should not exceed

20% during working hours.

Verification of  example requirements

Page 34: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 34

Duty cycle  during working hours

𝜑D = 𝐷FG ≤ 20%

𝑃(𝜑D) =  0.8    𝑤𝑖𝑡ℎ  𝑡ℎ𝑒  𝐿𝑜𝑤 − 𝑃𝑜𝑤𝑒𝑟  𝑃𝑟𝑜𝑏𝑖𝑛𝑔  𝑑𝑢𝑡𝑦  𝑐𝑦𝑐𝑙𝑒  𝑝𝑟𝑜𝑡𝑜𝑐𝑜𝑙    𝑃(𝜑D) =  0    𝑤𝑖𝑡ℎ𝑜𝑢𝑡  𝑎  𝑑𝑢𝑡𝑦  𝑐𝑦𝑐𝑙𝑒  𝑝𝑟𝑜𝑡𝑜𝑐𝑜𝑙

Page 35: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 35

• Νovel method  for  characterizing  the  energy  consumption  in  IoTapplications and  the  individual  IoT devices

• Energy-­‐aware  parameter  configuration  • RESTful  service-­‐based  applications  over  Contiki OS  nodes

• Validating  requirements  related  to  energy  characteristics• Building  Management  System  consisting  of  various  devices  (e.g.  

Zolertia Z1,  Sky  mote,  OpenMote,  SimpleLink Sensortag)• System  requirements  concerning  device  lifetime  and  duty  

cycle

Conclusions

Page 36: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

A.U.Th. 36

Perspectives

• Energy  optimization  techniques  for  the  IoT applications• Large-­‐scale  testbed  to  demonstrate  the  scalability  of  the  proposed  method  

• Impact  of  remote  control  in  the  overall  energy  consumption  of    the  building  

• Smarter  logic  actions  in  the  Building  Management  Controller  (e.g.  shutting  down  the  heating  and  lighting  system  in  the  absence  of  motion)

Page 37: Model+baseddesignof/energy+efficient/ …...A.U.Th. 2 1)Challenges"towards"energyestimation"in"the"IoT" ecosystem 2)Model

ARISTOTLEUNIVERSITY  OFTHESSALONIKI

Thank you for your attention.Questions?

Further info: [email protected], [email protected]