Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
End-to-end Real-time Guarantees in Wireless Cyber-physical Systems
Romain JacobPengcheng Huang Lothar Thiele
RTSS 16 - IoT and Networking SessionDecember 1, 2016
Marco ZimmerlingJan Beutel
Predictability is key!
2
A Cyber-physical System goes beyond a real-time wireless network
Real-time guarantees > Deadlines are met
3
Wireless network Low-power Multi-hop
Network deadline
Predictability
A Cyber-physical System goes beyond a real-time wireless network
Real-time guarantees > End-to-end deadlines are met
Buffer management > No buffer overflow
4
Wireless network Low-power Multi-hop
Controller
Actuator
Sensor
End-to-end deadline
Network deadline
Predictability
A Cyber-physical System goes beyond a real-time wireless network
Real-time guarantees > End-to-end deadlines are met
Buffer management > No buffer overflow
5
Predictability
Local interference
Application
Communication
Predicatability
Design goals
Real-time guarantees
Buffer management
Adaptability
Efficiency
Composability
6
Network
Blink
Device
?
Bolt
System
?
?
?
?
DRP
First A predictable and adaptivepiece wireless network
7
Wireless network Low-power Multi-hop
Controller
Actuator
Sensor
First A predictable and adaptivepiece wireless network
8
Wireless network Low-power Multi-hop
Controller
Actuator
Sensor
State-of-the-art wireless protocolsare predictable or adaptive
Splash, RAP EfficientAdaptive> not Predictable
WirelessHART PredictableEfficient> not Adaptive
9
Blink A real-time, reliable and[1] adaptive wireless protocol
Adaptive Based on Glossy> Flooding primitive
Reliable Average 99.97% reception rate> Multiple testbeds> Tested up to 94 nodes
Real-time Online scheduling> EDF-based Lazy Scheduling
10
[1] Zimmerling M. et al., Adaptive Real-time Communication for Wireless Cyber-physical SystemsTo appear in ACM Transactions on Cyber-Physical Systems, 2016
Blink A real-time, reliable and[1] adaptive wireless protocol
Abstraction Low-power Wireless Bus (LWB)> MAC protocol
Communication TDMA-basedin rounds > Sleep between rounds
> Wireless yields sync!
11
𝑇𝑛𝑒𝑡
𝐶𝑛𝑒𝑡
𝑡
𝑡
𝑡
Node 1
Node 2
Node N
…
M slots
……
…
[1] Zimmerling M. et al., Adaptive Real-time Communication for Wireless Cyber-physical SystemsTo appear in ACM Transactions on Cyber-Physical Systems, 2016
Variable!
Sched(n+1)
Blink A real-time, reliable and[1] adaptive wireless protocol
Abstraction Low-power Wireless Bus (LWB)> MAC protocol
Communication TDMA-basedin rounds > Sleep between rounds
> Wireless yields sync!
12
𝑇𝑛𝑒𝑡
𝐶𝑛𝑒𝑡
𝑡
𝑡
𝑡
Node 1
Node 2
Node N
…
M slots
……
…
[1] Zimmerling M. et al., Adaptive Real-time Communication for Wireless Cyber-physical SystemsTo appear in ACM Transactions on Cyber-Physical Systems, 2016
Variable!
Design goals
Real-time guarantees
Buffer management
Adaptability
Efficiency
Composability
13
Network Device System
na
na
?
?
?
?
?
Blink Bolt DRP
Second A dual-processor architecturepiece to mitigate local interference
14
Wireless network Low-power Multi-hop
Controller
Actuator
Sensor
Second A dual-processor architecturepiece to mitigate local interference
15
Wireless network Low-power Multi-hop
Controller
Actuator
Sensor
Bolt A dual-processor architecture [2] to mitigate local interference
16
BOLTBOLT
APIBOLT
API
…
…Receive Buffer
flush
read
write
…
Wireless Comm. Tasks
ApplicationTasks
Communication Processor (CP)
…
Receive Buffer
flush
read
write
Application Processor (AP)
Incoming
Outgoing
Real-time Formally verifiedbehavior Implemented, tested, deployed
Efficient 𝜇𝑊 > sleep𝑚𝑊 > active
Composable Hardware/Softwarefree composition
[2] Sutton F. et al., Bolt: A Stateful Processor Interconnect, SenSys’15, 2015
Design goals
Real-time guarantees
Buffer management
Adaptability
Efficiency
Composability
17
Network Device System
?
?
?
?
?
Blink Bolt DRP
na
na
Design goals → How can we fill the blanks?
Real-time guarantees
Buffer management
Adaptability
Efficiency
Composability
18
Network Device System
?
?
?
?
?
Blink Bolt DRP
? na
na
Third Distributed Real-time Protocol (DRP)piece
Real-time guarantees
Buffer management
Adaptability
Efficiency
Composability
19
Network Device System
?
?
?
?
?
?
Blink Bolt DRP
na
na
DRP is based on three main concepts
Communication is constrained within registered flows only
Global requirements are splitedacross distributed components
Interaction between componentsis based on contracts
20
DRP is based on three main concepts
Communication is constrained within registered flows only
Global requirements are splitedacross distributed components
Interaction between componentsis based on contracts
21
Communication is constrained within registered flows only
Flow 𝑖 𝐹𝑖 = ( 𝑛𝑖𝑠, 𝑛𝑖
𝑑 , 𝑇𝑖 , 𝐽𝑖 , 𝐃𝑖 )
Release model Sporatic with jitter
22
SourceDestinationMin. release intervalJitterEnd-to-end deadline
DRP is based on three main concepts
Communication is constrained within registered flows only
Global requirements are splitedacross distributed components
Interaction between componentsis based on contracts
23
Global requirements are splitedacross distributed components
DRP : 𝐷𝑖𝑠 + 𝐷𝑖
𝑛𝑒𝑡 + 𝐷𝑖𝑑 = 𝐃
end-to-end deadline : 𝐃
𝐷𝑖𝑠 𝐷𝑖
𝑛𝑒𝑡 𝐷𝑖𝑑
Wireless protocolSource Destination
24
Real-timeguarantee
DRP is based on three main concepts
Communication is constrained within registered flows only
Global requirements are splitedacross distributed components
Interaction between componentsis based on contracts
25
Interaction between componentsis based on contracts
26
> Node ↔ Network
> Max resource demandMin service delivered
>
Contract
CONSTRAINTS
ON LOCAL
SCHEDULES
BB
AA
Predictability Performance
Example
Scheduling of Communication Processors (CP)
Real-time Participate in rounds guarantees > 𝑇𝑛𝑒𝑡 Blink schedule
Flush before roundsWrite after rounds> 𝑇𝑛𝑒𝑡 Blink schedule
Buffer Flush Bolt regularlymanagement > 𝑇𝑓
𝑠 Comm. Processorschedule
27
Example
Scheduling of Communication Processors (CP)
How can we guarantee that all tasks are schedulable?
28
𝐶𝑓 𝐶𝑤
Participate in rounds
Flush before rounds
Write after rounds
Flush Bolt regularly
𝑇𝑓𝑠
𝑡
𝐶𝑛𝑒𝑡
𝑇𝑛𝑒𝑡
𝑡
Example
Scheduling of Communication Processors (CP)
How can we guarantee that all tasks are schedulable?
29
𝐶𝑓 𝐶𝑤
Participate in rounds
Flush before rounds
Write after rounds
Flush Bolt regularly
𝑇𝑓𝑠
𝑡
Variable!
Variable!
𝐶𝑛𝑒𝑡
𝑇𝑛𝑒𝑡
𝑡
𝐶𝑛𝑒𝑡
𝑇𝑛𝑒𝑡
Example
Scheduling of Communication Processors (CP)
How to guarantee that all tasks are schedulable?
30
𝐶𝑓 𝐶𝑤
𝑡
Participate in rounds
Flush before rounds
Write after rounds
Flush Bolt regularly
Variable!
Variable! Conflict!𝑇𝑓𝑠
𝑡
Example
Scheduling of Communication Processors (CP)
How to guarantee that all tasks are schedulable?
31
𝐶𝑓 𝐶𝑤𝐶𝑛𝑒𝑡
𝑇𝑛𝑒𝑡
Participate in rounds
Flush before rounds
Write after rounds
Flush Bolt regularly
𝐶𝐶𝑃 ≜ 𝐶𝑓 + 𝐶𝑛𝑒𝑡 + 𝐶𝑤> 𝑇𝑛𝑒𝑡 ≜ 𝑘 ⋅ 𝐶𝐶𝑃
Solution TDMA approach
Variable!
Variable!
𝑡𝑇𝑓𝑠
𝑡
Example
Scheduling of Communication Processors (CP)
How to guarantee that all tasks are schedulable?
32
𝐶𝑓 𝐶𝑤
Participate in rounds
Flush before rounds
Write after rounds
Flush Bolt regularly
𝑡𝑇𝑓𝑠
𝐶𝐶𝑃 ≜ 𝐶𝑓 + 𝐶𝑛𝑒𝑡 + 𝐶𝑤> 𝑇𝑓
𝑠 ≜ 𝐶𝐶𝑃> 𝑇𝑛𝑒𝑡 ≜ 𝑘 ⋅ 𝐶𝐶𝑃
Fixed to min
Solution TDMA approach
Variable!
𝐶𝑛𝑒𝑡
𝑇𝑛𝑒𝑡
𝑡
Example
Scheduling of Communication Processors (CP)
How to guarantee that all tasks are schedulable?
33
𝐶𝑓 𝐶𝑤𝐶𝑛𝑒𝑡
𝑇𝑛𝑒𝑡
Participate in rounds
Flush before rounds
Write after rounds
Flush Bolt regularly
𝑡𝑇𝑓𝑠
𝐶𝐶𝑃 ≜ 𝐶𝑓 + 𝐶𝑛𝑒𝑡 + 𝐶𝑤> 𝑇𝑓
𝑠 ≜ 𝐶𝐶𝑃> 𝑇𝑛𝑒𝑡 ≜ 𝑘 ⋅ 𝐶𝐶𝑃
Variable but constrained
Solution TDMA approach
𝑡
Fixed to min
+ Predictability of Network + Predictability of Devices + DRP contracts
34
End-to-end latencyBuffer size
Flush interval 𝑇𝑓𝑠
Flush interval 𝑇𝑓𝑑
Network deadline 𝐷𝑖𝑛𝑒𝑡
End-to-end deadlineMemory space≤
= System predictability Worst-Case Analysis
= 𝑓( Local parameters )
Can we set localparameters such that…
If YES System predictabilityby design
Ultimately
Design goals
Real-time guarantees
Buffer management
Adaptability
Efficiency
Composability
35
Network Device System
?
?
?
?
?
?
Blink Bolt DRP
na
na
Predicatability
Design goals
Real-time guarantees
Buffer management
Adaptability
Efficiency
Composability
36
Network Device System
?
?
?
?
?
?
Blink Bolt DRP
na
na
From there, adaptability is one (close) step away
37
End-to-end latencyBuffer size
End-to-end deadlineMemory space≤
Can we set localparameters such that…
ADMISSION
TESTS
From there, adaptability is one (close) step away
38
ADMISSION
TESTS
Depends only on local parameters!
Example
Communication Processor
Adaptability is achieved via a distributed registration scheme
39
LOGICAL LAYER
PHYSICAL LAYER
request : 𝑇𝑖 , 𝐽𝑖𝐷𝑖 , 𝐃i YES Y
APs CPsBOLT APdBOLTCPdBLINKPacket
flow
Bolt buffer andlocal memory OK?
Abort
Register flow
Abort
Register flow
Abort
Register flow and update schedule
YES
Abort
Register flow andupdate schedule
Abort
Register flow and update schedule
Compute 𝐷𝑖
𝑇𝑖 , 𝐽𝑖𝐃i
Networkschedule OK?
Local memory OK?
update : 𝑇𝑓𝑑
YES
nack
ack
end-to-end latency ≤ 𝐃i
YES
REGISTRATION
SCHEMEADMISSION
TESTS
NO NO NO NO
𝑓(𝑇𝑓𝑠, 𝐷𝑖) 𝑔(𝑇𝑓
𝑑)
Bolt buffer
and 𝑇𝑓𝑑 OK?
nack
ack
nack
ack
nack
ack
Predicatability
Design goals
Real-time guarantees
Buffer management
Adaptability
Efficiency
Composability
40
Network Device System
?
?
Blink Bolt DRP
na
na
Adaptability
The detailed system analysis allows for performance optimization
Minimal admissible end-to-end deadline
𝐃𝑚𝑖𝑛 = 𝛿𝑓𝑐𝑜𝑛𝑠𝑡 + 𝑇𝑚𝑖𝑛 + 𝑇𝑚𝑖𝑛 + 𝛿𝑔
𝑐𝑜𝑛𝑠𝑡 + 𝑇𝑓,𝑚𝑖𝑛𝑑
41
PacketflowAPs CPsBOLT APdBOLTCPdBLINK
end-to-end latency ≥ 𝐃𝑚𝑖𝑛
The detailed system analysis allows for performance optimization
Minimal admissible end-to-end deadline
𝐃𝑚𝑖𝑛 = 𝛿𝑓𝑐𝑜𝑛𝑠𝑡 + 𝑇𝑚𝑖𝑛 + 𝑇𝑚𝑖𝑛 + 𝛿𝑔
𝑐𝑜𝑛𝑠𝑡 + 𝑇𝑓,𝑚𝑖𝑛𝑑
42
PacketflowAPs CPsBOLT APdBOLTCPdBLINK
end-to-end latency ≥ 𝐃𝑚𝑖𝑛Bolt delays
Source delay> Message release by the source> Available for communication
The detailed system analysis allows for performance optimization
Minimal admissible end-to-end deadline
𝐃𝑚𝑖𝑛 = 𝛿𝑓𝑐𝑜𝑛𝑠𝑡 + 𝑇𝑚𝑖𝑛 + 𝑇𝑚𝑖𝑛 + 𝛿𝑔
𝑐𝑜𝑛𝑠𝑡 + 𝑇𝑓,𝑚𝑖𝑛𝑑
43
PacketflowAPs CPsBOLT APdBOLTCPdBLINK
end-to-end latency ≥ 𝐃𝑚𝑖𝑛
Network delay: Waiting time > Message available> Message processed by the network
The detailed system analysis allows for performance optimization
Minimal admissible end-to-end deadline
𝐃𝑚𝑖𝑛 = 𝛿𝑓𝑐𝑜𝑛𝑠𝑡 + 𝑇𝑚𝑖𝑛 + 𝑇𝑚𝑖𝑛 + 𝛿𝑔
𝑐𝑜𝑛𝑠𝑡 + 𝑇𝑓,𝑚𝑖𝑛𝑑
44
PacketflowAPs CPsBOLT APdBOLTCPdBLINK
end-to-end latency ≥ 𝐃𝑚𝑖𝑛
Network delay: Transmission > Message processed by the network> Message transmitted to the destination node
The detailed system analysis allows for performance optimization
Minimal admissible end-to-end deadline
𝐃𝑚𝑖𝑛 = 𝛿𝑓𝑐𝑜𝑛𝑠𝑡 + 𝑇𝑚𝑖𝑛 + 𝑇𝑚𝑖𝑛 + 𝛿𝑔
𝑐𝑜𝑛𝑠𝑡 + 𝑇𝑓,𝑚𝑖𝑛𝑑
45
PacketflowAPs CPsBOLT APdBOLTCPdBLINK
end-to-end latency ≥ 𝐃𝑚𝑖𝑛
Destination delay: Bolt > Message transmitted to the destination node> Message available in the Bolt queue
The detailed system analysis allows for performance optimization
Minimal admissible end-to-end deadline
𝐃𝑚𝑖𝑛 = 𝛿𝑓𝑐𝑜𝑛𝑠𝑡 + 𝑇𝑚𝑖𝑛 + 𝑇𝑚𝑖𝑛 + 𝛿𝑔
𝑐𝑜𝑛𝑠𝑡 + 𝑇𝑓,𝑚𝑖𝑛𝑑
46
PacketflowAPs CPsBOLT APdBOLTCPdBLINK
end-to-end latency ≥ 𝐃𝑚𝑖𝑛
Destination delay: Application > Message available in the Bolt queue> Message retrieved by the destination application
The detailed system analysis allows for performance optimization
Minimal admissible end-to-end deadline
𝐃𝑚𝑖𝑛 = 𝛿𝑓𝑐𝑜𝑛𝑠𝑡 + 𝑇𝑚𝑖𝑛 + 𝑇𝑚𝑖𝑛 + 𝛿𝑔
𝑐𝑜𝑛𝑠𝑡 + 𝑇𝑓,𝑚𝑖𝑛𝑑
Given Packet size 32 Bytes
𝐶𝑛𝑒𝑡 1 𝑠
𝑇𝑓,𝑚𝑖𝑛𝑑 0.1 𝑠
> 𝐃𝑚𝑖𝑛 3.46 𝑠Max data rate 29.7 𝐵𝑝𝑠 per flow
47
Predicatability
Design goals
Real-time guarantees
Buffer management
Adaptability
Efficiency
Composability
48
Network Device System
?
Blink Bolt DRP
na
na
Using flooding primitives
enables the design of both
adaptive AND predictable
Wireless Cyber-Physical Systems
49
End-to-end Real-time Guarantees in Wireless Cyber-physical Systems
Romain JacobPengcheng Huang Lothar Thiele
RTSS 16 - IoT and Networking SessionDecember 1, 2016
Marco ZimmerlingJan Beutel
Simulation correlates closely with the analysis
Typical simulation trace result
49