IoT Cheatsheet

Power Management

power-model-of-operation
  • Tactive=Twakeup+TworkT_{active} = T_{wakeup} + T_{work}

  • δ=factive=TactiveTcycle\delta = f_{active} = \frac{T_{active}}{T_{cycle}}

  • Tsleep=TcycleTactiveT_{sleep} = T_{cycle} - T_{active}

  • PAVG=fsleepPsleep+fwakeupPwakeup+fworkPworkP_{AVG} = f_{sleep} \cdot P_{sleep} + f_{wakeup} \cdot P_{wakeup} + f_{work} \cdot P_{work}

  • LIFETIME=ENERGYSTOREPAVGPGENLIFETIME = \frac{ENERGYSTORE}{P_{AVG} - P_{GEN}}

  • ETX/RX=PTX(Twakeup+Ttx)+[PoTtx]E_{TX/RX} = P_{TX} \cdot ( T_{wakeup} + T_{tx} ) + [ P_oT_{tx} ]

    We have the optional component only if we're transmitting, since PoP_o is the output power of the transmitter.

If we want to find the energy required to transmit a packet of LL bits and if we define TLT_L the time needed to transmit a single packet:

  • Ec=ETX=ERX=PTX/RX(Twakeup+TTX/RX)E_c = E_{TX} = E_{RX} = P_{TX/RX} (T_{wakeup} + T_{TX/RX})

    EcE_c is the energy required to operate the TX/RX circuitry.

  • Eo=PoTLE_o = P_oT_L

  • Ewakeup=PTXTwakeupE_{wakeup} = P_{TX}T_{wakeup}

  • ETX=PTXTLE_{TX} = P_{TX}T_L

  • EperBIT=PTXTLE_{per \hspace{0.2em} BIT} = P_{TX}T_L

Packet Error Rate (PERPER):

PER=1(1BER)lPER = 1 - (1 - BER)^l

Where 1BER1 - BER is the probability to transmit correctly one bit.

COAP/MQTT

TT: Delivery time, it depends on transmission time (L/RL/R) and on propagation time (d/vd/v):

T=L/R+d/vT = L/R + d/v

Where:

  • LL: packet size [bits]

  • RR: throughput [bits/sec]

  • dd: distance between nodes [m]

  • vv: propagation speed [m/sec]

ZigBee

A(d)={1+Dm+Rm if d=Lm11+Dm+RmA(d+1) if 0d<Lm1A(d)= \begin{cases}1+D_{\mathrm{m}}+R_{\mathrm{m}} & \text { if } d=L_{\mathrm{m}}-1 \\ 1+D_{\mathrm{m}}+R_{\mathrm{m}} A(d+1) & \text { if } 0 \leqslant d<L_{\mathrm{m}}-1\end{cases}

Where:

  • LmL_{m} : maximum depth of the tree.

  • RmR_{m} : maximum number of child routers;

  • DmD_{m} : maximum number of child end-devices;

From the formula we can see that we start counting addresses starting from the second-last level of tree. For example, given Lm=3L_m = 3:

A(2)=1+Dm+RmA(1)=1+Dm+RmA(2)A(0)=1+Dm+RmA(1)A(2) = 1 + D_m + R_m \\ A(1) = 1 + D_m + R_m \cdot A(2) \\ A(0) = 1 + D_m + R_m \cdot A(1)

Notice that A(0)A(0) device are the child nodes of the PAN coordinator.

MAC Layer Access (Beacon Enabled Mode)

  1. Collision Access Part (CAP): random access through CSMA/CA;

  2. Collision Free Part (CFP): access guaranteed via two groups of time slots, called GTS(Guaranteed Time Slots), one for uplink transmission and one for downink transmission.

During the inactive part nodes are sleeping.

Beacon Interval

CSMA/CA

The procedure

  • NB: number of consecutive times a device backoffs, which means that the device tried to access the channel but it was busy (initialized to zero before every transmission attempt);

  • CW: Contention window length, tells how long carrier sensing should be performed. It defines the number of consecutive backoff periods that need to be sensed before some devices access the channel. Note that it is initialized to 2 (so the device will need to wait for 2 CWCW Consecutive time-slots, also called backoff periods) and only taken into account by Slotted CSMA/CA.

  • BE: backoff exponent, how long to wait between each failed channel access attempt.

Procedure in case a node wants to transmit:

  1. NB=0NB=0, CW=2CW=2, the node that wants to transmit before starting the transmission waits a random number of backoff periods between [0,2BE1][0, 2^{BE}-1].

  2. After the initial random delay the device performs carrier sensing: if the channel is free for CWCW consecutive backoff periods, node transmits and waits for an ACK.

  3. If the channel is not free, both BEBE and NBNB are incremented and the procedure is repeated.

  4. If the number of attempts is greater than NBmaxNB_{max} the packet is discarded.

Formulas

  1. Probability of accessing the channel under CSMA/CA

    • pbusyp_{busy}: probability of finding the channel busy at each backoff period;

    • Pidle=(1pbusy)2P_{idle} = (1 - p_{busy})^2: probability that the channel is idle two times in a row, given that CWCW is initialized to 2.

      Since if the channel is sensed free for CWCW (which is initialized to 2) consecutive backoff periods the station accesses the channel, PsuccP_{succ} is also the probability of accessing successfully the channel within the first try.

    • Psucc(i)P_{succ}(i): The probability that the backoff procedure ends within the ithi-th attempt:

      Psucc(i)=j=1iPidle(1Pidle)j1P_{succ}(i) = \sum_{j = 1}^{i} P_{idle}(1 - P_{idle})^{j - 1}

      Note that CWCW remains the same after each failed attempt, while BEBE and NBNB gets increased.

  2. Average time after which a sensor access the channel (given \infty possible backoff attempts)

    E[T]=2Pidle+i=2(1Pidle)i1Pidle[2+(i1)1.5+k=2i2k12]E[T]=2 P_{i d l e}+\sum_{i=2}^{\infty}\left(1-P_{i d l e}\right)^{i-1} P_{i d l e}\left[2+(i-1) 1.5+\sum_{k=2}^{i} \frac{2^{k}-1}{2}\right]
  3. Transmission Time: Ttx=LRT_{tx}=\frac{L}{R} (LL packet length[bit], RR throughput [bit/s])[\mathrm{bit} / \mathrm{s}])

  4. number of slots needed by a generic mote ii:

    ni=RmoteRminn_i = \frac{R_{mote}}{R_{min}}

    As a consequence the total number of slots needed in a BI is the sum of all the slots needed by individual motes in the network.

  5. Slot Size: Ts=LRT_{s}=\frac{L}{R} \quad (L packet length, RR nominal data rate)

  6. Beacon Interval: BI=LrminB I=\frac{L}{r_{\min }} (rminr_{\min } = minimum rate among all motes of the PAN)

  7. Energy Consumption

    Usually motes generates packets according to a Poisson process with a rate of λ\lambda [packets/s]. To find out the energy consumed by a specific mote we need to find out if the mote is idle or if it's transmitting. Let's define with PP the probability that a generic mote has kk packet ready:

    P(N(BI)=k)=(λBI)kk!eλBIP(N(BI) = k) = \frac{(\lambda \cdot BI)^k}{k!} e^{- \lambda \cdot BI}

    Where N(BI)N(BI) is the number of packets generated by that mote in that specific beacon interval.

