SlideShare a Scribd company logo
Alexios Lekidis, Paraskevas Bourgos, Simplice Djoko-Djoko, Marius!
Bozga, Saddek Bensalem!
Univ. Grenoble Alpes, VERIMAG, F-38000 Grenoble, France!
CNRS, VERIMAG, F-38000 Grenoble, France!
IEEE Sensors Applications Symposium!
Zadar, Croatia !
12-15 April, 2015!
Building Distributed Sensor Network
Applications using BIP!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 1/33!
Sensor Networks: Application domains!
EnvironmentHealthcare Transportation
High-energy physics Manufacturing Agriculture
EnvironmentHealthcare Transportation
High-energy physics Manufacturing Agriculture
and many more…
Sensor Networks: Application domains!
Outline!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 2/33!
1)  Sensor	
  Networks:	
  Overview	
  and	
  development	
  challenges	
  
2)  Proposed	
  design	
  flow	
  
•  Modeling	
  the	
  Applica?on	
  So@ware	
  in	
  PPM	
  
•  Code	
  genera?on	
  in	
  Distributed	
  Sensor	
  Network	
  PlaEorms	
  
•  Background	
  on	
  BIP	
  	
  
3)  Case	
  study:	
  Industrial	
  Mul?media	
  WSN	
  Applica?on	
  
•  Code	
  genera?on	
  from	
  the	
  PPM	
  Applica?on	
  Model	
  
•  Construc?on	
  of	
  the	
  System	
  Model	
  in	
  BIP	
  
•  BIP	
  System	
  Model	
  Calibra?on	
  
4)  Conclusion	
  and	
  ongoing	
  work	
  
Outline!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 2/33!
1)  Sensor	
  Networks:	
  Overview	
  and	
  development	
  challenges	
  
2)  Proposed	
  design	
  flow	
  
•  Modeling	
  the	
  Applica?on	
  So@ware	
  in	
  PPM	
  
•  Code	
  genera?on	
  in	
  Distributed	
  Sensor	
  Network	
  PlaEorms	
  
•  Background	
  on	
  BIP	
  	
  
3)  Case	
  study:	
  Industrial	
  Mul?media	
  WSN	
  Applica?on	
  
•  Code	
  genera?on	
  from	
  the	
  PPM	
  Applica?on	
  Model	
  
•  Construc?on	
  of	
  the	
  System	
  Model	
  in	
  BIP	
  
•  BIP	
  System	
  Model	
  Calibra?on	
  
4)  Conclusion	
  and	
  ongoing	
  work	
  
Sensor networks: Device constraints!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 3/33!
BaMery	
  life?me	
  is	
  limited..	
  	
  
What	
  happens	
  in	
  case	
  of	
  failure?	
  
•  Scarce	
  resources	
  
•  Communica?on	
  cost	
  
•  Consumed	
  energy	
  
•  Memory	
  usage	
  
•  Network	
  bandwidth	
  
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 3/33!
BaMery	
  life?me	
  is	
  limited..	
  	
  
What	
  happens	
  in	
  case	
  of	
  failure?	
  
•  Scarce	
  resources	
  
•  Communica?on	
  cost	
  
•  Consumed	
  energy	
  
•  Memory	
  usage	
  
•  Network	
  bandwidth	
  
Sensor networks: Device constraints!
Sensor networks: Timing constraints!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 4/33!
•  Many	
  applica?on	
  require	
  accurately	
  3mestamped	
  data	
  
Sensor networks: Timing constraints!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 4/33!
•  Many	
  applica?on	
  require	
  accurately	
  3mestamped	
  data	
  
•  Characteristic example: Multimedia Wireless Sensor
Network (MWSN) applications	
  
Sensor networks: Timing constraints!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 5/33!
•  Each	
  sensor	
  node	
  has	
  a	
  fixed	
  ?me	
  granularity	
  
which	
  varies	
  according	
  to	
  the	
  opera?ng	
  frequency	
  
of	
  its	
  clock	
  
Clock	
  Time	
  C(t)	
  
Real	
  Time	
  t	
  
(Faster	
  clock)	
  
(Reference	
  clock)	
  
(Slower	
  clock)	
  
t2	
  
t1	
  
t0	
  
t0	
  
Sensor networks: Timing constraints!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 5/33!
How to obtain a common time reference in
a distributed system?
Solution: Clock synchronization
Clock	
  Time	
  C(t)	
  
Real	
  Time	
  t	
  
(Faster	
  clock)	
  
(Reference	
  clock)	
  
(Slower	
  clock)	
  
t2	
  
t1	
  
t0	
  
t0	
  
Sensor networks: Clock synchronization!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 6/33!
•  Several	
  well	
  known-­‐protocols	
  opera?ng	
  either	
  in	
  the	
  
so6ware	
  or	
  hardware	
  level	
  
•  Target	
  synchroniza3on	
  accuracy:	
  Microsecond	
  scale	
  (μs)	
  
•  Improved	
  accuracy	
  with	
  enhancements	
  as:	
  
•  Round-­‐Trip	
  Delay	
  (RTD)	
  calcula?on	
  
•  Requires	
  more	
  energy	
  
•  Dedicated	
  drivers	
  for	
  hardware	
  access	
  
•  May	
  not	
  be	
  available	
  in	
  lightweight	
  environments	
  
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 6/33!
Sensor networks: Clock synchronization!
RTD	
  calcula3on	
  
in	
  Precision	
  Time	
  
Protocol	
  (PTP)	
  	
  
•  Several	
  well	
  known-­‐protocols	
  opera?ng	
  either	
  in	
  the	
  
so6ware	
  or	
  hardware	
  level	
  
•  Target	
  synchroniza3on	
  accuracy:	
  Microsecond	
  scale	
  (μs)	
  
•  Improved	
  accuracy	
  with	
  enhancements	
  as:	
  
•  Round-­‐Trip	
  Delay	
  (RTD)	
  calcula?on	
  
•  Requires	
  more	
  energy	
  
•  Dedicated	
  drivers	
  for	
  hardware	
  access	
  
•  May	
  not	
  be	
  available	
  in	
  lightweight	
  environments	
  
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 6/33!
•  Several	
  well	
  known-­‐protocols	
  opera?ng	
  either	
  in	
  the	
  
so6ware	
  or	
  hardware	
  level	
  
•  Target	
  synchroniza3on	
  accuracy:	
  Microsecond	
  scale	
  (μs)	
  
•  Improved	
  accuracy	
  with	
  enhancements	
  as:	
  
•  Round-­‐Trip	
  Delay	
  (RTD)	
  calcula?on	
  
•  Requires	
  more	
  energy	
  
•  Dedicated	
  drivers	
  for	
  hardware	
  access	
  
•  May	
  not	
  be	
  available	
  in	
  lightweight	
  environments	
  
•  Promising	
  protocol	
  family	
  using	
  the	
  Kalman	
  filter	
  algorithm	
  
•  Dynamically	
  adap?ng	
  to	
  the	
  advance	
  of	
  the	
  reference	
  clock	
  
Sensor networks: Clock synchronization!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 7/33!
•  Heterogeneity	
  of	
  devices	
  
•  Communica?on	
  latencies	
  
•  Conflicts	
  in	
  message	
  passing	
  through	
  
the	
  protocol	
  stack	
  	
  
Sensor networks: Application development!
Considerable	
  cost	
  in	
  3me	
  and	
  
development	
  effort	
  
No	
  guarantee	
  that	
  design	
  errors	
  are	
  fixed	
  before	
  deployment	
  
makeSense	
  project	
  
(www.project-­‐makesense.eu)	
  
P1	
   P2	
  P2	
   P3	
   P4	
  
Application Software	
  
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 8/33!
Master	
  
Sound	
  
card	
  
Wifi	
  
card	
  
Node	
  1	
  
WiFi	
  
Access	
  Point	
  
(AP)	
  
Slave	
  
Sound	
  
card	
  
Wifi	
  
card	
  
Node	
  N	
  
Sensor networks: Application deployment!
Sensor Network Distributed Platform	
  
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 8/33!
Master	
  
Sound	
  
card	
  
Wifi	
  
card	
  
Node	
  1	
  
WiFi	
  
Access	
  Point	
  
(AP)	
  
Slave	
  
Sound	
  
card	
  
Wifi	
  
card	
  
Node	
  N	
  
Sensor networks: Application deployment!
Application Software	
  
Sensor Network Distributed Platform	
  
P1	
   P2	
  P2	
   P3	
   P4	
  
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 8/33!
Master	
  
Sound	
  
card	
  
Wifi	
  
card	
  
Node	
  1	
  
WiFi	
  
Access	
  Point	
  
(AP)	
  
Slave	
  
Sound	
  
card	
  
Wifi	
  
card	
  
Node	
  N	
  
Sensor networks: Application deployment!
How to choose which
application process goes to !
which sensor node?
Sensor Network Distributed Platform	
  
