25
IoT in Nutshell Rui Zhang https://www.linkedin.com/in/ruixzhang

IOT

Embed Size (px)

Citation preview

Page 1: IOT

IoT in Nutshell

Rui Zhang https://www.linkedin.com/in/ruixzhang

Page 2: IOT

Disclaimer

•  “The opinions expressed in this presentation and on the following slides are solely those of the presenter and not representing any company.”

Page 3: IOT

About me•  Background :

o  EE from B.S to Ph.D o  10+ years’ experience on system research and

development o  PhD research: Wireless networking system, machine

learning/information analysis on IoT system, IEEE standard contribution

o  Work experience : Intel CareInnovation, Broadcom

•  IoT experience o  worked on different layers in IoT system: device, OS stack,

networking, backend. o  Delivered large scale IoT product deployed in U.S and E.U o  Advocate and enthusiast of IoT.

Page 4: IOT

Big Picture

Page 5: IOT

Fragmented Market •  Personal

o  Health/fitness o  Energy o  Security o  Smart home o  Wearable

•  Enterprise: o  Lighting o  Smart grid o  Smart City

Page 6: IOT

Vertical: Provide integrated service •  HW:

o  Sensor/monitor/… o  Wireless o  Processor

•  Back end o  Data storage o  process/analysis o  REST API o  Analysis

•  Application o  Web o  App

•  Tailed to specific market. Total solution

Page 7: IOT

Horizontal: Common Platform•  Backend service/application platform

•  HW platform

o  Raspberry Pi o  Anduino

Page 8: IOT

Build Your Own IoT System

Page 9: IOT

Build your own IoT system: Backend

•  Similar as other web back end •  IoT specific scenarios

o  Most application is not high concurrent o  Event driven back end more popular (Node.JS, Python coroutine/Twisted) o  NoSQL/JSON is more popular(log style data) o  Serverless: AWS lamda

•  Customized for general IOT application o  Rule engine(IFFFT) o  Machine learning

•  Web service is not necessary needed o  Rest API still used for extension and potential 3rd party access

Page 10: IOT

Build your own IoT system: Database•  SQL+NoSQL

o  SQL for things, NoSQL for data/stream/log

•  Informix: o  Extended SQL with TIMESERIES o  sophisticated support for managing time series (time-stamped) data

Page 11: IOT

Build your own IoT system: DataBase

•  Informix Usage(http://tinyurl.com/hd6voqu)

Page 12: IOT

Build your own IoT system: Database•  Postgresql + JSON

o  Postgresql 9.2+ o  MongoDB

•  MongoDB is easy to query IoT data o  Ex: suppose we have device data stream o  Each data unit has the format of {time:t, value:v} o  Pymongo

from pymongo import MongoClient from random import randint from datetime import datetime try: client = MongoClient() db = client.test_database collection = db.test_collection sensor_data = db.sensor_data #fake data generation sensor_data.insert(dict(date=datetime.now(), value=randint(1, 100))) # query mongo DB with data between start and end time, and value smaller than certain threhold now = datetime.now() start = now.replace(hour=8, minute=0, second=0, microsecond=0) end = datetime.strptime("14/07/16 16:30", "%d/%m/%y %H:%M") for data_reading in sensor_data.find({"$and": [{'date':{"$gt":start,'$lt':now}},{"value": {"$lt": 50}}]}).sort("value"): print data_reading except pymongo.errors.ConnectionFailure, e: print "Could not connect to MongoDB: %s" % e

Page 13: IOT

Build your own IoT system: Device

•  SOC solution •  Key factors

o  Core Processor o  Connectivity/Wireless o  OS o  Security

•  Vendor o  Reliable o  Support o  Tech Doc/Community o  Channel

Page 14: IOT

Build your own IoT system: Processor

•  ARM processor across all IoT markets o  Processing power: o  OS support o  RTOS requirements o  Footprint/memory o  Development resource

•  MCU

Page 15: IOT

Build your own IoT system: Wireless

•  ISM bands(Free, available world wide) o  2.4G is most widely used ISM band o  Power/penetration/solution available

Page 16: IOT

Build your own IoT system: Wireless•  Wifi

o  AP/station,P2P(One Hop) o  Pros: High Data rate,

easy internet access, most used and flexible

o  Cons: High power/Solution complexity

•  BLE o  Mater/Slave(One hop) o  Pros: Low power,

data rate supporting audio and most IoT application.

o  Cons: need to pair with hub/phone

•  Zigbee o  P2P, star, Mesh(multi hop) o  Pros: Lowest power,

Self Organized mesh network. o  Cons: low data rate(sensor application),

no internet access.

Page 17: IOT

Build your own IoT system: Wireless•  Rule of thumbs:

o  Mesh capability, Self-organized network: Zigbee o  Wearable/Audio/directly connected to smartphone): BT/BLE. o  Internet access (Wifi,LTE),

•  If you need voice capability, LTE •  Otherwise Wifi

•  Interference o  2.4 ISM band contention.

•  BLE:AFH(Adaptive Frequency hopping) •  Zigbee: 4 golden channel. •  Wifi:5G

Page 18: IOT

Build your own IoT system: OS•  Bare bone

o  Simple and widely used. •  No Traditional OS, •  No user/kernel

o  Single thread: •  ISR and event driven •  Msg for Inter-Task

o  Memory management •  No MMU, manual management(write your own malloc).

while(true){HAL_ISR();task_1(task1_event_bitvector);...task_n(taskn_event_bitvector);sleep();}

Page 19: IOT

Build your own IoT system: OS•  RTOS

o  Time Critical system. o  Multi thread support

•  Time guaranteed task •  Priority based schedule

o  Memory management •  Minimum dynamic management/Mainly Static allocation

o  GreenHill, Threadx, Vxworks, FreeRTOS

Page 20: IOT

Build your own IoT system: OS•  *nix like (iOS/Android tailed)

o  Need to support rich feature application, 3rd party applications o  Act as hub to connecting other IOT devices o  Modern OS support

•  User/kernel •  Multi thread •  MMU •  Driver

o  Power requirement is high o  More development resource

Page 21: IOT

IoT system problem

High data error rate in network?

Page 22: IOT

Wireless

Interference Link Loss

Page 23: IOT

Stack/OS

Routing error/timeout

Memory management Bug

Packet Overflow

Page 24: IOT

Application

Event based processing delay/discard

Unbalanced traffic

Page 25: IOT

Conclusion •  IoT markets are fragmented :

o  Diversified application

o No one size fits all solution •  Pick up your Legos for your Legoland!

o  Back End service •  Battle test solution on cloud •  Event driven/serverless •  SQL and NoSQL

o  Device side •  Processor and OS

o  ARM core/MCU o  OS choices:

•  Wireless: wifi, bluetooth and zigbee

•  Solve the real problem, not just connecting devices