Architecture and Mechanisms of Etherware for Cyber...

28
Architecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P. R. Kumar Electrical and Computer Engineering and Coordinated Science Laboratory University of Illinois at Urbana-Champaign April 11, 2011

Transcript of Architecture and Mechanisms of Etherware for Cyber...

Page 1: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Architecture and Mechanisms of Etherware for Cyber-Physical Systems

Kyoung-Dae Kim and P. R. Kumar

Electrical and Computer Engineering and Coordinated Science Laboratory

University of Illinois at Urbana-Champaign

April 11, 2011

Page 2: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Outline

●  Networked Control Systems

●  Etherware : A Middleware for Networked Control Systems

●  Real-Time Enhancement of the Etherware

●  A Networked Inverted Pendulum Control System

2

Page 3: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Cyber-Physical System

●  Cyber-Physical Systems ○  Systems with computing, communication, and physical entities ○  Networked Control System (NCS)

●  Characteristics of NCS ○  Large scale ○  Openness ○  Time-critical ○  Safety-critical

3

Page 4: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Challenges for NCS Development

●  Challenges for NCS Development ○  Platform heterogeneity ○  Clock offset and skew difference ○  Communication delay and packet loss ○  Support for continuous system evolution ○  ...

●  It is hard to develop a NCS application

●  Need for a well-designed Middleware for rapid, reliable, and evolvable NCS application development

4

Page 5: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Abstraction: Virtual Collocation

5

Page 6: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Abstraction: Virtual Collocation

6

Network

Supervisor

VisionServer

Controller

ProfileRegistry

VisionSensor VisionSensor Actuator

Page 7: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Abstraction: Virtual Collocation

7

Network

Supervisor

VisionServer

Controller

ProfileRegistry

VisionSensor VisionSensor Actuator

Addressing Clock

Difference

Platform Heterogeniety

Network Programming

Unpredictable Communication

Page 8: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Abstraction: Virtual Collocation

8

Supervisor

VisionServer

Controller

ProfileRegistry

VisionSensor VisionSensor Actuator

Middleware Supervisor

VisionServer

Controller

ProfileRegistry

VisionSensor VisionSensor Actuator

Page 9: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Outline

●  Networked Control Systems

●  Etherware : A Middleware for Networked Control Systems

●  Real-Time Enhancement of the Etherware

●  A Networked Inverted Pendulum Control System

9

Page 10: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Etherware Architecture

●  Etherware ○  A Middleware for NCS developed at the University of Illinois

[Baliga’05, Kim’10] ○  For rapid implementation of a reliable and evolvable NCS application

●  Microkernel Architecture ○  Etherware Kernel ○  Components

●  Component-based Application Development

●  Message oriented Communication

10

Page 11: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Message Delivery

●  Message Class ○  An XML document ○  Profile: Name of the Message Receiver

•  E.g., controller for car 1 ○  Content: Interaction semantics ○  Time Stamp: Time when Message is created

●  Etherware Kernel ○  Deliverable address lookup from Profile ○  Receiver Component gets executed when it receives a Message

Event-driven system

11

KERNEL

Scheduler

Dispatcher

Sender Component Receiver

Component

Page 12: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Component Model

●  Software Design Patterns ○  Façade, Strategy, Memento

●  Provide Flexibility ○  Runtime replacement of Component Logic ○  Runtime externalization of Component State

12

COMPONENT SHELL (FAÇADE)

COMPONENT LOGIC (STRATEGY)

Incoming Message

COMPONENT STATE (MEMENTO)

Outgoing Message

Page 13: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Etherware Services

●  ProfileRegistry ○  Map a profile (semantic name) to a deliverable address

●  NetworkMessenger ○  Maintain network connection between Etherware processes ○  Send/receive Message over network

●  NetworkTime ○  Estimate time differences between computing nodes ○  Translate timestamp in each remote message from remote time to local time

●  Notifier ○  Provide time-driven message, called Notification

13

Page 14: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

MessageStream and Filter Mechanisms

●  MessageStream ○  1-to-1 communication channel between components ○  Ordered and unreliable communication

•  Useful for control applications

●  Filter ○  A mechanism for easy data collection ○  A Tap is created in a MessageStream to intercept messages

14

