Dependable Wireless Control through Cyber-Physical …lu/talks/wireless-cps-ewsn16.pdf ·...

29
Dependable Wireless Control through Cyber-Physical Co-Design Chenyang Lu Cyber-Physical Systems Laboratory Department of Computer Science and Engineering

Transcript of Dependable Wireless Control through Cyber-Physical …lu/talks/wireless-cps-ewsn16.pdf ·...

Dependable Wireless Control through Cyber-Physical Co-Design

ChenyangLuCyber-PhysicalSystemsLaboratoryDepartmentofComputerScienceandEngineering

WirelessforProcessAutoma1on

2

Emerson•  5.9+ billion hours

operating experience

•  26,200+ wireless field networks

$944.92 million by 2020 [Market and Market] Courtesy:EmersonProcessManagement

Offshore Onshore

Killer App of Sensor Networks!

WirelessHART

Industrial wireless standard for process automation

3

Ø  Reliability and predictabilityq  Multi-channel TDMA MACq  One transmission per channelq  Redundant routes

Ø Centralized network managerq  Collect topology informationq  Generate routes and scheduleq  Change when devices/links break

TheControlChallenge

4

sensordata

Sensor

Actuator

controlcommand

Controller

Dependable control requires•  real-time •  control performance•  resilience to loss

Most of today’s industrial wireless networks are for monitoring.

TowardsDependableWirelessControl

1.  Real-time wireless networks and analysis

2.  Optimizing control performance over wireless

3.  Resilient yet efficient wireless control under data loss.

5

This cannot be accomplished by wireless or control design alone à Cyber-Physical Co-design of Wireless and Control

TheReal-TimeProblem

Ø A feedback control loop incurs a flow Fi q  Route: sensor à … à controller à … à actuator

q  Generate packet every period Pi

q  Multiple control loops share a network

Ø  Each flow must meet deadline Di (≤ Pi)q  Stability and predictable control performance

Ø  Research problemsq  Real-time transmission scheduling à meet end-to-end deadlinesq  Fast schedulability analysis à adapt to wireless dynamics through

admission control and rate adaptation

6

DelaysinWirelessHART

A transmission is delayed by

Ø  channel contention: all channels are assigned to other transmissions

Ø  transmission conflict over a same nodeq  contributes significantly to latency!

7

2 1

•  1 and 5 conflict•  4 and 5 conflict•  3 and 4 do not

4 5 3

FastDelayAnalysis

Ø Compute upper bound of the delay for each flowq  Sufficient condition for real-time guarantees

Ø Channel contention à multiprocessor task schedulingq  A channel à a processorq  Flow Fi à a task with period Pi, deadline Di, execution time Ci q  Leverage existing response time analysis for multiprocessors

Ø Account for delays due to transmission conflicts

Ø  Fast delay analysesq  Fixed priority scheduling [RTAS 2011, TC, RTSS 2015]q  Earliest Deadline First [IWQoS 2014]

8

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

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

)*$%+*,

DelayduetoConflict

Ø  Low-priority flow Fl and high-priority flow Fh, conflict à delay Fl

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

delay Fl by Q(l,h) slots

Ø  Conflicts contributes significantly to delaysq  Must be considered in

algorithms and analysis!

9

Fl delayed by 2 slots

Fl delayed by 2 slots

Fl delayed by 1 slot

Real-TimeWirelessNetworkingØ  WirelessHART stack in TinyOS

q  Implementation on a testbed of 69 TelosB motes.q  Network manager (scheduler + routing).

Ø  Conflict-aware real-time schedulingq  Fixed priority assignment [ECRTS 2011]

q  Conflict-aware Least Laxity First [RTSS 2010]

Ø  Energy-efficient routing [IoTDI 2016]

Ø  Emergency communication [ICCPS 2015]

10

WUSTLwirelesssensornetworktestbed

Op1mizeControloverWireless

ObservationØ Wireless resource is scarce and dynamic

Ø Cannot afford separating wireless and control designs

Cyber-Physical Co-DesignØ Holistic co-design of wireless and control

ExamplesØ  Rate selection for wireless control [RTAS 2012, TECS]

Ø  Scheduling-control co-design [ICCPS 2013]

11

RateSelec1onforWirelessControl

Ø Optimize the sampling rates of control loops sharing a WirelessHART network.

Ø  Rate selection must balance control and network delay.q  Low sampling rate à poor control performance

q  High sampling rate à long delay à poor control performance

12

Ø  Control cost of control loop i under rate fi [Seto RTSS’96] q  Approximated as with sensitivity coefficients

ControlPerformanceIndex

13

Ø  Digital implementation of control loop iq  Periodic sampling at rate fiq  Performance deviates from continuous counterpart

α i e−β i fi

Ø  Overall control cost of n loops:

α i e−β i fi

i=1

n

∑€

α i, βi

delayi ≤1/ fi

TheRateSelec1onProblem

14

f = { f1, f2,, fn}

fimin ≤ f i ≤ f i

max

minimize control cost

α i e−β i fi

i=1

n

subject to

Ø  Constrained non-linear optimization

Ø  Determine sampling rates

Delay bound

PolynomialTimeDelayBounds

Ø  In terms of decision variables (rates), the delay bounds are

15

q  Non-linear q  Non-convex q  Non-differentiable

Lagrangedualofo

bjecDve

Rateofcont

rolloop6

Controlcost

Cyber-PhysicalCo-Design

Ø  Relax delay bound to simplify control optimizationØ Derive a convex and smooth, but less precise delay bound.

Ø  Rate selection becomes a convex optimization problem.➠ Optimize control performance efficiently at run time!

16

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), Article 128, April 2014.