Application Software	
  
P1	
   P2	
  P2	
   P3	
   P4	
  
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 9/33!
•  Design	
  flow	
  for	
  the	
  development	
  of	
  func3onal	
  	
  	
  	
  	
  	
  	
  
WSN	
  applica?ons	
  
•  Ensures	
  separa3on	
  of	
  concerns	
  
•  Applica?on	
  So6ware	
  and	
  hardware	
  architecture	
  
considered	
  independently	
  
•  Deployment	
  based	
  on	
  the	
  op?mal	
  methodology	
  for	
  
each	
  applica?on	
  
•  Model-­‐based:	
  Modularity,	
  reusability	
  of	
  ar3facts	
  
•  Considers	
  all	
  the	
  constraints	
  of	
  sensor	
  networks	
  and	
  	
  
facilitates	
  applica?on	
  development	
  through:	
  	
  
•  Performance	
  Analysis	
  of	
  system	
  requirements	
  
•  Automated	
  Code	
  Genera3on
Proposed method!
Outline!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 10/33!
1)  Sensor	
  Networks:	
  Overview	
  and	
  Development	
  Challenges	
  
2)  Proposed	
  Design	
  flow	
  
•  Modeling	
  the	
  Applica?on	
  So@ware	
  in	
  PPM	
  
•  Code	
  genera?on	
  in	
  Distributed	
  Sensor	
  Network	
  PlaEorms	
  
•  Background	
  on	
  BIP	
  	
  
3)  Case	
  study:	
  Industrial	
  Mul?media	
  WSN	
  Applica?on	
  
•  Code	
  genera?on	
  from	
  the	
  PPM	
  Applica?on	
  Model	
  
•  Construc?on	
  of	
  the	
  System	
  Model	
  in	
  BIP	
  
•  BIP	
  System	
  Model	
  Calibra?on	
  
4)  Conclusion	
  and	
  ongoing	
  work	
  
Application
Software (PPM)
Mapping/HW
information (PPM)
Sensor Network
HW
Specifications
(XML)
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 11/33!
Design flow for WSN Applications !
Inputs	
  
Abstract System Model (BIP)
Application
Software (PPM)
modeling (1)
Mapping/HW
information (PPM)
Sensor Network
HW
Specifications
(XML)
Sensor Network
Library Components
(BIP)
code generation (2)
Sensor Network
C/C++ Code
Sensor Network/
HW Code
Templates
+Configurations
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 11/33!
Design flow for WSN Applications !
Developed	
  
framework	
  
Abstract System Model (BIP)
Application
Software (PPM)
System Model (BIP)
modeling (1)
SMC
calibration (3)
Mapping/HW
information (PPM)
Sensor Network
HW
Specifications
(XML)
Sensor Network
Library Components
(BIP)
code generation (2)
analysis (4)
Sensor Network
C/C++ Code
Execution
Sensor Network/
HW Code
Templates
+Configurations
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 11/33!
Design flow for WSN Applications !
Outputs	
  
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 12/33!
Abstract System Model (BIP)
Application
Software (PPM)
System Model (BIP)
modeling (1)
SMC
calibration (3)
Mapping/HW
information (PPM)
Sensor Network
HW
Specifications
(XML)
Sensor Network
Library Components
(BIP)
code generation (2)
analysis (4)
Sensor Network
C/C++ Code
Execution
Sensor Network/
HW Code
Templates
+Configurations
Design flow for WSN Applications !
Pragmatic Programming Model (PPM)!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 13/33!
•  Descrip?on	
  language	
  facilita?ng	
  the	
  development	
  of	
  
sensor	
  network	
  applica3ons	
  
•  XML	
  format	
  providing	
  the	
  possibility	
  to	
  reference	
  C	
  files	
  as	
  
external	
  libraries	
  
•  Applica?on	
  So@ware	
  described	
  as	
  a	
  network	
  of	
  
communica3ng	
  processes	
  
•  Communica?on	
  through	
  shared	
  objects,	
  such	
  as:	
  
•  FIFO	
  
•  Shared	
  memory	
  
•  Mutexed	
  loca?on	
  
PPM Example: Application Software!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 14/33!
synchro	
   PLL	
  
FIFO
Process Process
PPM Example: XML description !
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 14/33!
<header	
  lang="c"	
  file="global.h"/>	
  	
  
<process	
  name="pll"	
  process-­‐class="WhileFire">	
  
<port	
  name="out"	
  peer-­‐class="FIFO"	
  peer-­‐name="in"/>	
  
<header	
  lang="c"	
  file="pll_state.h"	
  x-­‐state="true"/>	
  
<header	
  lang="c"	
  file="pll.h"/><source	
  lang="c"	
  file="pll.c”>	
  
<source	
  lang="c"	
  file="SPM_clock.c"	
  libs="-­‐lblas	
  -­‐lm	
  -­‐lrt"/>	
  
</process>	
  
...	
  
<shared-­‐object	
  name="SO1"	
  object-­‐class="FIFO"	
  size="4"	
  item-­‐size="64">	
  
<port	
  name="in"/>	
  
<port	
  name="out"/>	
  
</shared-­‐object>	
  
...	
  
<connec?on>	
  
<port-­‐ref	
  node="SO1"	
  port="out"/>	
  
<port-­‐ref	
  node="pll"	
  port="in"/>	
  
</connec?on>	
  
synchro	
   PLL	
  
FIFO
Process Process
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 14/33!
#include	
  "pll_process.h”	
  
void	
  pll_init(pll_process	
  *p)	
  {	
  	
  	
  	
  	
  
	
  (p-­‐>local-­‐>pll).stream_size	
  =	
  1;	
  	
  	
  	
  	
  
	
  (p-­‐>local-­‐>pll).block_size	
  =	
  (unsigned	
  int)	
  sizeof(clockOut_t);	
  	
  	
  	
  	
  
	
  (p-­‐>local-­‐>pll).data_in	
  =	
  malloc((p-­‐>local-­‐>pll).block_size);	
  	
  	
  	
  	
  	
  
	
  p-­‐>local-­‐>data_size	
  =	
  (p-­‐>local-­‐>pll).block_size;	
  
}	
  
int	
  pll_fire(pll_process	
  *p)	
  {	
  	
  	
  	
  	
  
	
  FIFO_read(p-­‐>in,	
  (p-­‐>local-­‐>pll).data_in,	
  (p-­‐>local-­‐>pll).block_size);	
  	
  	
  	
  
	
  gelmeofday	
  (	
  &(p-­‐>local-­‐>slave_?me),	
  NULL	
  );	
  	
  	
  	
  	
  
	
  uint64_t	
  slave_clock	
  =	
  (	
  (	
  uint64_t	
  )	
  p-­‐>local-­‐>slave_?me.tv_sec	
  *	
  	
  	
  	
  	
  	
  	
  
	
  (	
  uint64_t	
  )	
  1000000	
  )	
  +	
  (	
  uint64_t	
  )	
  p-­‐>local-­‐>slave_?me.tv_usec;	
  	
  	
  	
  	
  
	
  clockOut_t*	
  master_frameClock	
  =	
  (	
  clockOut_t*	
  )	
  (p-­‐>local-­‐>pll).data_in;	
  	
  	
  	
  	
  
	
  master_clock	
  =	
  master_frameClock-­‐>?me;	
  	
  	
  	
  	
  
	
  pll_clock_in	
  (	
  slave_clock,	
  master_clock,	
  p-­‐>local-­‐>argument);	
  	
  	
  
return	
  0;	
  
}	
  
PPM Example: Process behavior!
•  Described	
  as	
  the	
  program:	
  
•  P	
  init();while(true)P	
  fire();	
  	
  
•  Communica?on	
  through:	
  
•  Read	
  (e.g.	
  FIFO_read)	
  
•  Write	
  (e.g.	
  FIFO_write)	
  
synchro	
   PLL	
  
FIFO
Process Process
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 14/33!
PPM Example: Application deployment!
Master	
  
Sound	
  
card	
  
Wifi	
  
card	
  
WiFi	
  
Access	
  Point	
  
(AP)	
  
Slave	
  
Sound	
  
card	
  
Wifi	
  
card	
  
UDOO	
  Node	
  N	
  UDOO	
  Node	
  1	
  
synchro	
   PLL	
  
FIFO
Process Process
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 14/33!
<deployment>	
  	
  
<app-­‐node	
  name="pll"/>	
  	
  
<hw-­‐element	
  name="node"	
  hw-­‐class="udoo"	
  index="0"/>	
  	
  
<hw-­‐property	
  name="networkInterface"	
  hw-­‐class="node-­‐inter"	
  value="wlan0"/>	
  	
  
<hw-­‐property	
  name="srcPort"	
  hw-­‐class="node-­‐srcPort"	
  value="375"/>	
  	
  
<hw-­‐property	
  name="dstPort"	
  hw-­‐class="node-­‐dstPort"	
  value="250"/>	
  	
  