6LowPan

  1. ETX: Average number of transmission attempt to successfully transmit a packet.

    ETX=1(1p)(1q)ETX=\frac{1}{(1-p)(1-q)}
    • pp: packet error probability from A to B

    • qq: packet error probability from B to A

    Moreover ETX=11BERETX = \frac{1}{1-BER}. This means that both ETXETX and ETTETT are directly proportional to the BERBER.

    ETT: average time required to send a packet over a link.

    ETT=ETXRTTETT = ETX \cdot RTT

RFID

Single Frame Aloha

  • E[S]=n(11r)n1E[S]=n\left(1-\frac{1}{r}\right)^{n-1}, maximum for r=nr=n

  • η=E[S]r\eta = \frac{E[S]}{r}

Dynamic Frame Aloha

  1. Average Arbitration Period Duration

    The average backlog resolution process duration can be calculated recursively as:

    Ln=r+i=0N1P(S=i)LNiL_{n}=r+\sum_{i=0}^{N-1} P(S=i) L_{N-i}

    Where rr is the size in slots of the frame from which we want to find LNL_N.

  2. Tag Arbitration Efficiency

    η=NLN\eta=\frac{N}{L_{N}}

    Where:

    • N\mathrm{N}: tag population size

    • LN\mathrm{L}_{\mathrm{N}}: length of the arbitration period (i.e. the number of slots needed for all the tags to transmit without conflicts).

  3. Schoute's Estimate

    nest=round(Hc)n_{e s t}=\operatorname{round}(H \cdot c)

    Where:

    • H=(1e1)12e1=2.39H=\frac{\left(1-e^{-1}\right)}{1-2 e^{-1}}=2.39: average number of tag colliding in the same slot;

    • cc: number of collided slots in a single frame.

    Under the assumption that the number of tags attempting to transmit in a slot is approximated as a Poisson distribution λ\lambda of 1 [terminal/slot].

Note

If we consider λ1\lambda \neq 1 [terminal/slot] then the average number of tags colliding in the same slot becomes:

E[XX2]=i=0iλi!eλ11λeλeλ=λλeλ1λeλeλ=H^E[X \mid X \geq 2]=\sum_{i=0}^{\infty} i \frac{\lambda}{i !} e^{-\lambda} \frac{1}{1-\lambda e^{-\lambda}-e^{-\lambda}}=\frac{\lambda-\lambda e^{-\lambda}}{1-\lambda e^{-\lambda}-e^{-\lambda}}= \hat{H}

Last updated