26
RealTime Wireless Control Networks Chenyang Lu Computer Science and Engineering

Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Real-­‐Time  Wireless  Control  Networks  

                           Chenyang  Lu  Computer  Science  and  Engineering                                                                    

Page 2: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Outline  Ø  WirelessHART:  a  star=ng  point  Ø  Real-­‐=me  scheduling  for  WirelessHART  Ø  Challenges  and  direc=ons  of  wireless  control  networks  

2  

Page 3: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

WirelessHART  Industrial  wireless  standard  for  process  monitoring  &  control  

3  

Page 4: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

4  

Characteristics  Ø  Real-­‐=me  and  reliable  in  hash  industrial  environments  Ø  Time  Division  Mul=ple  Access  (10ms  slot)  Ø  Mul=-­‐channel  Ø  Route  diversity  Ø  No  spa=al  reuse  of  the  same  channel  

Ø  Centralized  network  manager  q  Collects  topology  informa=on  from  the  network  q  Generates  routes  and  global  transmission  schedule  q  Reconfigures  when  devices/links  break  

 

 4  

Page 5: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Time  Synchronization  Ø  WirelessHART  protocol  

q  Gateway  is  the  root  source  of  =me.  q  When  a  device  receives  a  packet  

•  Δt  =  =me  of  arrival  –  expected  arrival  =me  •  sends  Δt  to  the  sender  via  ACK  

q  The  sender  adjusts  =me.  

Ø  Benefits  of  accurate  clocks  q  Reduce  guard  =me  used  to  accommodate  clock  skew  

ü  Shorter  slot  

q  Reduce  frequency  of  clock  sync  ü  Lower  overhead  ü  Be^er  scalability  

 

5  

Page 6: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Real-­‐Time  Scheduling  for  WirelessHART  Goals  Ø  Real-­‐=me  transmission  scheduling  à  meet  end-­‐to-­‐end  deadlines  Ø  Fast  schedulability  analysis  à  online  admission  control  and  adapta=on  

Approach  Ø  Leverage  real-­‐=me  scheduling  theory  for  processors  

Ø  Incorporate  wireless  characteris=cs  Ini=al  Results  Ø  Dynamic  priority  transmission  scheduling  [RTSS’10]  Ø  Fixed  priority  transmission  scheduling  

q  End-­‐to-­‐end  delay  analysis  [RTAS’11]  q  Priority  assignment  [ECRTS’11]  

Ø  Rate  selec=on  for  wireless  control  [RTAS’12]  

6  

Page 7: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Real-­‐Time  Scheduling  for  WirelessHART  Goals  Ø  Real-­‐=me  transmission  scheduling  à  meet  end-­‐to-­‐end  deadlines  Ø  Fast  schedulability  analysis  à  online  admission  control  and  adapta=on  

Approach  Ø  Leverage  real-­‐=me  scheduling  theory  for  processors  

Ø  Incorporate  wireless  characteris=cs  Ini=al  Results  Ø  Dynamic  priority  transmission  scheduling  [RTSS’10]  Ø  Fixed  priority  transmission  scheduling  

q  End-­‐to-­‐end  delay  analysis  [RTAS’11]  q  Priority  assignment  [ECRTS’11]  

Ø  Rate  selec=on  for  wireless  control  [RTAS’12]  

7  

Page 8: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Real-­‐Time  Flows  Ø  Flow:  sensoràcontrolleràactuator  over  mul=-­‐hops    

 Ø  A  set  of  flows  F={F1,  F2,  …,  FN}    ordered  by  priori=es    Ø  Each  flow  Fi  is  characterized  by      

q  A  source  (sensor),  a  des=na=on  (actuator),  route  through  the  gateway  (where  controller  is  located)      

q  A  period  Pi  q  A  deadline  Di  (  ≤  Pi)                            q  Total  number  of  transmissions  Ci    along  the  route  

8  

highest lowest priority

Page 9: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Scheduling  Problem  Ø  Fixed  priority  scheduling  

q  Transmissions  ordered  based  on  the  priori=es  of  their  flows  

 Ø  Flows  are  schedulable  if    Ri  ≤  Di              Fi          F  

                                               Ø  Goal:  efficient  end-­‐to-­‐end  delay  analysis  

q  Gives  an  upper  bound  of  the  end-­‐to-­‐end  delay  for  each  flow    q  Used  for  online  admission  control  and  adapta=on

9  

∈end-to-end delay of Fi

deadline of Fi

Page 10: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

End-­‐to-­‐End  Delay  Analysis  Ø  A  lower  priority  flow  is  delayed  due  to  

q  channel  conten8on:  when  all  channels  are                    assigned  to  higher  priority  flows  in  a  slot    q  conflict:  its  transmission  and  a  transmission                    of  a  higher-­‐priority  flow  involve  a  same  node        

 

       

10  

2 1

1 and 5 are conflicting 4 and 5 are conflicting

4 5 3

3 and 4 are conflict-free

Ø     Each  type  of  delay  is  analyzed  separately  

Ø     Combine  both  delays  à  end-­‐to-­‐end  delay  bound  

