BOSS: Building Operating System Services Stephen Dawson-Haggerty.

29
BOSS: Building Operating System Services Stephen Dawson-Haggerty

Transcript of BOSS: Building Operating System Services Stephen Dawson-Haggerty.

Page 1: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

BOSS: Building Operating System Services

Stephen Dawson-Haggerty

Page 2: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

2

motivation

1/11/13

Page 3: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

3

motivation

1/11/13

Page 4: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

4

motivation

1/11/13

Page 5: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

5

outline

• Problem overview– Use networked resources– Enable multiple control applications– Maintain system properties (robustness, discoverability…)

• Architecture components– Hardware abstraction– Directory– Historian– Transaction manager– Control processes

1/11/13

Page 6: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

6

SCADA architecture

direct

supervisory

device

panel

head-end

Does not address reliability when controlling across a networked

1/11/13

Page 7: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

7

existing solutions work around this issue

device

panel

head-endBACNet

OpenADR1. Standardized

communications protocols

2. Completely partitioned implementation

3. “It’s a box”

WattStopper

1/11/13

Page 8: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

8

design goals

• Fault tolerance– Between domains

• Isolation– Between processes, systems

• Scheduling– Of users, changes

• Security and authorization– Manage the principals

• Hardware abstraction– Capture component relationships

– Provide a namespace

• Historical data– Process, query, reduce

multiprogramming

1/11/13

Page 9: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

9

boss: a proposed architecture

HPL HPL

Hardware Abstraction Layer

DirectoryTrans. mgr.HistoryS

ecur

ity

Abs

trac

tion

Isol

atio

n +

Sch

edul

ing

HPL HPL

Control processesH

isto

ryFau

lt to

lera

nce

“Kernel” interface

1/11/13

Page 10: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

10

hardware presentation

Electrical

Weather

Geographical

Water

EnvironmentalStructural

Actuator

Occupancy

sMAP

Phy

sica

l In

form

atio

n

lots of underlying diversity & heterogeneity

1/11/13

Page 11: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

11

considerations and related work

• Pub/Sub– JMS, TIBCO, AMQP, CORBA– TinyDB

• Management– SNMP

• Syndication– RSS/Atom, PubSubHubbub– XMPP, SenseAndrew, SenseWeb

• Embeddability– CoAP/CORE, TinyWebServices

• Industrial protocols– BACnet, OPC, DeviceNet

Protocol Year Network Example Applications

Modbus 1979 RS-485, TCP/IP Panel monitoring, alarms

Fieldbus/HART 1988 various Industrial Control

BACnet 1995 ARCNET, Ethernet, IP, RS-232, etc.

HVAC, Lighting, Fire…

WirelessHART 2007 802.15.4e Industrial control, wire replacement

Zigbee SEP 2.0 2012? 802.15.4 Plug-load monitoring1/11/13

Page 12: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

12

HPL: Represent sensors and actuators

• Objects are time-series and collections• Represent the underlying sense and actuation points• Expose over HTTP• Time-series are durably identified

– A collection of structured key-value pairs, data– Data is (time, value[, seqno]) vector