<hw-­‐property	
  name="dstIP"	
  hw-­‐class="node-­‐dstIP"	
  value="10.0.0.14"/>	
  
</deployment>	
  
PPM Example: Application deployment!
synchro	
   PLL	
  
FIFO
Process Process
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 15/33!
•  Each	
  process	
  is	
  implemented	
  as	
  a	
  thread	
  
•  Threads	
  allocated	
  to	
  sensor	
  nodes	
  according	
  to	
  applica?on	
  
deployment	
  in	
  PPM	
  
•  Shared	
  objects	
  implemented	
  according	
  to	
  the	
  underlying	
  	
  	
  	
  	
  
hardware	
  plaUorm	
  	
  
•  FIFO_read	
  and	
  FIFO_write	
  primi?ves	
  replaced	
  by	
  API	
  func3on	
  calls	
  
of	
  the	
  supported	
  communica?on	
  protocol	
  (i.e.	
  Linux	
  sockets	
  
parameterized	
  with	
  the	
  UDP	
  protocol)	
  	
  
•  Applica?on	
  Deployment	
  also	
  used	
  to	
  define	
  configura?on	
  
parameters	
  for	
  the	
  communica?on	
  protocols	
  	
  
•  Generated	
  code	
  is	
  implemented	
  using	
  re-­‐targetable	
  template	
  files	
  
•  Portable	
  since	
  it	
  can	
  be	
  deployed	
  and	
  run	
  in	
  any	
  hardware	
  plaUorm	
  
suppor?ng	
  Linux	
  sockets	
  
PPM Example: Code Generation!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 16/33!
memcpy	
  (	
  self.buffer,	
  f	
  -­‐>	
  data_in,	
  f	
  -­‐>	
  block_size	
  );	
  
	
  	
  	
  	
  	
  	
  iCom	
  =	
  sendto	
  (	
  self.sock,	
  self.buffer,	
  
self.buffer_size,	
  0,	
  (struct	
  sockaddr*)
(&(self.dst_addr)),	
  sizeof(self.dst_addr)	
  );	
  
	
  	
  	
  	
  	
  	
  if	
  (	
  iCom	
  ==	
  -­‐1	
  )	
  
	
  	
  	
  	
  	
  	
  {	
  
	
  prinE	
  (	
  "COM_eth_udp_lin	
  process	
  (sendto)	
  
error	
  (%d)	
  :	
  %sn",	
  errno,	
  strerror(errno)	
  );	
  
	
  return	
  (	
  -­‐1	
  );	
  
	
  	
  	
  	
  	
  	
  }	
  
	
  memset	
  (	
  &recvfrom_addr,	
  0,sizeof(	
  recvfrom_addr	
  )	
  );	
  
	
  	
  	
  	
  	
  	
  iCom	
  =	
  recvfrom	
  (	
  self.sock,	
  self.buffer,	
  
self.buffer_size,	
  0,	
  (struct	
  sockaddr*)	
  &recvfrom_addr,	
  
&recvfrom_addr_len	
  );	
  
	
  	
  	
  	
  	
  	
  if	
  (	
  iCom	
  ==	
  -­‐1	
  )	
  
	
  	
  	
  	
  	
  	
  {	
  
	
  prinE	
  (	
  "COM_eth_udp_lin	
  process	
  (recvfrom)	
  
error	
  (%d)	
  :	
  %sn",	
  errno,	
  strerror(errno)	
  );	
  
	
  return	
  (	
  -­‐1	
  );	
  
	
  	
  	
  	
  	
  	
  }	
  
PPM Example: Code Generation!
synchro	
   PLL	
  
FIFO
Process Process
Abstract System Model (BIP)
Application
Software (PPM)
System Model (BIP)
modeling (1)
SMC
calibration (3)
Mapping/HW
information (PPM)
Sensor Network
HW
Specifications
(XML)
Sensor Network
Library Components
(BIP)
code generation (2)
analysis (4)
Sensor Network
C/C++ Code
Execution
Sensor Network/
HW Code
Templates
+Configurations
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 17/33!
Design flow for WSN Applications !
•  BIP	
  (Behavior-­‐Interac?on-­‐Priority)	
  is	
  a	
  formal	
  
language	
  for	
  the	
  hierarchical	
  construc?on	
  of	
  
heterogeneous	
  real-­‐?me	
  systems	
  
•  Provides	
  a	
  rich	
  set	
  of	
  tools	
  for	
  analysis	
  and	
  
performance	
  evalua?on	
  	
  
B	
   E	
   H	
   A	
   V	
   I	
   O	
   R	
  
Interactions (collaboration)!
Priorities (conflict resolution)!
The BIP component framework!
Composi?on	
  
glue	
  
Atomic	
  
components	
  
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 18/33!
BIP component example!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 19/33!
•  Atomic	
  component	
  modeling	
  the	
  PLL	
  process	
  
BIP component example!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 19/33!
•  Atomic	
  component	
  modeling	
  the	
  PLL	
  process	
  
•  BIP	
  components:	
  transi?on	
  systems	
  enriched	
  with	
  data	
  and	
  func?ons	
  
in	
  C/C++	
  
BIP component example!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 19/33!
•  Atomic	
  component	
  modeling	
  the	
  PLL	
  process	
  
•  BIP	
  components:	
  transi?on	
  systems	
  enriched	
  with	
  data	
  and	
  func?ons	
  
in	
  C/C++	
  
•  Interac?ons	
  used	
  to	
  transfer	
  data	
  between	
  components	
  
BIP component example!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 19/33!
•  Atomic	
  component	
  modeling	
  the	
  PLL	
  process	
  
•  BIP	
  components:	
  transi?on	
  systems	
  enriched	
  with	
  data	
  and	
  func?ons	
  
in	
  C/C++	
  
•  Interac?ons	
  used	
  to	
  transfer	
  data	
  between	
  components	
  
•  Priori?es	
  enforce	
  scheduling	
  policies	
  amongst	
  possible	
  interac?ons	
  
CLK_REQ<CLK_RECV
The BIP component framework!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 20/33!
•  Func3onal	
  verifica3on	
  	
  
•  BIP	
  state-­‐space	
  explora3on	
  tool	
  used	
  to	
  verify	
  safety	
  requirements,	
  
such	
  as	
  deadlock-­‐freedom,	
  in	
  the	
  constructed	
  models	
  
•  Model	
  calibra3on	
  based	
  on	
  code	
  execu?on	
  in	
  the	
  target	
  HW	
  plaEorm	
  
•  HW/SW	
  dependent	
  constraints	
  injected	
  in	
  the	
  form	
  of	
  probabilis?c	
  
distribu?ons	
  
•  Aims	
  in	
  obtaining	
  faithful	
  models	
  for	
  a	
  considered	
  system	
  
•  Performance	
  Analysis	
  of	
  applica?on	
  or	
  system-­‐level	
  requirements	
  
•  Sta3s3cal	
  Model	
  Checking	
  (SMC)	
  tool	
  for	
  quan?ta?ve	
  verifica?on	
  
•  Results	
  provide	
  feedback	
  in	
  the	
  applica?on	
  design/development	
  phase	
  
Supports:
Outline!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 21/33!
1)  Sensor	
  Networks:	
  Overview	
  and	
  Development	
  Challenges	
  
2)  Proposed	
  Design	
  Flow	
  
•  Modeling	
  the	
  Applica?on	
  So@ware	
  in	
  PPM	
  
•  Code	
  genera?on	
  in	
  Distributed	
  Sensor	
  Network	
  PlaEorms	
  
•  Background	
  on	
  BIP	
  	
  
3)  Case	
  study:	
  Industrial	
  Mul?media	
  WSN	
  Applica?on	
  
•  Code	
  genera?on	
  from	
  the	
  PPM	
  Applica?on	
  Model	
  
•  Construc?on	
  of	
  the	
  System	
  Model	
  in	
  BIP	
  
•  BIP	
  System	
  Model	
  Calibra?on	
  
4)  Conclusion	
  and	
  ongoing	
  work	
  
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 22/33!
Case study: Industrial WMSN Application !
•  Clock	
  Synchroniza?on	
  in	
  a	
  Mul?media	
  Wireless	
  Sensor	
  Network	
  (WMSN)	
  
•  Capturing	
  and	
  reproduc3on	
  of	
  synchronized	
  audio	
  data	
  in	
  the	
  sink	
  
•  Use	
  of	
  the	
  API	
  provided	
  by	
  the	
  Advanced	
  Linux	
  Sound	
  Architecture	
  (ALSA)	
  	
  
•  Sender-­‐to-­‐receiver	
  synchroniza3on	
  
Master Node
Slave Node
Slave Node
Access Point
(AP)
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 22/33!
Case study: Industrial WMSN Application !
•  Clock	
  Synchroniza?on	
  in	
  a	
  Mul?media	
  Wireless	
  Sensor	
  Network	
  (WMSN)	
  