Page 11: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Insights  Ø  Transmission  vs.  mul=processor  scheduling  

q  Similar:  channel  conten=on  q  Different:  transmission  conflicts  

Ø  Channel  conten=on  à  mul=processor  scheduling  q  A  channel  à  a  processor  q  Flow  Fi      à  a  task  with  period    Pi,    deadline  Di,  execu=on  =me  Ci    q  Leverage  exis=ng  response  =me  analysis  for  mul=processors  

Ø  Account  for  delays  due  to  conflict  with  high-­‐priority  flows  

11  

Page 12: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

!"#$%&'"(!"#

&!"#$%&'"(!"$

)*$%+*,Ø  When  low  priority  flow    Fl    and  high  priority  flow  Fh,  conflict,  Fl    is  delayed  

Ø  Q(I,h):  #transmissions  of  Fh  sharing  nodes  with  Fl          q  In  the  worst  case,  Fh  can  

delay  Fl  by  Q(l,h)  slots    q  e.g.,  Q(l,h)  =  5  à  Fh  can  

delay  Fl    by  5  slots  

Delay  due  to  ConFlict  

12  

Fl delayed by 2 slots

Fl delayed by 2 slots

Fl delayed by 1 slot

Page 13: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Tighter  Bound  on  ConFlict  Delay  

13  

!"#$%&'"(&!"

!"#$%&'"(&!#

)*$%+*,

Δ(l,h) =Q(l,h) − ∑j=1

σ ( l,h )

(δ j (l,h) − 3)

Total number of MCP of length at least 4

Length of an MCP

Ø  Q(I,h)  can  overes=mate  the  delay    

Ø  Δ(I,h):  a  more  precise  bound  of  delay  Fh  can  cause  Fl  

Ø  Maximal  common  path  (MCP)  between  two  flows  q  Maximal  overlap  on  their  routes  q  On  an  MCP,  Fl    can  be  delayed  by  Fh    

by  at  most  3  slots    

 

Q(I,h)=8          but  Δ(I,h)=3  

Page 14: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Total  Delay  due  to  ConFlict  Ø  In  a  =me  interval  of    t    slots  the  delay  caused  by  Fh  on  Fl  is  

upper  bounded  by          

Ø  The  total  delay  of    Fl    due  to  transmission  conflicts  with  higher  priority  flows  is  upper  bounded  by      

14  

Θ l (t) = ∑Fh ∈hp(Fl )

t

Ph

.Δ(l,h)

t

Ph

.Δ(l,h)

Ph is period of Fh

hp(Fl) is the set of higher priority flows of Fl

Page 15: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Complete  Analysis  Ø  Rkch  :  upper  bound  of  end-­‐to-­‐end  delay  of  Fk  considering  that  

it  is  delayed  only  due  to  channel  conten=on  

 Ø  Rkch,con  :  upper  bound  of  end-­‐to-­‐end  delay  of  Fk  considering  

both  channel  conten=on  and    transmission  conflict    

Ø  For  every  flow  in  decreasing  order  of  priority  q  Step  1:  derive  an  upper  bound  assuming  it  does  not  conflict  with  any  

higher  priority  flow.  q  Step  2:  incorporate  the  conflict  delay  into  the  bound  of  Step  1  

 

15  

conflict channel contention

Page 16: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Step  1  for  Flow  Fk  Ø  Ωk(x):  total  delay  that  the  higher  priority  flows  can  cause  on                

Fk  due  to  channel  conten=on  in  an  interval  of  x  slots  q  Determined  considering  the  end-­‐to-­‐end  delay    Rich,con  of  every  higher  

priority  flow  Fi    q  Analyzed  based  on  the  response  =me  analysis  for  mul=processor  

[Guan  RTSS  2009]  

                           Ø  Rkch  is  the  minimum  value  of  x  determined  by  a  fixed-­‐point  

algorithm  in  equa=on                                        

16  

x =Ω

k(x)

m

+ C

k

m: total number of channels Number of transmissions along the route of Fk

Page 17: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Step  2  for  Flow  Fk  Ø  Rkch,con    is  the  minimum  value  of  y    that  solves  the  following  

equa=on  using  a  fixed-­‐point  algorithm                                                          

17  

y = Rk

ch+ Θk (y)

Delay of Fk assuming it does not conflict with any higher priority flow

Total delay of Fk due to conflict with higher priority flows

Ø       If  x    (in  Step  1)  or  y  (in  Step  2)    exceeds  Dk  (deadline),  the  algorithm  terminates  and  reports  the  case  as  unschedulable

 The  analysis  runs  in  pseudo  polynomial  =me.

Page 18: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Simulations  Ø  Real  network  topologies  

q  Testbed  of  48  TelosB  motes  

Ø  Random  topologies  

Ø  Priority  assignment  policies  q  Deadline  monotonic  (DM)  q  Propor=onal  Deadline  monotonic  

Ø  Metrics  q  Acceptance  ra=o      q  Pessimism  ra=o

18  €

=Numberof test casesdeemed schedulableby analysis

Total test cases

=Analyticalupperboundof end toend delay

Worst caseend toend delayobserved in simulation

Testbed topology

Page 19: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

40 60 80 1000.2

0.4

0.6

0.8

1

% Source or destination nodes

Acc

epta

nce

ratio

Simulation (1 route)Our analysis (1 route)Simulation (2 routes)Our analysis (2 routes)

Acceptance  Ratio  (Testbed  Topology)      

19  

Ø  Number of channels=12 Ø  Priority assignment policy: Deadline Monotonic

Page 20: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Pessimism  Ratio  (Random  Topology)      

20  

30 50 70 90 110 130 150 170 190 210 230 250

1

1.2

1.4

1.6

1.8

2

2.2

Pe

ssim

ism

ra

tio

Number of nodes

Page 21: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

What  we  have  so  far…  Ø  Real-­‐=me  wireless  is  a  reality  today  

q  Industrial  standards:  WirelessHART,  ISA100  q  Real  deployments  in  the  field  

Ø  Star=ng  a  real-­‐=me  scheduling  theory  for  wireless  q  Leverage  real-­‐=me  processor  scheduling  q  Incorporate  unique  wireless  proper=es    

Ø  What’s  next?  

21  

Page 22: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Wireless  Dynamics  Challenges  Ø  Wireless  links  change  dynamically.  Ø  Requires  global  rescheduling.  Ø  Current  approach  too  rigid?  

 Approaches  Ø  Flexible  and  dynamic  scheduling  

q  e.g.,  RTQS  avoids  conflicts  by  enforcing  inter-­‐release  =mes  locally  [RTSS’07]  

Ø  Mixed  cri=cality  in  wireless  q  Sacrifice  non-­‐cri=cal  flows  when  links  break  q  Maintain  guarantees  to  cri=cal  flows  

22  

Page 23: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Scheduling-­‐Control  Co-­‐Design  Challenge  Ø  Wireless  resource  is  scarce  and  dynamic  Ø  Cannot  afford  separa=ng  scheduling  and  control  

Approaches  Ø  Schedule  to  op=mize  control  objec=ves,  not  to  meet  deadlines  

q  e.g.,  rate  selec=on  for  wireless  control  [RTAS’12]  

Ø  Achieve  fault  tolerance  through  wireless  and  control  co-­‐design  Ø  Scheduling  for  self-­‐triggered  and  event-­‐based  control  

23  

Page 24: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Scalability  Challenges  Ø  Centralized  approach  does  not  scale  

q  Network  management  q  Feedback  control  loop    

Ø  WirelessHART:  A  gateway  can  support  up  to  80  devices  

Approaches  Ø  Hierarchical  network  management  Ø  Local  adapta=on  Ø  Peer-­‐to-­‐peer  control  Ø  Synchronized  distributed  clocks  as  =me  sources  Ø  Key:  Scale  without  losing  predictability!  

24  

Page 25: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

Summary  Ø  Real-­‐=me  wireless  is  a  reality  today  

q  Industrial  standards:  WirelessHART,  ISA100  q  Real  deployments  in  the  field  

Ø  Star=ng  a  real-­‐=me  scheduling  theory  for  wireless  q  Leverage  real-­‐=me  processor  scheduling  q  Incorporate  unique  wireless  proper=es    

Ø  Tremendous  opportuni=es  ahead  q  Op=mize  for  control  q  Robust  under  wireless  dynamics  q  Scale  to  10,000+  nodes  

Ø  Integrate  protocol  design  and  scheduling  theory  

25  

Page 26: Real%Time)WirelessControl)Networks)lu/cse521s/Slides/rt-wirelesshart.pdf · Q(I,h)!can!overes=mate!the!delay!!! Δ(I,h):!amore!precise!bound!of! delay!F h!can!cause!F l!! Maximal!common!path!(MCP)!

