35
EECS 150 - Components and Design Techniques for Digital Systems Lec 23 Wireless Networks David Culler Electrical Engineering and Computer Sciences University of California, Berkeley http://www.eecs.berkeley.edu/~culler http://www-inst.eecs.berkeley.edu/~cs150

EECS 150 - Components and Design Techniques for Digital Systems Lec 23 – Wireless Networks

  • Upload
    shania

  • View
    42

  • Download
    0

Embed Size (px)

DESCRIPTION

EECS 150 - Components and Design Techniques for Digital Systems Lec 23 – Wireless Networks. David Culler Electrical Engineering and Computer Sciences University of California, Berkeley http://www.eecs.berkeley.edu/~culler http://www-inst.eecs.berkeley.edu/~cs150. Outline. - PowerPoint PPT Presentation

Citation preview

Page 1: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

EECS 150 - Components and Design

Techniques for Digital Systems

Lec 23 – Wireless Networks

David CullerElectrical Engineering and Computer Sciences

University of California, Berkeley

http://www.eecs.berkeley.edu/~cullerhttp://www-inst.eecs.berkeley.edu/~cs150

Page 2: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

2

Outline

• Abstraction in Networking– Encapsulation and layering

• Physical Layer– Modulation

– Coding

– Quality metrics

• Announcements

• Media Access Control Layer– CSMA

– Collision, Hidden Terminals

• Network Interface

Page 3: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

3

IEEE 802.15.4

• Wireless Medium Access Control (MAC) and Physical Layer (PHY) specification for low-rate Wireless Personal Area Networks (LR-PANS)

– “Wireless personal area networks (WPANS) are used to convey information over relatively short distances [10m]. Unlike wireless local area networks (WLANS), connected effected via WPANs involve little or no infrastructure. This feature allows small, power-efficient, inexpensive solutions to be implemented for a wide range of devices.”

• 5.1 Components of the IEEE 802.15.4 WPAN– “A well-defined coverage area does nto exist for wireless

media because propagation characteristics are dynamic and uncertain. Small changes in distance or direction may result in drastic changes in the signal strength or quality of the communications link. These effects occur whether the device is stationary or mobile.”

Page 4: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

4

Basic Tools of Abstraction

• Composition: Build larger systems from smaller ones

• Generalization: Tackle sub-problem and use the solution in a variety of ways

• Software– functions, subroutines, objects, information hiding,

encapsulation

• Hardware– Digital abstraction, synchronous design methodology– Modules– Busses

• Networks– Encapsulation– Protocols– Layering

Page 5: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

5

Encapsulation

payload

destinationaddress

source

address

Page 6: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

6

Encapsulation: sequence of bits

data

header trailer

header trailer

data

Page 7: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

7

Layers

data

Application:send @sdata dest

Application:rcv @rdata [src]

logical communication

actual

System:

dataheader trailer

actual

System:

actual

Hardware:

actual

header trailer

Hardware

actual

Analog Transmitter

actual

Analog Receiver

time

Page 8: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

8

More officially speaking

• Internet four layers below application– Physical, MAC, Network (IP), Transport,

Application

Presentation

Session

Transport

Network

Data Link

Physical

Computer A

Application

Presentation

Session

Transport

Network

Data Link

Physical

Computer B

ISO/OSI Standard 7 Layer Model

Real Connection

Virtual Connections

2.4Ghz

Game

MAC (FPGA)

Phy (CC2420)

CaLinx2 Board B

Checkpoint4 Simplified Model

Virtual ConnectionsGame

MAC (FPGA)

Phy (CC2420)

SPI/RegSPI/Reg

Radio SignalsRadio Signals

CaLinx2 Board A

Page 9: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

9

IEEE 802.15.4 Architecture

• “An LR-WPAN device comprises a PHY, which contains a radio frequency (RF) transceiver along with its low-level control mechanism, and a MAC sublayer that provide access to the physical channel for all types of transfer.”

Page 10: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

10

Physical Layer

• “The features of the PHY are – activation and deactivation of the radio transceiver,

– energy detection (ED),

– link quality indication (LQI),

– channel selection,

– clear channel assessment (CCA), and

– transmitting as well as receiving packets across the physical medium.”

• Bands– 868-868.6 MHz Europe

– 902-928 MHz North America

– 2400-2483.5 MHz Worldwide

Page 11: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

11

Modulating and Demodulating the Channel

• Transmitter emits a series of timed pulses (waveform)

• Receiver samples this waveform (after finding particular edges) to recover the digital information stream

• Examples:– on-off-keying (OOK)

