Real- Time Wireless Control Networks for Cyber- Physical Systems Chenyang Lu Cyber- Physical Systems Laboratory Department of Computer Science and Engineering
Wireless Control Networks Ø Real-time Ø Reliability Sensor Actuator Receive sensor data Ø Control performance Send control command 2
Wireless for Process Automa?on Ø World-wide adoption of wireless in process industries 1.5+ billion hours opera6ng experience 100,000s of smart wireless field devices 10,000s of wireless field networks Offshore Onshore Courtesy: Emerson Process Management Killer App of Sensor Networks! 3
WirelessHART Ø Industrial-grade reliability Multi-channel TDMA MAC One transmission per channel Redundant routes Over IEEE 802.15.4 PHY Ø Centralized network manager collects topology information generates routes and transmission schedule changes when devices/links break Industrial wireless standard for process monitoring and control 4
Our Endeavor 1. Real-time scheduling theory for wireless 2. Wireless-control co-design 3. Case study: wireless structural control 5
Real- Time Scheduling for Wireless Goals Ø Real-time transmission scheduling à meet end-to-end deadlines Ø Fast schedulability analysis à online admission control and adaptation Approach Ø Leverage real-time scheduling theory for processors Ø Incorporate unique wireless characteristics Results Ø Fixed priority scheduling Delay analysis [RTAS 2011] Priority assignment [ECRTS 2011] Ø Dynamic priority scheduling Conflict-aware Least Laxity First [RTSS 2010] Delay analysis for Earliest Deadline First [IWQoS 2014] 6
Real- Time Scheduling for Wireless Goals Ø Real-time transmission scheduling à meet end-to-end deadlines Ø Fast schedulability analysis à online admission control and adaptation Approach Ø Leverage real-time scheduling theory for processors Ø Incorporate unique wireless characteristics Results Ø Fixed priority scheduling Delay analysis [RTAS 2011] Priority assignment [ECRTS 2011] Ø Dynamic priority scheduling Conflict-aware Least Laxity First [RTSS 2010] Delay analysis for Earliest Deadline First [IWQoS 2014] 7
Real- Time Flows Ø Flow: sensor à controller à actuator over mul6- hops highest lowest priority Ø A set of flows F={F 1, F 2,, F N } ordered by priori6es Ø Each flow F i is characterized by A source (sensor), a des6na6on (actuator) A route through the controller A period P i A deadline D i ( P i ) Total number of transmissions C i along the route 8
Scheduling Problem Ø Fixed priority scheduling Every flow has a fixed priority Order transmissions based on the priori6es of their flows. Ø Flows are schedulable if delay i D i for every flow F i Ø Goal: efficient delay analysis end-to-end delay of F i deadline of F i Gives an upper bound of the end- to- end delay for each flow Used for online admission control and adapta6on 9
End- to- End Delay Analysis Ø A lower priority flow is delayed due to channel contention: all channels in a slot are assigned to higher priority flows transmission conflict: transmissions involve a same node Ø Analyze each type of delay separately 3 2 1 4 5 1 and 5 are conflicting 4 and 5 are conflicting 3 and 4 are conflict-free Ø Combine both delays à end- to- end delay bound 10
Insights Ø Flows vs. Tasks Similar: channel contention Different: transmission conflict Ø Channel contention à multiprocessor scheduling A channel à a processor Flow F i à a task with period P i, deadline D i, execution time C i Leverage existing response time analysis for multiprocessors Ø Need to account for delays due to transmission conflicts 11
Delay due to Conflict Ø Low-priority flow F l and highpriority flow F h, conflict à delay F l )*$%+*, F l delayed by 2 slots Ø Q(I,h): #transmissions of F h sharing nodes with F l In the worst case, F h can delay F l by Q(l,h) slots Q(l,h) = 5 à F h can delay F l by 5 slots F l delayed by 2 slots F l delayed by 1 slot!"#$%&'"(!" # &!"#$%&'"(!" $ 12
Acceptance Ra?o Frac6on of test cases deemed schedulable based on analysis vs. simula6ons 1 Acceptance ratio 0.8 0.6 0.4 0.2 Simulation (1 route) Our analysis (1 route) Simulation (2 routes) Our analysis (2 routes) 40 60 80 100 % Source or destination nodes 13
WirelessHART Tested Ø Implementation on WUSTL WSN testbed (69 TelosB motes) Ø WirelessHART stack (multi-channel TDMA + forwarding) Ø Network manager (scheduler + routing) WUSTL wireless sensor network testbed 14
Outline Ø WirelessHART: real-time wireless in industry Ø Real-time scheduling theory for wireless Ø Wireless-control co-design Ø Case study: wireless structural control 15
Wireless- Control Co- Design Goal: op6mize control performance over wireless Challenge Ø Wireless resource is scarce and dynamic Ø Cannot afford separating wireless and control designs Cyber-Physical Systems Approach Ø Holistic co-design of wireless and control Examples Ø Rate selection for wireless control [RTAS 2012, TECS] Ø Wireless structural control [ICCPS 2013] 16
Rate Selec?on for Wireless Control Ø Optimize the sampling rates of control loops sharing a WirelessHART network. Ø Rate selection must balance control and network delay. Low sampling rate à poor control performance High sampling rate à long delay à poor control performance 17
Control Performance Index Ø Digital implementation of control loop i Periodic sampling at rate f i Performance deviates from continuous counterpart Ø Control cost of control loop i under rate f i [Seto RTSS 96] Approximated as α i e β i f i with sensitivity coefficients α i, β i Ø Overall control cost of n loops: n i=1 α i e β i f i 18
The Rate Selec?on Problem Ø Constrained non-linear optimization Ø Determine sampling rates f = { f 1, f 2,, f n } minimize control cost n i=1 α i e β i f i subject to delay i 1/ f i f i min f i f i max Delay bound 19
Polynomial Time Delay Bounds Ø In terms of decision variables (rates), the delay bounds are Lagrange dual of objec6ve Rate of control loop 6 Non-linear Non-convex Non-differentiable The op6miza6on problem is thus non- convex, non- differen6able, not in closed form 20
Wireless- Control Co- Design Relax delay bound to simplify optimization Ø Derive a convex and smooth, but less precise delay bound. Rate selection becomes a convex optimization problem. Control cost 21
Evalua?on Control Cost 30 25 20 15 10 5 Greedy Heuristic Subgradient Convex Approximation Simulated Annealing Execution Time (seconds) 10 6 10 4 10 2 10 0 Greedy Heuristic Subgradient Convex Approximation Simulated Annealing 0 5 10 15 20 25 30 Number of Control Loops 10 2 5 10 15 20 25 30 Number of Control Loops Greedy heuristic is fast but incurs high control cost. Subgradient method is neither efficient nor effective. Simulated annealing incurs lowest control cost, but is slow. Convex approximation balances control cost and execution time. 22
Case Study: Wireless Structural Control Ø Structural control systems protect civil infrastructure. Ø Wired control systems are costly and fragile. Ø Wireless structural control achieves flexibility and low cost. Heritage tower crumbles down in earthquake of Finale Emilia, Italy, 2012. Hanshin Expressway Bridge ader Kobe earthquake, Japan, 1995. 7/25/14 23
Contribu?ons [ICCPS 2013] Ø Wireless Cyber-Physical Simulator (WCPS) Capture dynamics of both physical plants and wireless networks Enable holistic, high-fidelity simulation of wireless control systems Integrate TOSSIM and Simulink/MATLAB Open source: http://wcps.cse.wustl.edu Ø Realistic case studies on wireless structural control Wireless traces from real-world environments Structural models of a building and a large bridge Excited by real earthquake signal traces Ø Cyber-physical co-design End-to-end scheduling + control design Improve control performance under wireless delay and loss 7/25/14 24
Bill Emerson Memorial Bridge (a) Ø Main span: 1,150 ft. Ø Carries up to 14,000 cars a day over Mississippi. Ø In the New Madrid Seismic Zone Ø Replaced joints of the bridge by actuators q 24 hydraulic actuators Ø Vibration mode: q q q 0.1618 Hz for 1st mode 0.2666 Hz for 2nd mode 0.3723 Hz for 3rd mode (b) 7/25/14 25
Jindo Bridge: Wireless Traces Ø Largest wireless bride deployment [Jang 2010] 113 Imote2 units; Peak acceleration sensitivity of 5mg 30mg Ø RSSI/noise traces from 58-node deck-network for this study 7/25/14 26
Reduc?on in Max Control Power Cyber- physical co- design à 50% reduc6on in control power. 27
Conclusion Ø Real-time wireless is a reality today Industrial standards: WirelessHART, ISA100 Field deployments world wide Ø Real-time scheduling theory for wireless Leverage real-time processor scheduling Incorporate unique wireless properties Ø Cyber-physical co-design of wireless control systems Rate selection for wireless control systems Scheduling-control co-design for wireless structural control Ø WCPS: Wireless Cyber-Physical Simulator Enable holistic simulations of wireless control systems Realistic case studies of wireless structural control 28
Future Direc?ons Ø Scaling up wireless control networks From 100 nodes à 10,000 nodes Dealing with dynamics locally Hierarchical or decentralized architecture Ø A theory and prac6ce for wireless control From case studies to unified theory and methodology Bridge the gap between theory and systems Theory à robust implementa6on à deployment 29
For More Informa?on Ø Real-Time Scheduling for Wireless A. Saifullah, Y. Xu, C. Lu, and Y. Chen, Real-time Scheduling for WirelessHART Networks, IEEE Real- Time Systems Symposium, RTSS 2010. 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, Y. Xu, C. Lu and Y. Chen, Priority Assignment for Real-time Flows in WirelessHART Networks, ECRTS 2011. C. Wu, M. Sha, D. Gunatilaka, A. Saifullah, C. Lu and Y. Chen, Analysis of EDF Scheduling for Wireless Sensor-Actuator Networks, IWQoS 2014. Ø Wireless-Control Co-Design A. Saifullah, C. Wu, P. Tiwari, Y. Xu, Y. Fu, C. Lu and Y. Chen, Near Optimal Rate Selection for Wireless Control Systems, ACM Transactions on Embedded Computing Systems, 13(4s), 2014. Ø Case Study on Wireless Structural Control B. Li, Z. Sun, K. Mechitov, G. Hackmann, C. Lu, S. Dyke, G. Agha and B. Spencer, Realistic Case Studies of Wireless Structural Control, ICCPS 2013. CPS Project on Wireless Structural Monitoring and Control: http://bridge.cse.wustl.edu Wireless Cyber-Physical Simulator: http://wcps.cse.wustl.edu 30