References  Ø  A.  Saifullah,  Y.  Xu,  C.  Lu  and  Y.  Chen,  End-­‐to-­‐End  Delay  Analysis  for  Fixed  

Priority  Scheduling  in  WirelessHART  Networks,  RTAS  2011.  Ø  A.  Saifullah,  C.  Wu,  P.  Tiwari,  Y.  Xu,  Y.  Fu,  C.  Lu  and  Y.  Chen,  Near  Op=mal  

Rate  Selec=on  for  Wireless  Control  Systems,  RTAS  2012.  Ø  A.  Saifullah,  Y.  Xu,  C.  Lu  and  Y.  Chen,  Priority  Assignment  for  Real-­‐=me  Flows  

in  WirelessHART  Networks,  ECRTS  2011.  Ø  A.  Saifullah,  Y.  Xu,  C.  Lu  and  Y.  Chen,  Real-­‐=me  Scheduling  for  WirelessHART  

Networks,  RTSS  2010.  Ø  O.  Chipara,  C.  Lu  and  G.-­‐C.  Roman,  Real-­‐=me  Query  Scheduling  for  Wireless  

Sensor  Networks,  RTSS  2007.  

h?p://wsn.cse.wustl.edu/index.php/Real-­‐Time_Wireless_Control_Networks    

26