ResilientControlunderDataLoss

Ø Data loss causes instability and degrades control performance.

Ø  State of the Artq  Control: control design to tolerate data loss.

q  Wireless: redundancy reduces loss at high resource cost.

Ø Cyber-physical co-designq  Incorporate resilient control design

q  Tailor wireless protocols for control designq  Resilient wireless control at low resource cost

17

HandleDataLossfromSensors

18

Ø  State Observer estimates system states based on a system model even if there is no new data from sensors

ModelPredictiveControl

ExtendedKalman Filter

Actuators

Sensors

Reference

[ ( ), ( 1), , ( )]u k u k u k w+ +, (, (, (, (

( )y kˆ( )y k

ˆ( )x k

Buffer

Plant

ˆ( )u k

B. Sinopoli et al., Kalman filtering with intermittent observations. IEEE Transactions on Automatic Control, 49(9):1453–1464, 2004.

19

HandleDataLossfromController

Ø Model Predictive Controlq  Controller computes control inputs in the next w+1 sampling

periods: u(k), u(k+2), ... u(k+w).q  Actuator applies u(k).

Ø  Buffered actuationq  Actuator buffers previous control inputs u(k+1), ... u(k+w).q  Applies buffered control input if updated input is lost. q  A control horizon of w+1 à may tolerate w consecutive packet loss.

ModelPredictiveControl

ExtendedKalman Filter

Actuators

Sensors

Reference

[ ( ), ( 1), , ( )]u k u k u k w+ +, (, (, (, (

( )y kˆ( )y k

ˆ( )x k

Buffer

Plant

ˆ( )u k

Pump 1

Heater

1L

2L

Tank 1

Tank 2

Reagent Tank 2

2u

b

Reagent Tank 1

1u

a

Pump 2

20

ExothermicReac1onPlantPlant: nonlinear chemical reaction Control input: u1 and u2 Objective: Maintain temperature in Tank 2

Wireless Cyber-Physical Simulator (WCPS)•  Integrate TOSSIM and Simulink

•  Capture dynamics of both wireless networks and physical plants

•  Holistic simulations of wireless control

•  Open source: wcps.cse.wustl.edu

21

ResilienceofStateObserver

Left: without state observer

Without state observerunder 60% sensor data loss

Extended Kalman Filter (EKF) under 60% sensor data loss

22

ResilienceofBufferedActua1on

System is more sensitive to data loss to actuators than that from sensors.

Actuation buffer (size 8) under 60% controller data loss

Tradi1onalRou1ngØ  Entire network uses uniform routing strategiesØ  Source routing: single path routing

q  Efficient but unreliable

Ø  Graph routing: every node on the primary path has a back path.

q  More reliable at cost of capacity and energy

23

Gateway 1 Gateway 2

Sensor(a) Source Routing (b) Graph Routing

1, 2

3, 4

3

4(5)

Primary Path

Backup Path

5 (6)5, 67

8

Gateway 1 Gateway 2

Sensor

1, 2

3, 4

5, 6

AsymmetricRou1ng

Ø Differentiated routing based on control needs

Ø  State observer handles data loss from sensors à Ø  Source routing from sensors

q  State observer compensates for lower reliabilityq  Cost less resource

Ø Actuation is more sensitive to data loss à Ø Graph routing to actuators

q  Higher reliabilityq  Higher resource cost needed by control

24

Tailoring routing strategies for control design à Efficient and Resilient Wireless Control

25

MaximumAbsoluteError

Ø  Source/Graph performs close to Graph routing under 3HzØ  Source/Graph’s resource efficiency allows 5Hz control

q  Further improve control performance

-73dBmNoise -73dBmNoise

B. Li, Y. Ma, T. Westenbroek, C. Wu, H. Gonzalez and C. Lu, Wireless Routing and Control: a Cyber-Physical Case Study, ACM/IEEE International Conference on Cyber-Physical Systems (ICCPS’16).

TowardsDependableWirelessControl

Ø Real-time, predictable wireless networkingq Protocols and delay analysis for bounded latency

Ø Optimize control performance over wirelessq  Incorporate scheduling analysis in rate selection for

wireless control

Ø Resilient wireless control under data lossq Tailor routing strategies for control needs

Ø Cyber-physical co-design helps overcome the dependability challenges!

26

EngineeringBuildingBlocks

Ø Industrial wireless networks have arrivedq  Industrial standards: WirelessHART, ISA100q World-wide field deploymentsq Great opportunity for the sensor networks community!

Ø WirelessHART implementation in TinyOS

Ø WCPS: Wireless Cyber-Physical Simulatorq Enable holistic simulations of wireless control systems

27

FutureDirec1ons

Ø Scaling up wireless control networksq From 100 nodes à 10,000 nodes

q Dealing with dynamics locallyq Hierarchical or decentralized architecture

q Predictable protocols over low-power wide-area networks

Ø Unified science and engineering of wireless controlq Case studies à unified theory, architecture and

methodology of cyber-physical co-design.

q Bridge the gap between theory and systems

28

ForMoreInforma1on

Ø  C. Lu, A. Saifullah, B. Li, M. Sha, H. Gonzalez, D. Gunatilaka, C. Wu, L. Nie and Y. Chen, Real-Time Wireless Sensor-Actuator Networks for Industrial Cyber-Physical Systems, Special Issue on Industrial Cyber-Physical Systems, Proceedings of the IEEE, accepted.

Ø  Research on Real-Time Industrial Wireless Sensor-Actuator Networks: http://cps.cse.wustl.edu/index.php/Real-Time_Wireless_Control_Networks

Ø  Wireless Cyber-Physical Simulator: http://wcps.cse.wustl.edu

29