{ "/" : { "Contents" : ["sensor0"], “Metadata” : { “SourceName” : “Example sMAP Source” }, }, "/sensor0" : { "Contents” :["channel1"] }, "/sensor0/channel0" : { "uuid" : "a7f63910-ddc6-11e0-8ab9-13c4da852bbc", "Readings" : [ [1315890624000, 12.5 ] ] }}

colle

ctio

nstim

eser

ies

1/11/13

Page 13: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

13

meet data acquisition needs

– BMS Integration– Database integration– Commercial building retrofit – Residential deployment and automation– Large wireless network

1/11/13

Name Sensor Type Access Method Channels

ISO Data CAISO, NYISO, PJM, MISO, ERCOT Web scrape 1211

ACme devices Plug-load electric meter Wireless 6lowpan mesh 344

EECS submetering project Dent Instruments PowerScout 18 electric meters Modbus 4644

EECS steam and condensate Cadillac condensate; Central Station steam meter Modbus/TCP 13

UC Berkeley submetering feeds ION 6200, Obvius Aquisuite; PSL pQube, Veris Industries E30

Mosbus/Ethernet, HTTP 4269

Sutardja Dai, Brower Hall BMS Siemens Apogee BMS, Legrand WattStopper, Johnson Control BMS

BACnet/IP 4064

UC Davis submetering feeds Misc., Schneider Electric ION OPC-DA 34 (+)

Weather feeds Vaisala WXT520 rooftop weather station; Wunderground

SDI-12, LabJack/Modbus, web scrape

33

CBE PMP toolkit Dust motes; New York Times BMS CSV import; serial 874

sMA

PsM

AP

sMA

P

6lowpan networks

RS-485 bus

BacNET/IP

OPC-DA

Page 14: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

14

1/11/13

Page 15: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

15

outline

• Problem overview– Extend control loops to cloud– Enable pluggable control applications– Maintain system properties (robustness, discoverability…)

• Architecture components– Hardware abstraction– Directory– Historian– Transaction manager– Control processes

• Timeline

1/11/13

Page 16: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

16

additional layer of complexity not in a computer OS

Nguyen Thi Hoang Lan, http://cnx.org/content/m29708/1.1/

1/11/13

Page 17: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

17

outline

• Problem overview– Extend control loops to cloud– Enable pluggable control applications– Maintain system properties (robustness, discoverability…)

• Architecture components– Hardware abstraction– Directory– Historian– Transaction manager– Control processes

• Timeline

1/11/13

Page 18: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

18

historian

modeling requires a log of sensor data

• Limited real, open systems which do this well– Time series systems: wavelet systems, quick computations– Lookup table-based floating point compression– OpenTSDB = HBase + HDFS– OPC+HDA, OSI Pi, System S, Flume– MRO, Spark streaming– Medusa, Fjord, Telegraph[CQ]– SciDB

• Write pattern– Append data to streams – Occasionally bulk-load

• Read pattern– Range-query on timestamp

• Process pattern– Clean, “join”, compute– SQL is quite clumsy for time-series processing…1/11/13

Page 19: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

19

Larry Ellison’s query

1. Extract data from 100 streams

2. Interpolate onto a 5-minute time basis

3. Filter missing data

4. Combine the streams into a matrix

5. Load into MATLAB/R/numpy

looks like pipes to me

1/11/13

Page 20: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

20

Principles for physical data storage– Data is mostly array-like– Efficient “views” of data: subsampled/cleaned

• Treat as 1st class objects• Use to govern retention and privacy

– Flexible operators for repairing timestamps, unit conversion, time sampling

– Compression/materialization control

Something like append-only RDD’s

sum < paste < window(mean, field="hour") of data

1/11/13

Page 21: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

21

write load on readingdb6

Importing old data: 150k points/sec Continuous write load: 300-500pts/sec

10 billion readings, 40k streams, 3.5bytes/record on disk1/11/13

Page 22: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

22

1/11/13

Page 23: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

23

outline

• Problem overview– Extend control loops to cloud– Enable pluggable control applications– Maintain system properties (robustness, discoverability…)

• Architecture components– Hardware abstraction– Directory– Historian– Transaction manager– Control processes

• Timeline

1/11/13

Page 24: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

24

control transactions

want cloud applications…

with old-fashioned reliability

1/11/13

Page 25: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

25

idea

Use transaction metaphor to update state of the building• Adjust set points• Replace control

logic

1/11/13

Page 26: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

26

writer 1 value: 245cfm 245

writer 2 value: 280cfm 245

1/11/13

Page 27: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

27

writer 1 value: 245cfm priority: 3

writer 2 value: 280cfm priority: 1

245

280

present value: 245cfmpresent value: 280cfm

<time passes>

writer 2 clear

BACnet priorities

prio

rity

arra

y

1

16

writer 1 crashes

1/11/13

Page 28: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

28

future work

• Transaction building blocks– Lease time– Priority level– Abort/rollback notifications

• Define levels of transaction isolation– Actuator: just prevent concurrent writes– System: use pre-defined hierarchal locking– Model-based: learn interaction model

1/11/13

Page 29: BOSS: Building Operating System Services Stephen Dawson-Haggerty.

SDB Pretreat

29

Thank You

1/11/13

1. Hardware presentation layer: sMAP

2. Hardware abstraction layer: device-specific logic

3. Time-series service: the archiver

4. Reliable control inputs: the transaction manager

5. Security: the authorization service

portable, robust applications for the physical environment