1 Hardware architectures Point-to-point networks Many different - - PDF document

1
SMART_READER_LITE
LIVE PREVIEW

1 Hardware architectures Point-to-point networks Many different - - PDF document

Networks in embedded systems Networking for Embedded Systems Why we use networks. Network abstractions. Example networks. initial processing more processing Properties of wireless networks. PE sensor PE PE actuator PEs


slide-1
SLIDE 1

1

1

Networking for Embedded Systems

  • Why we use networks.
  • Network abstractions.
  • Example networks.
  • Properties of wireless networks.

2

Networks in embedded systems

PE PE sensor PE actuator initial processing more processing PEs may be CPUs or ASICs.

3

Why distributed?

  • Higher performance at lower cost.
  • Physically distributed activities---time constants

may not allow transmission to central site.

  • Improved debugging---use one CPU in network to

debug others.

  • Fault tolerance
  • May buy subsystems that have embedded

processors.

4

Network abstractions

  • The Open Systems Interconnection (OSI) model

for networks

  • Provides a standard way to classify network

components and operations.

5

OSI model

physical mechanical, electrical data link reliable data transport network end-to-end service transport connections presentation data format session application dialog control application end-use interface

6

OSI layers

  • Physical: connectors, bit formats, etc.
  • Data link: error detection and control across a

single link (single hop).

  • Network: end-to-end multi-hop data

communication.

  • Transport: provides connections; may optimize

network resources.

– TCP, UDP.

slide-2
SLIDE 2

2

7

Hardware architectures

  • Many different types of networks:

– topology; – scheduling of communication; – routing.

8

Point-to-point networks

  • One source, one or more destinations, no data

switching (serial port):

PE 1 PE 2 PE 3 link 1 link 2

9

Bus networks

  • Common physical connection:

PE 1 PE 2 PE 3 PE 4 header address data ECC packet format

10

Bus arbitration

  • Priority: Same order of resolution every time.
  • Fair: every PE has same access over long periods.

– round-robin: rotate top priority among PEs.

A,B,C A,B,C fixed round-robin

A B C A B C A B C A B C

11

Crossbar

in1 in2 in3 in4

  • ut1
  • ut2
  • ut3
  • ut4

12

Crossbar characteristics

  • Non-blocking.
  • Can handle arbitrary multi-cast combinations.
  • Expensive: Size proportional to n2.
slide-3
SLIDE 3

3

13

Multi-stage networks

  • Use several stages of switching elements.
  • Often blocking.
  • Often smaller than crossbar.

14

Message-based programming

  • Transport layer provides message-based

programming interface:

send_msg(adrs,data1);

  • Data must be broken into packets at source,

reassembled at destination.

  • Data-push programming: receivers respond to new

data.

15

I2C bus

  • Designed for low-cost, medium data rate

applications.

  • Characteristics:

– serial; – multiple-master; – fixed-priority arbitration.

  • Several microcontrollers come with built-in I2C

controllers.

16

I2C physical layer

master 1 master 2 slave 1 slave 2 SCL SDL data line clock line

17

I2C signaling

  • Sender pulls down bus for 0.
  • Sender listens to bus---if it tried to send a 1 and

heard a 0, someone else is simultaneously transmitting.

  • Transmissions occur in 8-bit bytes.

18

I2C data link layer

  • Every device has an address (7 bits in standard, 10

bits in extension).

– Bit 8 of address signals read or write.

  • General call address allows broadcast.
slide-4
SLIDE 4

4

19

I2C bus arbitration

  • Sender listens while sending address.
  • When sender hears a conflict, if its address is

higher, it stops signaling.

  • Low-priority senders relinquish control early

enough in clock cycle to allow bit to be transmitted reliably.

20

I2C transmissions

multi-byte write read from slave write, then read S adrs data data P S adrs 1 data P S adrs data S adrs 1 data P

21