» 0 => no output, » 1 => output at particular carrier frequency

– Amplitude shift keying (ASK)» 0 => low amplitude» 1 => high amplitude

– Frequency Shift Keying (FSK)» 0 => freq A» 1 => freq B

0 1 1 0 0 1 0

Page 12: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

12

Coding• Typically each bit is transmitted as a

series of chips– Symbol (k bits) => n chips => waveform– Ensure that there are clear edges, not too far

apart so that receiver can stay synchronized with transmitter

– Differentiate valid symbol from noise

• Examples– NonReturn to zero (NRZ)

» 0 => 0, 1 => V, DC = V/2, string of zeros or ones

– Manchester Encoding (MPE) » 0 => 01, 1 => 10» used in ethernet (802.3)

– 4B/5B» Each 4-bit nibble encoded as one of 32

5-bit values» at least one 0 and one 1 in each valid

symbol

Page 13: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

13

802.15.14 Channels and Modulation

• 16 channels in the 2450 MHz band separated by 5 MHz

• O-QPSK : 16-ary orthogonal offset quadrature phase-shift keying

– 4 bits => 32 chips

– Spreads information over a wide spectrum

Page 14: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

14

Framing

• The lowest-level envelop breaks the data stream into a sequence of “frames”

– Each starts with a preamble to allow the receiver to lock on to the signal

» may lock on in the middle

– Start of frame delimiter to synch before actual packet (data unit)

• 802.15.4 in units of octets

Page 15: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

15

What the PHY does

• Code, transmit, receive, decode frames

• activation and deactivation of the radio transceiver

• energy detection (ED) within current channel

• link quality indication (LQI) for received packets

• channel selection

• clear channel assessment (CCA) for CSMA-CA

Page 16: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

16

Announcements

• No homework this week

• Reading: 802.15.4 spec and cc2420 data sheet– Relevant parts

• In the project final stretch– Use your time well

– Serious cheating issue on CP 3

• EECS in the news: wireless sensor networks

Page 17: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

17

TinyOS/Mote - Open Platform

Small microcontroller

- 8 kb code,

- 512 B data

Simple, low-power radio

- 10 kb

EEPROM (32 KB)

Simple sensors

WeC 99“Smart Rock”

Mica 1/02

NEST open exp. platform

128 KB code, 4 KB data

50 KB radio

512 KB Flash

comm accelerators

- DARPA NEST

Dot 9/01

Demonstrate scale

- Intel

Rene 11/00

Designed for experimentation

-sensor boards

-power boards

DARPA SENSIT, Expeditions

TinyOS www.tinyos.net

Networking

Services

Crossbow

Page 18: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

18

WSN Node Architecture

• Efficient wireless protocol primitives

• Flexible sensor interface

• Ultra-low power standby

• Very Fast wakeup

• Watchdog and Monitoring

• Data SRAM is critical limiting resource

proc

DataSRAM pgm

EPROM

timersSensor Interface digital sensors

analog sensorsADC

Wireless NetInterface

Wired NetInterface

RFtransceiver

antenna

serial linkUSB,EN,…

Low-powerStandby & Wakeup

Flash Storage

pgm images

data logs

WD

Page 19: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

19

Berkeley/SFBerkeley/SF

Example: Redwood Microclimates

• 70% of H2O cycle is through trees, not ground• Can only observe top surface of the forest• Need to understand processes within the trees

– Partially closed loop ecosystems

with Todd Dawson, UCB/IBaccenture

intel

nytimes

EPFL CSN

Page 20: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

20

Wireless Micro-weather ‘Mote’

• Incident Light Sensors– TAOS total solar– Hamamatsu PAR

• Mica2 “dot” mote• Power board• Power supply

– SAFT LiS02 battery, ~1 Ah @ 2.8V

• Weatherproof Packaging– HDPE tube with coated sensor

boards on both ends of the tube– O-ring seal for two water flows– Additional PVC skirt to provide

extra shade and protection against the rain

• Radiant Light Sensors– PAR and Total Solar

• Environmental Sensors– Sensirion humidity + temp– Intersema Pressure + temp

battery

mote

Deep Collaboration with Intel

Page 21: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

21

Deployment and the Scientific Process

Page 22: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

22

Macroscope

• See movies at http://www.cs.berkeley.edu/~get/sonoma

Page 23: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

23

TinyOS-driven architecture

• 3K RAM = 1.5 mm2

• CPU Core = 1mm2

– multithreaded

• RF COMM stack = .5mm2

– HW assists for SW stack

• Page mapping • SmartDust RADIO = .25 mm2

• SmartDust ADC 1/64 mm2