•  Capturing	
  and	
  reproduc3on	
  of	
  synchronized	
  audio	
  data	
  in	
  the	
  sink	
  
•  Use	
  of	
  the	
  API	
  provided	
  by	
  the	
  Advanced	
  Linux	
  Sound	
  Architecture	
  (ALSA)	
  	
  
•  Sender-­‐to-­‐receiver	
  synchroniza3on	
  
•  Snowball	
  SDK	
  plaEorm	
  configured	
  as	
  AP	
  in	
  the	
  WSN	
  (sta?c	
  ad-­‐hoc	
  DHCP	
  
server	
  capable	
  of	
  assigning	
  automa?cally	
  IP	
  addresses)	
  
•  3	
  UDOO	
  plaEorms	
  automa?cally	
  connected	
  to	
  the	
  WSN	
  through	
  the	
  AP	
  	
  	
  	
  	
  	
  
(1	
  Master,	
  2	
  Slave	
  nodes)	
  	
  
•  Master	
  UDOO	
  node	
  broadcasts	
  periodically	
  (T=5s)	
  a	
  ?mestamp	
  frame	
  
•  Phase	
  Locked	
  Loop	
  (PLL)	
  synchroniza3on	
  technique	
  applied	
  in	
  the	
  slave	
  
UDOO	
  nodes	
  to	
  construct	
  a	
  so6ware	
  clock	
  	
  
•  The	
  so@ware	
  clock	
  follows	
  the	
  advance	
  of	
  the	
  Master	
  node’s	
  clock	
  and	
  
maintains	
  a	
  rela?ve	
  offset	
  from	
  it	
  
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 23/33!
Case study: PPM Model!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 24/33!
Case study: WMSN Application deployment!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 25/33!
Case study: Abstract BIP System Model!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 26/33!
Case study: System Model Calibration!
ρ1
ρ3
λok
ρ2
λfail
λdelay
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 26/33!
Case study: System Model Calibration!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 27/33!
Case study: Distribution fitting!
•  Method	
  used	
  to	
  obtain	
  each	
  distribu?on:	
  	
  
•  Special	
  case	
  of	
  model	
  fiYng	
  
•  Target	
  model	
  is	
  a	
  probability	
  distribu3on	
  
•  Relying	
  on	
  sta?s?cal	
  methods	
  in	
  order	
  learn	
  the	
  best	
  probability	
  
distribu?on	
  that	
  fits	
  the	
  obtained	
  execu3on	
  data	
  
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 27/33!
Probability	
  distribu3on	
  (λdelay) Box-­‐Whisker	
  plot	
  (λdelay)	
  
Case study: Distribution fitting!
•  Method	
  used	
  to	
  obtain	
  each	
  distribu?on:	
  	
  
•  Special	
  case	
  of	
  model	
  fiYng	
  
•  Target	
  model	
  is	
  a	
  probability	
  distribu3on	
  
•  Relying	
  on	
  sta?s?cal	
  methods	
  in	
  order	
  learn	
  the	
  best	
  probability	
  
distribu?on	
  that	
  fits	
  the	
  obtained	
  execu3on	
  data	
  
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 27/33!
Probability	
  distribu3on	
  (λdelay) Box-­‐Whisker	
  plot	
  (λdelay)	
  
Outliers
Mean
Case study: Distribution fitting!
•  Method	
  used	
  to	
  obtain	
  each	
  distribu?on:	
  	
  
•  Special	
  case	
  of	
  model	
  fiYng	
  
•  Target	
  model	
  is	
  a	
  probability	
  distribu3on	
  
•  Relying	
  on	
  sta?s?cal	
  methods	
  in	
  order	
  learn	
  the	
  best	
  probability	
  
distribu?on	
  that	
  fits	
  the	
  obtained	
  execu3on	
  data	
  
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 28/33!
Case study: Analysis results!
•  The	
  calibrated	
  BIP	
  system	
  model	
  was	
  used	
  for	
  tes?ng:	
  	
  
•  Cri?cal	
  func?onal	
  and	
  non-­‐func?onal	
  requirements,	
  such	
  
as	
  buffer	
  u3liza3on	
  	
  
•  The	
  synchroniza3on	
  accuracy	
  
•  We	
  have	
  expressed	
  the	
  following	
  proper?es:	
  	
  
1)  What	
  is	
  the	
  probability	
  of	
  overflow/underflow	
  avoidance	
  
in	
  the	
  transmission/recep?on	
  buffers	
  of	
  the	
  considered	
  
WMSN	
  Applica?on?	
  
2)  Is	
  the	
  achieved	
  synchroniza?on	
  accuracy	
  1μs?	
  	
  
•  Focus:	
  Es?ma?on	
  of	
  the	
  probability	
  for	
  overflow/underflow	
  in	
  the	
  
transmission/recep?on	
  buffers	
  of	
  the	
  system	
  
•  The	
  property	
  is	
  expressed	
  as:	
  
1)  φ1	
  =	
  (size(Sbuffer)	
  <	
  MAX),	
  where	
  MAX=400	
  
2)  	
  φ2	
  =	
  (size(Mbuffer)	
  >	
  0)	
  	
  
Property 1: Buffer utilization!
P(φ1)
Case study: Property verification!
P(φ2)
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 29/33!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 30/33!
Case study: Property verification!
Property 2: Synchronization accuracy!
•  Focus:	
  Difference	
  between	
  the	
  Master	
  and	
  the	
  Slave	
  so6ware	
  clock	
  should	
  be	
  
bounded	
  by	
  a	
  non-­‐nega?ve	
  number	
  ∆	
  
•  The	
  property	
  is	
  expressed	
  as:	
  φ3	
  =	
  (|(θM	
  −	
  θS	
  )	
  −	
  A|	
  <	
  ∆)	
  	
  
•  A	
  is	
  a	
  fixed	
  offset	
  between	
  the	
  Master	
  and	
  each	
  Slave’s	
  so@ware	
  clock	
  	
  
Property 2: Synchronization accuracy!
System ModelGenerated code
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 30/33!
Case study: Property verification!
•  Focus:	
  Difference	
  between	
  the	
  Master	
  and	
  the	
  Slave	
  so6ware	
  clock	
  should	
  be	
  
bounded	
  by	
  a	
  non-­‐nega?ve	
  number	
  ∆	
  
•  The	
  property	
  is	
  expressed	
  as:	
  φ3	
  =	
  (|(θM	
  −	
  θS	
  )	
  −	
  A|	
  <	
  ∆)	
  	
  
•  A	
  is	
  a	
  fixed	
  offset	
  between	
  the	
  Master	
  and	
  each	
  Slave’s	
  so@ware	
  clock	
  	
  
System Model
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 30/33!
Here	
  A=100μs	
  
•  For	
  Δ=1μs	
  φ3	
  is	
  not	
  sa?sfied	
  
•  For	
  Δ=76μs	
  φ3	
  is	
  sa3sfied	
  
Case study: Property verification!
Property 2: Synchronization accuracy!
•  Focus:	
  Difference	
  between	
  the	
  Master	
  and	
  the	
  Slave	
  so6ware	
  clock	
  should	
  be	
  
bounded	
  by	
  a	
  non-­‐nega?ve	
  number	
  ∆	
  
•  The	
  property	
  is	
  expressed	
  as:	
  φ3	
  =	
  (|(θM	
  −	
  θS	
  )	
  −	
  A|	
  <	
  ∆)	
  	
  
•  A	
  is	
  a	
  fixed	
  offset	
  between	
  the	
  Master	
  and	
  each	
  Slave’s	
  so@ware	
  clock	
  	
  
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 30/33!
Here	
  A=100μs	
  
•  For	
  Δ=1μs	
  φ3	
  is	
  not	
  sa?sfied	
  
•  For	
  Δ=76μs	
  φ3	
  is	
  sa3sfied	
  
•  Also	
  observed	
  from	
  the	
  
results	
  of	
  the	
  generated	
  
code	
  	
  
Generated code
Case study: Property verification!
Property 2: Synchronization accuracy!
•  Focus:	
  Difference	
  between	
  the	
  Master	
  and	
  the	
  Slave	
  so6ware	
  clock	
  should	
  be	
  
bounded	
  by	
  a	
  non-­‐nega?ve	
  number	
  ∆	
  
•  The	
  property	
  is	
  expressed	
  as:	
  φ3	
  =	
  (|(θM	
  −	
  θS	
  )	
  −	
  A|	
  <	
  ∆)	
  	
  
•  A	
  is	
  a	
  fixed	
  offset	
  between	
  the	
  Master	
  and	
  each	
  Slave’s	
  so@ware	
  clock	
  	
  
Conclusions!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 31/33!
•  Fully-­‐fledged	
  design	
  flow	
  for	
  the	
  development	
  of	
  func?onal	
  distributed	
  
sensor	
  applica?ons	
  