Component 1 Component 2

Component 3

Page 15: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

MessageStream and Filter Mechanisms

●  MessageStream ○  1-to-1 communication channel between components ○  Ordered and unreliable communication

•  Useful for control applications

●  Filter ○  A mechanism for easy data collection ○  A Tap is created in a MessageStream to intercept messages

15

Controller 2 Actuator 2

Controller 1 Actuator 1

CA Component

Page 16: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Outline

●  Networked Control Systems

●  Etherware : A Middleware for Networked Control Systems

●  Real-Time Enhancement of Etherware

●  A Networked Inverted Pendulum Control System

16

Page 17: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Design for Temporal Guarantees

●  Message Delivery in Etherware ○  Non-concurrent ○  First In First Out (FIFO) order

●  Design Goal ○  Temporal Predictability ○  Flexibility

●  Hierarchical Scheduling Mechanism ○  Static classification at first stage ○  Dynamic ordering at second stage

17

Page 18: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Quality of Service (QoS) of Message Delivery

●  Quality of Service (QoS) ○  A collection of attribute that is used in scheduling for Message delivery ○  Period, relative deadline, absolute deadline, criticality of a Message

●  QoS Specification ○  QoS XML element in Message class ○  Message is scheduled based on the QoS specification and a scheduling policy

18

Page 19: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Preemptive Concurrent Message Delivery

●  Concurrency ○  Dispatching Module: A set of Dispatchers

●  Preemption ○  Assign a fixed priority to each Dispatcher ○  Each Dispatcher has a prioritized job queue

●  Thread Scheduling Rule (TSR) ○  A policy for Dispatching Module configuration

DISPATCHING MODULE

Dispatcher 1

Dispatcher 2

Dispatcher 3

SCHEDULER COMPONENT

Message w/ QoS ?

19

Page 20: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Preemptive Concurrent Message Delivery (continued)

●  Job Placement Rule (JPR) ○  A pair of attribute for linear ordering within Dispatching Module

●  Scheduling Policy ○  Map from a QoS specification to a JPR ○  JPR Implementation: An implementation of a specific scheduling policy

●  Interface for JPR Implementation ○  Independent of a specific scheduling policy

20

Message w/ JPR

DISPATCHING MODULE

Dispatcher 1

Dispatcher 2

Dispatcher 3

SCHEDULER COMPONENT

Message w/ QoS

Page 21: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Hierarchical Scheduling Mechanism

21

Message w/ JPR

DISPATCHING MODULE

Dispatcher 1

Dispatcher 2

Dispatcher 3

SCHEDULER COMPONENT

Message w/ QoS

JPR IMPLEMENTATION

If criticality = high, DISPATCHER 1 If criticality = middle, DISPATCHER 2 If criticality = low, DISPATCHER 3 … JPR = (DISPATCHER ID, current time + Period)

JPR Interface

QoS JPR

Page 22: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Outline

●  Networked Control Systems

●  Etherware : A Middleware for Networked Control Systems

●  Real-Time Enhancement of the Etherware

●  A Networked Inverted Pendulum Control System

22

Page 23: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

An Inverted Pendulum Control System

●  Implementation Platform ○  Sun Java Real-Time System 2.0 with Solaris 10

●  System Configuration ○  DSP Program

•  Return encoder values upon request from Controller •  Deliver control command upon receive it from Controller

23

Page 24: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Periodic Control under Stress

●  Periodic Controller Component ○  Period: 15ms ○  Execution priority: High

●  Stressing Component ○  Period: 1s ○  Avg. Execution time: 100ms ○  Execution priority: Low

24

Page 25: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

A Networked Inverted Pendulum Control System

●  Periodic Controller Component ○  Period: 15ms

●  DSPProxy Component ○  Intermediate interaction between Controller and DSP program

●  Request Component ○  Request runtime system reconfiguration ○  Controller upgrade ○  Controller migration

25

Page 26: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Controller Upgrade

26

Page 27: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

Controller Migration

27

Page 28: Architecture and Mechanisms of Etherware for Cyber ...able/acps2011/presentations/8_Kim.pdfArchitecture and Mechanisms of Etherware for Cyber-Physical Systems Kyoung-Dae Kim and P.

28

Thank You !