09 Sistemi Embedded

download 09 Sistemi Embedded

of 32

Transcript of 09 Sistemi Embedded

  • 8/12/2019 09 Sistemi Embedded

    1/32

    Giuseppe [email protected]

    Pervasive Computing & Networking Lab. (PerLab)

    Dept. of Information Engineering, University of Pisa

    PerLab

    Embedded Systems

    A: A P, M D F

    PerLab

    Objectives

    I

    D

    A E S

    E S

    PerLab

    Overview

    B C

    M R

    E S

    E S

  • 8/12/2019 09 Sistemi Embedded

    2/32

    PerLab

    Definizione

    S ,

    , ,

    I PC P .

    I (, CD, , ).

    PerLab

    Aree di applicazione

    A

    C

    S

    R

    I

    U :D

    D

    M

    T

    PerLab

    Solo alcuni esempi

  • 8/12/2019 09 Sistemi Embedded

    3/32

    PerLab

    Caratteristiche

    S C

    I I

    S

    P R

    P O

    PerLab

    Specializzazione

    U ( )L ,

    F

    .

    PerLab

    Hardware dedicato

    I N , ,

    .

    I A

  • 8/12/2019 09 Sistemi Embedded

    4/32

    PerLab

    Applicazioni Real Time

    U

    S H . S I H

    PerLab

    Sistemi Embedded Distribuiti

    C

    V: L

    S

    R

    S N

    A

    PerLab

    Overview

    B C

    E S

    E S

  • 8/12/2019 09 Sistemi Embedded

    5/32

    PerLab

    Principali requisiti

    R

    R

    R

    C

    P

    C

    S !

    PerLab

    Requisiti funzionali

    C D

    (, , )

    D (, , )

    D

    PerLab

    Requisiti temporali

    I

    R

    L L

    I

  • 8/12/2019 09 Sistemi Embedded

    6/32

    PerLab

    Requisiti di affidabilit

    AI (

    ) S (S)

    G

    C ( , )

    R ()

    DD = MTTF / (MTTF + MTTR)

    PerLab

    Consumo

    I I

    , ,

    E

    I M ( )

    M ( )

    I (. )

    PerLab

    Prestazioni

    M

    L

  • 8/12/2019 09 Sistemi Embedded

    7/32

    PerLab

    Costo

    P .

    ,S (, , )

    H ( CPU, , I/O)

    S ( )

    L HW SW (, , , )

    N

    PerLab

    Overview

    B C

    M R

    ()

    E S

    PerLab

    Features of Real-Time Kernels

    M

    R

    R R

    F PC

  • 8/12/2019 09 Sistemi Embedded

    8/32

    PerLab

    Virtual Memory and Address Translation

    PerLab

    Virtual Memory in Real-Time Systems

    A :

    (1) R

    (2) R

    (3) I

    PerLab

    Address Translation

  • 8/12/2019 09 Sistemi Embedded

    9/32

    PerLab

    Implementing Real-Time Systems

    I , :

    (1) P,

    (2) P

    (3) L

    PerLab

    Minimizing Latency

    .

    PerLab

    Interrupt Latency

    P CPU

  • 8/12/2019 09 Sistemi Embedded

    10/32

    PerLab

    Dispatch Latency

    A

    PerLab

    Real-Time CPU Scheduling

    P CPU ()

    PerLab

    Real-Time CPU Scheduling

    P1: p=50 ms, t=20 ms t/p=0.4

    P2: p=100 ms t=35 ms t/p=0.35

    Scheduling of tasks when P2 has a higher priority

    than P1

  • 8/12/2019 09 Sistemi Embedded

    11/32

    PerLab

    Rate Monotonic Scheduling

    A

    S = ; L =

    P1 P2.

    PerLab

    Missed Deadlines with Rate Monotonic Scheduling

    P1: p=50 ms, t=25 ms t/p=0.50

    P2: p=80 ms t=35 ms t/p=0.44

    Rate Monotonic Scheduling

    Maximum utilization: 2(21/n-1) n=2: 0.83

    PerLab

    Earliest Deadline First Scheduling

    P : , ;

    ,

    P1: =50 , =25 /=0.50P2: =80 =35 /=0.44

  • 8/12/2019 09 Sistemi Embedded

    12/32

    PerLab

    Proportional Share Scheduling

    A

    T

    PerLab

    Overview

    B C

    M R

    E S

    PerLab

    Distributed Embedded System

    S

    D

    C WA, ,

    WE , ,

    W S N (N E S)

  • 8/12/2019 09 Sistemi Embedded

    13/32

    PerLab

    A

    D ()

    Wireless Sensor Networks

    PerLab

    Wireless Sensor Networks

    PerLab

    Wireless Sensor Networks

    M C N

  • 8/12/2019 09 Sistemi Embedded

    14/32

    PerLab

    Sensor Node Architecture

    Battery powered devices

    Batteries cannot be changed nor recharged

    Often negligible

    power consumption

    Local data processing

    and data storage

    Short range wireless communication

    Radio is the most power hungrycomponent

    PerLab

    Sensors

    S

    S

    (, , )

    PerLab

    Potential Application Areas

    M A

    E M

    P A

    H M I H

    I

    I

  • 8/12/2019 09 Sistemi Embedded

    15/32

    PerLab

    Military Applications

    M ,

    ,

    B

    R

    T

    B

    A , ,

    PerLab

    Environmental Monitoring

    A

    F

    DB

    PerLab

    Environmental Monitoring

    T ,

    H M

    G D I P

    ,

  • 8/12/2019 09 Sistemi Embedded

    16/32

    PerLab

    Environmental Monitoring

    M

    B

    16

    PerLab

    Precision Agriculture

    T

    H

    W S D

    S

    PerLab

    R

    H

    ( )

    Health Applications

  • 8/12/2019 09 Sistemi Embedded

    17/32

    PerLab

    Home Applications

    S H

    ( )

    E

    E E

    PerLab

    Commercial Applications

    I C

    V

    PerLab

    Industrial Applications

    D I S S

    F

    P C

    R D /

    R

    R

  • 8/12/2019 09 Sistemi Embedded

    18/32

    PerLab

    Industrial Applications

    Low, K.S. Win, W.N.N. Er, M.J., Wireless Sensor Networks for Industrial Environments,Intl Conference on Computational Intelligence for Modelling, Control and Automation, 2005.

    PerLab

    Current snapshot

    I

    P

    WSNs cannot be regarded any more

    as an interesting research topic only

    PerLab

    Future perspectives

    ON W I., W S N G M, A D, J2005 ://..//2.

    P127 2010

  • 8/12/2019 09 Sistemi Embedded

    19/32

  • 8/12/2019 09 Sistemi Embedded

    20/32

    PerLab

    Telos Mote

    PerLab

    The TinyOS operating system

    S

    ,

    TOS

    (FIFO, )

    ( )

    H

    PerLab

    TinyOS computation model

    C

    ( )

    ( )

    C

    ,

    ()

    , Time

  • 8/12/2019 09 Sistemi Embedded

    21/32

    PerLab

    TinyOS development environment

    C C

    C OS

    ( )

    TOS ( )

    TOSSIM

    (T), (TV)

    PerLab

    TinyViz

    PerLab

    Microserver-class Node: Stargate

    E I

    C : PA255 (32, 2.3 J/, 200 MH,1.5V),

    C: B, 802.11 PC CF, M2 M

    S: C , L 2.4

  • 8/12/2019 09 Sistemi Embedded

    22/32

    PerLab

    Applications of Stargate-class nodes

    S

    P

    M

    N

    H

    [NIMS, UCLA]

    [Robotics, CMU]

    [NESL, UCLA]

    [CENS, UCLA] [Intel + UCLA]

    PerLab

    Networking Issues

    PerLab

    Features and Challenges

    A

    E T

    S

    T

    ES ,

    ,

    P

  • 8/12/2019 09 Sistemi Embedded

    23/32

    PerLab

    Features and Challenges

    D

    ( , , )

    Q S (QS),

    S

    D

    ( )

    PerLab

    IEEE 802.15.4/ZigBee standard

    S P A N (PAN)

    PH MAC

    M

    PAN

    PerLab

    IEEE 802.15.4 and ZigBee

    IEEE 802.15.4 L, L, L P A N (PAN)

    PH MAC

    B S U L

  • 8/12/2019 09 Sistemi Embedded

    24/32

    PerLab

    IEEE 802.15.4 components

    F F D (FFD)

    PAN

    R F D(RFD)

    (PAN)

    FFD

    PerLab

    IEEE 802.15.4/ZigBee Network Topologies

    PerLab

    IEEE 802.15.4: MAC protocol

    D

  • 8/12/2019 09 Sistemi Embedded

    25/32

    PerLab

    IEEE 802.15.4: beacon enabled mode

    PerLab

    05/05/2010 74

    At each trial the maximum

    backoff-window size is

    doubled

    Only a limited number ofattempts is permitted

    (macMaxCSMABackoffs)

    CSMA/CA: Beacon-enabled mode

    Transmission

    No

    Wait for a random

    backoff time

    Check channel status(CCA)

    Idle?

    Check channel status

    (CCA)

    Idle?No

    Yes

    Yes

    PerLab

    Acknowledgement Mechanism

    O

    D SACK

    S R ACK ()

    A

    O (macMaxFrameRetries)

  • 8/12/2019 09 Sistemi Embedded

    26/32

    PerLab

    Single-hop Scenario

    250 KB R

    100 M S

    % (/)

    050%M L R

    1 50S

    PT G

    C ON

    1M B

    15R

    30CS

    10D C N

    2.4 GHPH

    PerLab

    802.15.4 MAC Unreliability Problem

    0 5 10 15 20 25 30 35 40 45 500

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100Delivery ratio

    Poisson, Ack OFF,Power Man. OFF

    Poisson, Ack OFF,Power Man. ON

    Periodic, Ack OFF,Power Man. ON

    Poisson, Ack ON,Power Man. OFF

    Poisson, Ack ON,Power Man. ON

    Periodic, Ack ON,Power Man. ON

    Number of nodes

    Deliveryratio(%)

    PoissonTraffic,PowerManON

    Periodic Traffic,

    PowerManON

    Poisson Traffic,PowerManOFF

    G. Anastasi, M. Conti, M. Di Francesco, The MAC Unreliability Problem in IEEE 802.15.4 Sensor Networks,

    ACM Conf. on Modeling, Analysis and Simulation of Wireless & Mobile Systems (MSWIM 2009), Oct. 2009.

    PerLab

    802.15.4 MAC Unreliability Problem

    0 5 10 15 20 25 30 35 40 45 50

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100Delivery ratio vs Packet Error Rate

    P.E.R. 0%

    P.E.R. 10%

    P.E.R. 20%

    P.E.R. 30%

    P.E.R. 50%

    Number of nodes

    Deliveryratio(%)

  • 8/12/2019 09 Sistemi Embedded

    27/32

    PerLab

    Key Question

    W 802.15.4 MACU P A?

    PerLab

    Causes and possible solutions

    T MAC CSMA/CA

    I MAC

    T WSN

    PerLab

    CSMA/CA Parameter Values

    Minimum Backoff

    Window Exp.

    07

    D: 3

    03

    D: 3macMinBE

    Maximum Backoff

    Window Exp.

    38

    D: 5

    5

    ()macMaxBE

    Max number ofbackoff stages

    05

    D: 4

    05

    D: 4macMaxCSMABackoff

    Max number of re-

    transmissions

    07

    D: 3

    3

    (aMaxFrameRetries)macMaxFrameRetries

    Notes2006 release2003 releaseParameter

  • 8/12/2019 09 Sistemi Embedded

    28/32

    PerLab

    Possible Solutions

    ( ) S

    ( ) S

    ( ): S

    macMinBE macMaxBE macMaxCSMABackoff macMaxFrameRetries

    DPS 3 5 4 3

    SPS 7 8 5 7

    NPS 8 10 10 10

    PerLab

    Performance

    0 5 10 15 20 25 30 35 40 45 500

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100

    N

    D(%)

    D

    DPS 1 /CP

    SPS 1 /CP

    NPS 1 /CP

    DPS 10 /CP

    SPS 10 /CP

    NPS 10 /CP

    0 5 10 15 2 0 2 5 30 35 40 4 5 5 00

    0.05

    0.1

    0.15

    0.2

    0.25

    N

    M()

    M L

    DPS 1/CP

    SPS 1/CP

    NPS 1/CP

    DPS 10/CP

    SPS 10/CP

    NPS 10/CP

    0 5 10 15 2 0 2 5 30 35 40 4 5 5 00

    0.002

    0.004

    0.006

    0.008

    0.01

    0.012

    0.014

    0.016

    N

    P

    (J/)

    E

    DPS 1/CP

    SPS 1/CP

    NPS 1/CP

    DPS 10/CP

    SPS 10/CP

    NPS 10/CP

    PerLab

    A Final Question

    A S R R?

  • 8/12/2019 09 Sistemi Embedded

    29/32

    PerLab

    Experimental Testbed

    PerLab

    Sensor Nodes

    T STOS O S

    IEEE 802.15.4 PH

    IEEE TKN15.4 MAC (TUB)

    P M E

    P R A

    PerLab

    Simulation vs. Experiments (Default values)

    RTx Enabled

    RTx Disabled

  • 8/12/2019 09 Sistemi Embedded

    30/32

    PerLab

    Effects of clock misalignment

    PerLab

    Simulation vs. Experiments (SPS and NPS)

    PerLab

    The lesson learned

    S IEEE 802.15.4 MAC

    T

    A

    W MAC

  • 8/12/2019 09 Sistemi Embedded

    31/32

    PerLab

    Routing Protocols

    PerLab

    Taxonomy of routing schemes

    F N

    N

    Q ( )

    F, , SPIN, D D,

    H C/T

    S

    LEACH, M,

    L N

    A/R R

    GAF, SPAN,

    PerLab

    Flooding

    E

    I

    H E

    U WSN

  • 8/12/2019 09 Sistemi Embedded

    32/32

    PerLab

    LEACH

    L E A CH

    TDMA

    W. R. Heinzelman, A. Chandrakasan, and H. Balakrishnan,

    Energy-Efficient Communication Protocol for Wireless

    MicrosensorNetworks , Proc. Hawaii International Conference

    on System Sciences, January, 2000.

    PerLab

    MintRoute

    T (TOS)

    F

    A. Woo, T. Tong, and D. Culler, Taming the underlying challenges of reliable multhop routing insensor networks, Proc. ACM SenSys 03, pp: 14-27, Los Angeles, CA, November 2003

    PerLab

    Questions?