•  Automated	
  	
  Code	
  Genera3on	
  and	
  Performance	
  Analysis	
  using	
  as	
  input:	
  
•  Applica?on	
  So@ware	
  described	
  in	
  PPM	
  (XML	
  format	
  with	
  reference	
  to	
  	
  	
  
C/C++	
  func3ons)	
  
•  Hardware	
  specifica?on	
  (for	
  the	
  network	
  configura3on)	
  	
  
•  Mapping	
  specifica?on	
  (for	
  the	
  applica3on	
  deployment)	
  
•  We	
  have	
  applied	
  it	
  in	
  a	
  Wireless	
  Mul?media	
  Sensor	
  Network	
  (WMSN)	
  
Applica?on	
  and	
  our	
  experiments	
  focused	
  on:	
  
•  Buffer	
  u3liza3on	
  
•  Synchroniza3on	
  accuracy	
  
•  Results	
  provide	
  feedback	
  for	
  the	
  proper	
  configura?on	
  of	
  similar	
  applica?ons	
  
Perspectives!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 32/33!
•  Adapt	
  the	
  design	
  flow	
  for	
  lower	
  resource	
  consump3on	
  hardware	
  plaUorms,	
  
which	
  use	
  dedicated	
  opera?ng	
  systems	
  (e.g.	
  TinyOS,	
  Con3ki	
  OS)	
  
•  Low	
  amount	
  of	
  data	
  supported	
  in	
  each	
  packet	
  	
  
•  Packet	
  fragmenta?on	
  may	
  lead	
  to:	
  
1)  Collisions	
  in	
  the	
  MAC	
  layer	
  
2)  Frequent	
  packet	
  losses	
  
•  Mechanisms	
  to	
  improve	
  clock	
  synchroniza3on	
  	
  
•  Reduc?on	
  of	
  the	
  rela?ve	
  offset	
  between	
  the	
  Slave	
  so@ware	
  clock	
  and	
  	
  	
  
the	
  Master	
  clock	
  by	
  oscilla3ng	
  the	
  transmission	
  frequency	
  of	
  the	
  
Master’s	
  3mestamp	
  
•  High	
  frequency	
  rate	
  may	
  lead	
  to	
  higher	
  energy	
  consump3on	
  
•  Possible	
  change	
  of	
  the	
  Kalman	
  filter	
  algorithm	
  will	
  be	
  considered	
  
Questions?!
Thank you for your attention.!
Further details: alexios.lekidis@imag.fr!
Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 33/33!

More Related Content

PPTX
PPT
zigbee
PPTX
Bluetooth low energy- Kashyap Velpuru
PPT
Zigbee - Building Smart Homes
PPTX
M2M Communication
PDF
Zigbee technology and its application in
PPTX
Wireless intelligent network
PPTX
Colcom2014 press template _envibo_meneses
zigbee
Bluetooth low energy- Kashyap Velpuru
Zigbee - Building Smart Homes
M2M Communication
Zigbee technology and its application in
Wireless intelligent network
Colcom2014 press template _envibo_meneses

What's hot (20)

PPTX
Zigbee technology presentation
PPT
Updated ZigBee .ppt
PPTX
Zigbee
PPT
Zig Bee
PPTX
Zigbee ppt
PDF
The iot academy_lpwan_lora
PPTX
A Software Defined Hierarchical Communication and Data Management Architectur...
PPT
Zig bee
PDF
Modified Epc Global Network Architecture of Internet of Things for High Load ...
PPTX
master-thesis-omnet-projects
PPTX
PDF
Track 3 session 6 - st dev con 2016 - qualcomm - wi-fi connectivity for iot
PPTX
Zigbee technology [autosaved]
PPTX
ioT_SDN
PPTX
Tech sem on zig 1
PPTX
zigbee technology
PPTX
Air finder Supertag Webinar
PPT
Zigbee technology2
Zigbee technology presentation
Updated ZigBee .ppt
Zigbee
Zig Bee
Zigbee ppt
The iot academy_lpwan_lora
A Software Defined Hierarchical Communication and Data Management Architectur...
Zig bee
Modified Epc Global Network Architecture of Internet of Things for High Load ...
master-thesis-omnet-projects
Track 3 session 6 - st dev con 2016 - qualcomm - wi-fi connectivity for iot
Zigbee technology [autosaved]
ioT_SDN
Tech sem on zig 1
zigbee technology
Air finder Supertag Webinar
Zigbee technology2
Ad

Similar to Rapid development of WSN applications (20)

PPT
WSN_UNIT 1 -BASICS OF WSN (1).ppt slides
PPT
Wireless Sensor Network WSN Power Point .ppt
PDF
2742303.pdf
PPT
Introduction to wireless sensor networks
PPTX
Wsn unit-1-ppt
PDF
matdid473708.pdf
PPT
gcettb presentation on sensor network
DOCX
WIRELESS SENSOR NETWORKS
PDF
Survey of Wireless Sensor Network Application
PPT
WSN-IEEE-Nov2005-v2.ppt
PDF
Senslab - open hardware - fossa2010
PPT
CS6003 AD HOC AND SENSOR NETWORKS
PPT
7_adhoc and wireless network (1).ppt
PPT
Wireless sensor-networks
PPTX
FPGA Based Data Processing for Real-time WSN Applications:
PPTX
Ppt on low power wireless sensor network 5th sem
PPTX
FUNDAMENTALS OF WSN
PPT
Wsn handbook
PPT
Chapter 6 WSN.ppt
PPTX
Chapter 2 wireless sensor
WSN_UNIT 1 -BASICS OF WSN (1).ppt slides
Wireless Sensor Network WSN Power Point .ppt
2742303.pdf
Introduction to wireless sensor networks
Wsn unit-1-ppt
matdid473708.pdf
gcettb presentation on sensor network
WIRELESS SENSOR NETWORKS
Survey of Wireless Sensor Network Application
WSN-IEEE-Nov2005-v2.ppt
Senslab - open hardware - fossa2010
CS6003 AD HOC AND SENSOR NETWORKS
7_adhoc and wireless network (1).ppt
Wireless sensor-networks
FPGA Based Data Processing for Real-time WSN Applications:
Ppt on low power wireless sensor network 5th sem
FUNDAMENTALS OF WSN
Wsn handbook
Chapter 6 WSN.ppt
Chapter 2 wireless sensor
Ad

Recently uploaded (20)

PPTX
Vitamins & Minerals: Complete Guide to Functions, Food Sources, Deficiency Si...
PPT
POSITIONING IN OPERATION THEATRE ROOM.ppt
PDF
. Radiology Case Scenariosssssssssssssss
PDF
Phytochemical Investigation of Miliusa longipes.pdf
PPTX
Introduction to Cardiovascular system_structure and functions-1
PPTX
EPIDURAL ANESTHESIA ANATOMY AND PHYSIOLOGY.pptx
PPTX
2Systematics of Living Organisms t-.pptx
PPTX
DRUG THERAPY FOR SHOCK gjjjgfhhhhh.pptx.
PPTX
Taita Taveta Laboratory Technician Workshop Presentation.pptx
PPTX
BIOMOLECULES PPT........................
PPTX
ECG_Course_Presentation د.محمد صقران ppt
PDF
CAPERS-LRD-z9:AGas-enshroudedLittleRedDotHostingaBroad-lineActive GalacticNuc...
PPTX
Comparative Structure of Integument in Vertebrates.pptx
PPTX
G5Q1W8 PPT SCIENCE.pptx 2025-2026 GRADE 5
PPTX
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
PPTX
7. General Toxicologyfor clinical phrmacy.pptx
PPTX
Cell Membrane: Structure, Composition & Functions
PDF
SEHH2274 Organic Chemistry Notes 1 Structure and Bonding.pdf
PPTX
famous lake in india and its disturibution and importance
PDF
IFIT3 RNA-binding activity primores influenza A viruz infection and translati...
Vitamins & Minerals: Complete Guide to Functions, Food Sources, Deficiency Si...
POSITIONING IN OPERATION THEATRE ROOM.ppt
. Radiology Case Scenariosssssssssssssss
Phytochemical Investigation of Miliusa longipes.pdf
Introduction to Cardiovascular system_structure and functions-1
EPIDURAL ANESTHESIA ANATOMY AND PHYSIOLOGY.pptx
2Systematics of Living Organisms t-.pptx
DRUG THERAPY FOR SHOCK gjjjgfhhhhh.pptx.
Taita Taveta Laboratory Technician Workshop Presentation.pptx
BIOMOLECULES PPT........................
ECG_Course_Presentation د.محمد صقران ppt
CAPERS-LRD-z9:AGas-enshroudedLittleRedDotHostingaBroad-lineActive GalacticNuc...
Comparative Structure of Integument in Vertebrates.pptx
G5Q1W8 PPT SCIENCE.pptx 2025-2026 GRADE 5
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
7. General Toxicologyfor clinical phrmacy.pptx
Cell Membrane: Structure, Composition & Functions
SEHH2274 Organic Chemistry Notes 1 Structure and Bonding.pdf
famous lake in india and its disturibution and importance
IFIT3 RNA-binding activity primores influenza A viruz infection and translati...