• I/O PADS

• Expected sleep: 1 uW – 400+ years on AA

• 150 uW per MHz• Radio:

– .5mm2, -90dBm receive sensitivity– 1 mW power at 100Kbps

• ADC: – 20 pJ/sample – 10 Ksamps/second = .2 uW.

jhill mar 6, 2003

Page 24: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

24

MAC sublayer

• “The features of the MAC sublayer are beacon management, channel access, GTS management, frame validation, acknowledged frame delivery, association and dissociation.” Also security

• Only a portion of the media access layer is performed in hardware

• Four kinds of frames: data, ack, mac cmd, beacon

Page 25: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

25

MAC Data unit

Page 26: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

26

Media Access

• Many devices share the communication medium• Can’t “just transmit”• Need a “protocol” for acquiring access to the

channel– But don’t have a channel to arbitrate with, like a bus

Page 27: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

27

CSMA

• Carrier Sense Media Access – Collision Avoidance (CSMA-CA)

• Listen for a period of time to hear if the channel is free (CCA)

• If hear traffic, back off for random period of time– Typically exponentially increasing backoff

– Try again

– May also due random delay before first CCA

• If channel is clear, transmit

• Ethernet does CSMA-CD (collision detect)

Page 28: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

28

Reliability

• Radio signal strength fades with distance– Also attenuation, obstructions, multipath

• Signal-to-noise ratio determines bit error rate– Channel codes are “far apart” so it is possible to detect and

often correct bit errors– If SNR is above a certain threshold, a defined fraction of the

packets are expected to be received correctly

• An additional frame check detects corrupted packets

– Typically 32-bit cyclic redundancy check

• To obtain higher reliability– Acknowledge receipt– Sender times out and retransmits on failure

• 15.4 hardware generates acks on request– Determined by SW MAC

Page 29: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

29

Hidden Terminals

• Two nodes transmitting to same node may not hear each other and collide

• Additional protocol to detect and avoid such hidden terminals

• RTS – CTS – DATA – ACK

• Software involved in the RTS-CTS-DATA protocol

rtscts

data

ack

Page 30: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

30

Network interface

• Typically, the low level processing of the radio is hidden behind a network interface

• Busses connecting to the device

• Write / read packets, write commands, read status, receive interrupts

Proc

Memory

network

interface

software

device driver

Link / MAC

network

transport

application

Page 31: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

31

CS150 Network Layering

• Interface to CC2420 is serial peripheral interconnect (SPI)

– Chip-to-chip interconnect with its own protocol– Usually have CC2410 connected to microcontroller with SPI interface– Transfer commands & data to the CC2420, handle responses

• Small set of appln packets, pt-pt, others might be sharing the channel

Application

Presentation

Session

Transport

Network

Data Link

Physical

Computer A

Application

Presentation

Session

Transport

Network

Data Link

Physical

Computer B

ISO/OSI Standard 7 Layer Model

Real Connection

Virtual Connections

2.4Ghz

Game

MAC (FPGA)

Phy (CC2420)

CaLinx2 Board B

Checkpoint4 Simplified Model

Virtual ConnectionsGame

MAC (FPGA)

Phy (CC2420)

SPI/RegSPI/Reg

Radio SignalsRadio Signals

CaLinx2 Board A

Page 32: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

32

Network Layering

• Physical– CC2420 RF Chip

– Handles all the RF details

» Modulation/Demodulation

» Noise Rejection/Filtering

» This is an incredible amount of work

• SPI\Reg– Standard bit serial interface

– Control register read/write

Page 33: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

33

CC2420 (2)

Page 34: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

34

CC2420

• Transmit– Controller waits for CCA

– Write bytes into an on-chip FIFO

– Enable transmit

– DAC -> I/Q Merge -> Power Amp

• Receive– I/Q Split -> ADC -> Digital Processing

– Results in bytes in an on-chip FIFO

– Chip includes optional address filtering

– Get notification of packet arrival

– Controller reads bytes from on-chip fifo

Page 35: EECS 150 - Components and Design Techniques for Digital Systems  Lec 23  –  Wireless Networks

1/28/2004 EECS 150, Fa04, Lec 23 Wireless

35

Building networks from wireless links

• 802.15.4 incorporates several higher level concepts into link

• Coordinator device can beacon to define sequence of frames– Other device communicate in frame slots (slotted CSMA)

– Think game controllers …

• Peer-to-peer networks – Any node can communicate with any node “in range”

– Higher level software can discover network topology and route packets

» Hop-by-hop retransmission

• Many multihop traffic patterns– Collection, aggregation, dissemination