Ethernet

  • Dominant non-telephone LAN.
  • Versions: 10 Mb/s, 100 Mb/s, 1 Gb/s 10 Gb/s.
  • Goal: reliable communication over an unreliable

medium.

22

Ethernet topology

  • Bus-based system, several possible physical layers:

A B C

23

CSMA/CD

  • Carrier sense multiple access with collision

detection:

– sense collisions; – exponentially back off in time; – retransmit.

  • No prioritization
  • Can’t guarantee real-time deadlines. However,

may provide good service at proper load levels.

24

Networking for Embedded Systems

  • Why we use networks.
  • Network abstractions.
  • Example networks.
  • Properties of wireless networks.
slide-5
SLIDE 5

5

25

RF Communication In Real World

  • Notoriously unpredictable

– Variable environment noise – Non-linear signal strength decay – Multi-path effect – Transmission collision

  • Especially in a wireless sensor network

– Low-power low-cost radio – Large-scale high-density deployment – Harsh environment

The following slides are borrowed from Jerry Zhao’s SenSys’03 presentation 26

Environments

  • In-door

– ISI office

  • Habitat

– Topanga state park

  • Unobstructed

– ISI parking lot

27

TinyOS Network Stack (MICA)

~60 MICA Motes

– RFM Radio 433Mhz, – TinyOS 1.0

TinyOS MAC: CSMA Application SECDED RFM Transceiver

28

New Functionalities

TinyOS MAC: CSMA Application SECDED ARQ

ACK ReTx

RFM Transceiver Manchester 4B6B

Rx

29

Setup

  • Packet Delivery Performance on Physical Layer

(Single-hop)

– Node placed on a line with single transmitter – Fine-grain measurement of each metric – Environmental impact

  • Packet Delivery Performance on MAC Layer

(Multi-hop)

– “Realistic” deployment with artificial traffic load – Transmission collision – ARQ recovery

30

Packet Delivery Performance

  • Spatial and temporal characteristics of packet loss
  • Its dependence on environment
  • Its impact on sensor network design
slide-6
SLIDE 6

6

31

Spatial Profile of Packet Delivery

  • Node positions

4B6B Encoding High Tx Power In-door 2hrs (7200 pkts)

“Gray Area” is evident in the communication range

32

Gray Area in Packet Loss

  • Relatively large region of

poor connectivity

– Across a wide variety of environments – Spanning as large as 30% of the effective transmission range In-door Habitat Unobstructed Out-door

33

Reception Rate Changes Over Time

Window size = 40 Pkts 4B6B Encoding High Tx Power In-door 34

Standard Deviation in Packet Loss

Window size = 40 4B6B Encoding High Tx Power Each data point is from 180 samples

Variability over time with large dynamic range

35

Impact on System Design

  • Assume circular RF coverage:

30% in Radius => 51% in Neighborhood!

  • Need to continuously monitor

link quality to filter out unreliable neighbors

36 4B6B Encoding High Tx Power In-door

Cannot use a simple threshold Can We Filter Bad Links From Received Signal Strength Reading?

slide-7
SLIDE 7

7

37

Can We Use Stronger Encoding?

SECDED 1byte=>3byte High Tx Power In Door

Gray area can be masked (not eliminated) but with high overhead

4B6B 1byte=>1.5 bytes 38

Possible Reasons for Gray Area

  • Multi-path effects
  • Environment noise
  • Difference between

individual transceivers

39

Asymmetric Links (MAC Layer)

Metric: Packet loss difference

4B6B Encoding High Tx Power In Door

Common existence of asymmetric links

40

Summary

  • Properties of RF links in real world

– Heavy tail of packet loss distribution – Evident gray area in communication range – High variance over time – Incapability of simple ARQ

  • The methodology and solutions are helpful

for other systematic measurements.

41

Acknowledgements

  • Slides 1-25 are modified from Wayne Wolf’s textbook slides
  • Slides 25-41 are modified from Jerry Zhao’s SenSys’03 slides