Rapid development of WSN applications

  • 1. Alexios Lekidis, Paraskevas Bourgos, Simplice Djoko-Djoko, Marius! Bozga, Saddek Bensalem! Univ. Grenoble Alpes, VERIMAG, F-38000 Grenoble, France! CNRS, VERIMAG, F-38000 Grenoble, France! IEEE Sensors Applications Symposium! Zadar, Croatia ! 12-15 April, 2015! Building Distributed Sensor Network Applications using BIP! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 1/33!
  • 2. Sensor Networks: Application domains! EnvironmentHealthcare Transportation High-energy physics Manufacturing Agriculture
  • 3. EnvironmentHealthcare Transportation High-energy physics Manufacturing Agriculture and many more… Sensor Networks: Application domains!
  • 4. Outline! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 2/33! 1)  Sensor  Networks:  Overview  and  development  challenges   2)  Proposed  design  flow   •  Modeling  the  Applica?on  So@ware  in  PPM   •  Code  genera?on  in  Distributed  Sensor  Network  PlaEorms   •  Background  on  BIP     3)  Case  study:  Industrial  Mul?media  WSN  Applica?on   •  Code  genera?on  from  the  PPM  Applica?on  Model   •  Construc?on  of  the  System  Model  in  BIP   •  BIP  System  Model  Calibra?on   4)  Conclusion  and  ongoing  work  
  • 5. Outline! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 2/33! 1)  Sensor  Networks:  Overview  and  development  challenges   2)  Proposed  design  flow   •  Modeling  the  Applica?on  So@ware  in  PPM   •  Code  genera?on  in  Distributed  Sensor  Network  PlaEorms   •  Background  on  BIP     3)  Case  study:  Industrial  Mul?media  WSN  Applica?on   •  Code  genera?on  from  the  PPM  Applica?on  Model   •  Construc?on  of  the  System  Model  in  BIP   •  BIP  System  Model  Calibra?on   4)  Conclusion  and  ongoing  work  
  • 6. Sensor networks: Device constraints! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 3/33! BaMery  life?me  is  limited..     What  happens  in  case  of  failure?   •  Scarce  resources   •  Communica?on  cost   •  Consumed  energy   •  Memory  usage   •  Network  bandwidth  
  • 7. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 3/33! BaMery  life?me  is  limited..     What  happens  in  case  of  failure?   •  Scarce  resources   •  Communica?on  cost   •  Consumed  energy   •  Memory  usage   •  Network  bandwidth   Sensor networks: Device constraints!
  • 8. Sensor networks: Timing constraints! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 4/33! •  Many  applica?on  require  accurately  3mestamped  data  
  • 9. Sensor networks: Timing constraints! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 4/33! •  Many  applica?on  require  accurately  3mestamped  data   •  Characteristic example: Multimedia Wireless Sensor Network (MWSN) applications  
  • 10. Sensor networks: Timing constraints! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 5/33! •  Each  sensor  node  has  a  fixed  ?me  granularity   which  varies  according  to  the  opera?ng  frequency   of  its  clock   Clock  Time  C(t)   Real  Time  t   (Faster  clock)   (Reference  clock)   (Slower  clock)   t2   t1   t0   t0  
  • 11. Sensor networks: Timing constraints! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 5/33! How to obtain a common time reference in a distributed system? Solution: Clock synchronization Clock  Time  C(t)   Real  Time  t   (Faster  clock)   (Reference  clock)   (Slower  clock)   t2   t1   t0   t0  
  • 12. Sensor networks: Clock synchronization! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 6/33! •  Several  well  known-­‐protocols  opera?ng  either  in  the   so6ware  or  hardware  level   •  Target  synchroniza3on  accuracy:  Microsecond  scale  (μs)   •  Improved  accuracy  with  enhancements  as:   •  Round-­‐Trip  Delay  (RTD)  calcula?on   •  Requires  more  energy   •  Dedicated  drivers  for  hardware  access   •  May  not  be  available  in  lightweight  environments  
  • 13. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 6/33! Sensor networks: Clock synchronization! RTD  calcula3on   in  Precision  Time   Protocol  (PTP)     •  Several  well  known-­‐protocols  opera?ng  either  in  the   so6ware  or  hardware  level   •  Target  synchroniza3on  accuracy:  Microsecond  scale  (μs)   •  Improved  accuracy  with  enhancements  as:   •  Round-­‐Trip  Delay  (RTD)  calcula?on   •  Requires  more  energy   •  Dedicated  drivers  for  hardware  access   •  May  not  be  available  in  lightweight  environments  
  • 14. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 6/33! •  Several  well  known-­‐protocols  opera?ng  either  in  the   so6ware  or  hardware  level   •  Target  synchroniza3on  accuracy:  Microsecond  scale  (μs)   •  Improved  accuracy  with  enhancements  as:   •  Round-­‐Trip  Delay  (RTD)  calcula?on   •  Requires  more  energy   •  Dedicated  drivers  for  hardware  access   •  May  not  be  available  in  lightweight  environments   •  Promising  protocol  family  using  the  Kalman  filter  algorithm   •  Dynamically  adap?ng  to  the  advance  of  the  reference  clock   Sensor networks: Clock synchronization!
  • 15. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 7/33! •  Heterogeneity  of  devices   •  Communica?on  latencies   •  Conflicts  in  message  passing  through   the  protocol  stack     Sensor networks: Application development! Considerable  cost  in  3me  and   development  effort   No  guarantee  that  design  errors  are  fixed  before  deployment   makeSense  project   (www.project-­‐makesense.eu)  
  • 16. P1   P2  P2   P3   P4   Application Software   Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 8/33! Master   Sound   card   Wifi   card   Node  1   WiFi   Access  Point   (AP)   Slave   Sound   card   Wifi   card   Node  N   Sensor networks: Application deployment! Sensor Network Distributed Platform  
  • 17. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 8/33! Master   Sound   card   Wifi   card   Node  1   WiFi   Access  Point   (AP)   Slave   Sound   card   Wifi   card   Node  N   Sensor networks: Application deployment! Application Software   Sensor Network Distributed Platform   P1   P2  P2   P3   P4  
  • 18. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 8/33! Master   Sound   card   Wifi   card   Node  1   WiFi   Access  Point   (AP)   Slave   Sound   card   Wifi   card   Node  N   Sensor networks: Application deployment! How to choose which application process goes to ! which sensor node? Sensor Network Distributed Platform   Application Software   P1   P2  P2   P3   P4  
  • 19. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 9/33! •  Design  flow  for  the  development  of  func3onal               WSN  applica?ons   •  Ensures  separa3on  of  concerns   •  Applica?on  So6ware  and  hardware  architecture   considered  independently   •  Deployment  based  on  the  op?mal  methodology  for   each  applica?on   •  Model-­‐based:  Modularity,  reusability  of  ar3facts   •  Considers  all  the  constraints  of  sensor  networks  and     facilitates  applica?on  development  through:     •  Performance  Analysis  of  system  requirements   •  Automated  Code  Genera3on Proposed method!
  • 20. Outline! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 10/33! 1)  Sensor  Networks:  Overview  and  Development  Challenges   2)  Proposed  Design  flow   •  Modeling  the  Applica?on  So@ware  in  PPM   •  Code  genera?on  in  Distributed  Sensor  Network  PlaEorms   •  Background  on  BIP     3)  Case  study:  Industrial  Mul?media  WSN  Applica?on   •  Code  genera?on  from  the  PPM  Applica?on  Model   •  Construc?on  of  the  System  Model  in  BIP   •  BIP  System  Model  Calibra?on   4)  Conclusion  and  ongoing  work  
  • 21. Application Software (PPM) Mapping/HW information (PPM) Sensor Network HW Specifications (XML) Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 11/33! Design flow for WSN Applications ! Inputs  
  • 22. Abstract System Model (BIP) Application Software (PPM) modeling (1) Mapping/HW information (PPM) Sensor Network HW Specifications (XML) Sensor Network Library Components (BIP) code generation (2) Sensor Network C/C++ Code Sensor Network/ HW Code Templates +Configurations Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 11/33! Design flow for WSN Applications ! Developed   framework  
  • 23. Abstract System Model (BIP) Application Software (PPM) System Model (BIP) modeling (1) SMC calibration (3) Mapping/HW information (PPM) Sensor Network HW Specifications (XML) Sensor Network Library Components (BIP) code generation (2) analysis (4) Sensor Network C/C++ Code Execution Sensor Network/ HW Code Templates +Configurations Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 11/33! Design flow for WSN Applications ! Outputs  
  • 24. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 12/33! Abstract System Model (BIP) Application Software (PPM) System Model (BIP) modeling (1) SMC calibration (3) Mapping/HW information (PPM) Sensor Network HW Specifications (XML) Sensor Network Library Components (BIP) code generation (2) analysis (4) Sensor Network C/C++ Code Execution Sensor Network/ HW Code Templates +Configurations Design flow for WSN Applications !
  • 25. Pragmatic Programming Model (PPM)! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 13/33! •  Descrip?on  language  facilita?ng  the  development  of   sensor  network  applica3ons   •  XML  format  providing  the  possibility  to  reference  C  files  as   external  libraries   •  Applica?on  So@ware  described  as  a  network  of   communica3ng  processes   •  Communica?on  through  shared  objects,  such  as:   •  FIFO   •  Shared  memory   •  Mutexed  loca?on  
  • 26. PPM Example: Application Software! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 14/33! synchro   PLL   FIFO Process Process
  • 27. PPM Example: XML description ! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 14/33! <header  lang="c"  file="global.h"/>     <process  name="pll"  process-­‐class="WhileFire">   <port  name="out"  peer-­‐class="FIFO"  peer-­‐name="in"/>   <header  lang="c"  file="pll_state.h"  x-­‐state="true"/>   <header  lang="c"  file="pll.h"/><source  lang="c"  file="pll.c”>   <source  lang="c"  file="SPM_clock.c"  libs="-­‐lblas  -­‐lm  -­‐lrt"/>   </process>   ...   <shared-­‐object  name="SO1"  object-­‐class="FIFO"  size="4"  item-­‐size="64">   <port  name="in"/>   <port  name="out"/>   </shared-­‐object>   ...   <connec?on>   <port-­‐ref  node="SO1"  port="out"/>   <port-­‐ref  node="pll"  port="in"/>   </connec?on>   synchro   PLL   FIFO Process Process
  • 28. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 14/33! #include  "pll_process.h”   void  pll_init(pll_process  *p)  {            (p-­‐>local-­‐>pll).stream_size  =  1;            (p-­‐>local-­‐>pll).block_size  =  (unsigned  int)  sizeof(clockOut_t);            (p-­‐>local-­‐>pll).data_in  =  malloc((p-­‐>local-­‐>pll).block_size);              p-­‐>local-­‐>data_size  =  (p-­‐>local-­‐>pll).block_size;   }   int  pll_fire(pll_process  *p)  {            FIFO_read(p-­‐>in,  (p-­‐>local-­‐>pll).data_in,  (p-­‐>local-­‐>pll).block_size);          gelmeofday  (  &(p-­‐>local-­‐>slave_?me),  NULL  );            uint64_t  slave_clock  =  (  (  uint64_t  )  p-­‐>local-­‐>slave_?me.tv_sec  *                (  uint64_t  )  1000000  )  +  (  uint64_t  )  p-­‐>local-­‐>slave_?me.tv_usec;            clockOut_t*  master_frameClock  =  (  clockOut_t*  )  (p-­‐>local-­‐>pll).data_in;            master_clock  =  master_frameClock-­‐>?me;            pll_clock_in  (  slave_clock,  master_clock,  p-­‐>local-­‐>argument);       return  0;   }   PPM Example: Process behavior! •  Described  as  the  program:   •  P  init();while(true)P  fire();     •  Communica?on  through:   •  Read  (e.g.  FIFO_read)   •  Write  (e.g.  FIFO_write)   synchro   PLL   FIFO Process Process
  • 29. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 14/33! PPM Example: Application deployment! Master   Sound   card   Wifi   card   WiFi   Access  Point   (AP)   Slave   Sound   card   Wifi   card   UDOO  Node  N  UDOO  Node  1   synchro   PLL   FIFO Process Process
  • 30. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 14/33! <deployment>     <app-­‐node  name="pll"/>     <hw-­‐element  name="node"  hw-­‐class="udoo"  index="0"/>     <hw-­‐property  name="networkInterface"  hw-­‐class="node-­‐inter"  value="wlan0"/>     <hw-­‐property  name="srcPort"  hw-­‐class="node-­‐srcPort"  value="375"/>     <hw-­‐property  name="dstPort"  hw-­‐class="node-­‐dstPort"  value="250"/>     <hw-­‐property  name="dstIP"  hw-­‐class="node-­‐dstIP"  value="10.0.0.14"/>   </deployment>   PPM Example: Application deployment! synchro   PLL   FIFO Process Process
  • 31. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 15/33! •  Each  process  is  implemented  as  a  thread   •  Threads  allocated  to  sensor  nodes  according  to  applica?on   deployment  in  PPM   •  Shared  objects  implemented  according  to  the  underlying           hardware  plaUorm     •  FIFO_read  and  FIFO_write  primi?ves  replaced  by  API  func3on  calls   of  the  supported  communica?on  protocol  (i.e.  Linux  sockets   parameterized  with  the  UDP  protocol)     •  Applica?on  Deployment  also  used  to  define  configura?on   parameters  for  the  communica?on  protocols     •  Generated  code  is  implemented  using  re-­‐targetable  template  files   •  Portable  since  it  can  be  deployed  and  run  in  any  hardware  plaUorm   suppor?ng  Linux  sockets   PPM Example: Code Generation!
  • 32. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 16/33! memcpy  (  self.buffer,  f  -­‐>  data_in,  f  -­‐>  block_size  );              iCom  =  sendto  (  self.sock,  self.buffer,   self.buffer_size,  0,  (struct  sockaddr*) (&(self.dst_addr)),  sizeof(self.dst_addr)  );              if  (  iCom  ==  -­‐1  )              {    prinE  (  "COM_eth_udp_lin  process  (sendto)   error  (%d)  :  %sn",  errno,  strerror(errno)  );    return  (  -­‐1  );              }    memset  (  &recvfrom_addr,  0,sizeof(  recvfrom_addr  )  );              iCom  =  recvfrom  (  self.sock,  self.buffer,   self.buffer_size,  0,  (struct  sockaddr*)  &recvfrom_addr,   &recvfrom_addr_len  );              if  (  iCom  ==  -­‐1  )              {    prinE  (  "COM_eth_udp_lin  process  (recvfrom)   error  (%d)  :  %sn",  errno,  strerror(errno)  );    return  (  -­‐1  );              }   PPM Example: Code Generation! synchro   PLL   FIFO Process Process
  • 33. Abstract System Model (BIP) Application Software (PPM) System Model (BIP) modeling (1) SMC calibration (3) Mapping/HW information (PPM) Sensor Network HW Specifications (XML) Sensor Network Library Components (BIP) code generation (2) analysis (4) Sensor Network C/C++ Code Execution Sensor Network/ HW Code Templates +Configurations Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 17/33! Design flow for WSN Applications !
  • 34. •  BIP  (Behavior-­‐Interac?on-­‐Priority)  is  a  formal   language  for  the  hierarchical  construc?on  of   heterogeneous  real-­‐?me  systems   •  Provides  a  rich  set  of  tools  for  analysis  and   performance  evalua?on     B   E   H   A   V   I   O   R   Interactions (collaboration)! Priorities (conflict resolution)! The BIP component framework! Composi?on   glue   Atomic   components   Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 18/33!
  • 35. BIP component example! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 19/33! •  Atomic  component  modeling  the  PLL  process  
  • 36. BIP component example! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 19/33! •  Atomic  component  modeling  the  PLL  process   •  BIP  components:  transi?on  systems  enriched  with  data  and  func?ons   in  C/C++  
  • 37. BIP component example! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 19/33! •  Atomic  component  modeling  the  PLL  process   •  BIP  components:  transi?on  systems  enriched  with  data  and  func?ons   in  C/C++   •  Interac?ons  used  to  transfer  data  between  components  
  • 38. BIP component example! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 19/33! •  Atomic  component  modeling  the  PLL  process   •  BIP  components:  transi?on  systems  enriched  with  data  and  func?ons   in  C/C++   •  Interac?ons  used  to  transfer  data  between  components   •  Priori?es  enforce  scheduling  policies  amongst  possible  interac?ons   CLK_REQ<CLK_RECV
  • 39. The BIP component framework! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 20/33! •  Func3onal  verifica3on     •  BIP  state-­‐space  explora3on  tool  used  to  verify  safety  requirements,   such  as  deadlock-­‐freedom,  in  the  constructed  models   •  Model  calibra3on  based  on  code  execu?on  in  the  target  HW  plaEorm   •  HW/SW  dependent  constraints  injected  in  the  form  of  probabilis?c   distribu?ons   •  Aims  in  obtaining  faithful  models  for  a  considered  system   •  Performance  Analysis  of  applica?on  or  system-­‐level  requirements   •  Sta3s3cal  Model  Checking  (SMC)  tool  for  quan?ta?ve  verifica?on   •  Results  provide  feedback  in  the  applica?on  design/development  phase   Supports:
  • 40. Outline! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 21/33! 1)  Sensor  Networks:  Overview  and  Development  Challenges   2)  Proposed  Design  Flow   •  Modeling  the  Applica?on  So@ware  in  PPM   •  Code  genera?on  in  Distributed  Sensor  Network  PlaEorms   •  Background  on  BIP     3)  Case  study:  Industrial  Mul?media  WSN  Applica?on   •  Code  genera?on  from  the  PPM  Applica?on  Model   •  Construc?on  of  the  System  Model  in  BIP   •  BIP  System  Model  Calibra?on   4)  Conclusion  and  ongoing  work  
  • 41. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 22/33! Case study: Industrial WMSN Application ! •  Clock  Synchroniza?on  in  a  Mul?media  Wireless  Sensor  Network  (WMSN)   •  Capturing  and  reproduc3on  of  synchronized  audio  data  in  the  sink   •  Use  of  the  API  provided  by  the  Advanced  Linux  Sound  Architecture  (ALSA)     •  Sender-­‐to-­‐receiver  synchroniza3on   Master Node Slave Node Slave Node Access Point (AP)
  • 42. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 22/33! Case study: Industrial WMSN Application ! •  Clock  Synchroniza?on  in  a  Mul?media  Wireless  Sensor  Network  (WMSN)   •  Capturing  and  reproduc3on  of  synchronized  audio  data  in  the  sink   •  Use  of  the  API  provided  by  the  Advanced  Linux  Sound  Architecture  (ALSA)     •  Sender-­‐to-­‐receiver  synchroniza3on   •  Snowball  SDK  plaEorm  configured  as  AP  in  the  WSN  (sta?c  ad-­‐hoc  DHCP   server  capable  of  assigning  automa?cally  IP  addresses)   •  3  UDOO  plaEorms  automa?cally  connected  to  the  WSN  through  the  AP             (1  Master,  2  Slave  nodes)     •  Master  UDOO  node  broadcasts  periodically  (T=5s)  a  ?mestamp  frame   •  Phase  Locked  Loop  (PLL)  synchroniza3on  technique  applied  in  the  slave   UDOO  nodes  to  construct  a  so6ware  clock     •  The  so@ware  clock  follows  the  advance  of  the  Master  node’s  clock  and   maintains  a  rela?ve  offset  from  it  
  • 43. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 23/33! Case study: PPM Model!
  • 44. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 24/33! Case study: WMSN Application deployment!
  • 45. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 25/33! Case study: Abstract BIP System Model!
  • 46. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 26/33! Case study: System Model Calibration!
  • 47. ρ1 ρ3 λok ρ2 λfail λdelay Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 26/33! Case study: System Model Calibration!
  • 48. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 27/33! Case study: Distribution fitting! •  Method  used  to  obtain  each  distribu?on:     •  Special  case  of  model  fiYng   •  Target  model  is  a  probability  distribu3on   •  Relying  on  sta?s?cal  methods  in  order  learn  the  best  probability   distribu?on  that  fits  the  obtained  execu3on  data  
  • 49. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 27/33! Probability  distribu3on  (λdelay) Box-­‐Whisker  plot  (λdelay)   Case study: Distribution fitting! •  Method  used  to  obtain  each  distribu?on:     •  Special  case  of  model  fiYng   •  Target  model  is  a  probability  distribu3on   •  Relying  on  sta?s?cal  methods  in  order  learn  the  best  probability   distribu?on  that  fits  the  obtained  execu3on  data  
  • 50. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 27/33! Probability  distribu3on  (λdelay) Box-­‐Whisker  plot  (λdelay)   Outliers Mean Case study: Distribution fitting! •  Method  used  to  obtain  each  distribu?on:     •  Special  case  of  model  fiYng   •  Target  model  is  a  probability  distribu3on   •  Relying  on  sta?s?cal  methods  in  order  learn  the  best  probability   distribu?on  that  fits  the  obtained  execu3on  data  
  • 51. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 28/33! Case study: Analysis results! •  The  calibrated  BIP  system  model  was  used  for  tes?ng:     •  Cri?cal  func?onal  and  non-­‐func?onal  requirements,  such   as  buffer  u3liza3on     •  The  synchroniza3on  accuracy   •  We  have  expressed  the  following  proper?es:     1)  What  is  the  probability  of  overflow/underflow  avoidance   in  the  transmission/recep?on  buffers  of  the  considered   WMSN  Applica?on?   2)  Is  the  achieved  synchroniza?on  accuracy  1μs?    
  • 52. •  Focus:  Es?ma?on  of  the  probability  for  overflow/underflow  in  the   transmission/recep?on  buffers  of  the  system   •  The  property  is  expressed  as:   1)  φ1  =  (size(Sbuffer)  <  MAX),  where  MAX=400   2)   φ2  =  (size(Mbuffer)  >  0)     Property 1: Buffer utilization! P(φ1) Case study: Property verification! P(φ2) Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 29/33!
  • 53. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 30/33! Case study: Property verification! Property 2: Synchronization accuracy! •  Focus:  Difference  between  the  Master  and  the  Slave  so6ware  clock  should  be   bounded  by  a  non-­‐nega?ve  number  ∆   •  The  property  is  expressed  as:  φ3  =  (|(θM  −  θS  )  −  A|  <  ∆)     •  A  is  a  fixed  offset  between  the  Master  and  each  Slave’s  so@ware  clock    
  • 54. Property 2: Synchronization accuracy! System ModelGenerated code Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 30/33! Case study: Property verification! •  Focus:  Difference  between  the  Master  and  the  Slave  so6ware  clock  should  be   bounded  by  a  non-­‐nega?ve  number  ∆   •  The  property  is  expressed  as:  φ3  =  (|(θM  −  θS  )  −  A|  <  ∆)     •  A  is  a  fixed  offset  between  the  Master  and  each  Slave’s  so@ware  clock    
  • 55. System Model Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 30/33! Here  A=100μs   •  For  Δ=1μs  φ3  is  not  sa?sfied   •  For  Δ=76μs  φ3  is  sa3sfied   Case study: Property verification! Property 2: Synchronization accuracy! •  Focus:  Difference  between  the  Master  and  the  Slave  so6ware  clock  should  be   bounded  by  a  non-­‐nega?ve  number  ∆   •  The  property  is  expressed  as:  φ3  =  (|(θM  −  θS  )  −  A|  <  ∆)     •  A  is  a  fixed  offset  between  the  Master  and  each  Slave’s  so@ware  clock    
  • 56. Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 30/33! Here  A=100μs   •  For  Δ=1μs  φ3  is  not  sa?sfied   •  For  Δ=76μs  φ3  is  sa3sfied   •  Also  observed  from  the   results  of  the  generated   code     Generated code Case study: Property verification! Property 2: Synchronization accuracy! •  Focus:  Difference  between  the  Master  and  the  Slave  so6ware  clock  should  be   bounded  by  a  non-­‐nega?ve  number  ∆   •  The  property  is  expressed  as:  φ3  =  (|(θM  −  θS  )  −  A|  <  ∆)     •  A  is  a  fixed  offset  between  the  Master  and  each  Slave’s  so@ware  clock    
  • 57. Conclusions! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 31/33! •  Fully-­‐fledged  design  flow  for  the  development  of  func?onal  distributed   sensor  applica?ons   •  Automated    Code  Genera3on  and  Performance  Analysis  using  as  input:   •  Applica?on  So@ware  described  in  PPM  (XML  format  with  reference  to       C/C++  func3ons)   •  Hardware  specifica?on  (for  the  network  configura3on)     •  Mapping  specifica?on  (for  the  applica3on  deployment)   •  We  have  applied  it  in  a  Wireless  Mul?media  Sensor  Network  (WMSN)   Applica?on  and  our  experiments  focused  on:   •  Buffer  u3liza3on   •  Synchroniza3on  accuracy   •  Results  provide  feedback  for  the  proper  configura?on  of  similar  applica?ons  
  • 58. Perspectives! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 32/33! •  Adapt  the  design  flow  for  lower  resource  consump3on  hardware  plaUorms,   which  use  dedicated  opera?ng  systems  (e.g.  TinyOS,  Con3ki  OS)   •  Low  amount  of  data  supported  in  each  packet     •  Packet  fragmenta?on  may  lead  to:   1)  Collisions  in  the  MAC  layer   2)  Frequent  packet  losses   •  Mechanisms  to  improve  clock  synchroniza3on     •  Reduc?on  of  the  rela?ve  offset  between  the  Slave  so@ware  clock  and       the  Master  clock  by  oscilla3ng  the  transmission  frequency  of  the   Master’s  3mestamp   •  High  frequency  rate  may  lead  to  higher  energy  consump3on   •  Possible  change  of  the  Kalman  filter  algorithm  will  be  considered  
  • 59. Questions?! Thank you for your attention.! Further details: alexios.lekidis@imag.fr! Lekidis et al.! Building Distributed Sensor Network Applications using BIP! 33/33!