Internet of Things

advertisement
Internet of Things
Prof. M. Cesana
Exam– September 2, 2011
Family Name
Given Name
Student ID
Total Available time: 2 hours
Important: use the blank space after each exercise for your answers.
E1 E2 E3 Questions Questions OS
1 – Exercise (6 points)
A personal area network (PAN) works in beacon-enabled mode. Assuming that:
 the active part of the Beacon Interval (BI) is composed of Collision Free Part and Collision
Access Part (CAP);
 the slots in the GTS and in the CAP can carry 127 [byte] packets;
 the duty cycle is 1%;
 the Collision Access Part duration is 100 [ms] and the BI is 20 [s]
 the transmission rate is 250 [kb/s];
find:
1. the minimum rate which can be assigned to motes in the Collision Free Part
2. the number of motes at minimum rate which can be serviced in the Collision Free Part
3. the overall capacity of the Collision Access Part
Find the average energy consumption of the PAN Coordinator if the number of motes transmitting
in the CFP is the one found at point 2 and 50% of the CAP is actually used for transmissions (the
energy for receiving/transmitting in a slot is Etx=3 [mJ], the energy of being idle in a slot is Eidle =
1.5 [mJ] and the energy for sleeping is Esleep = 1.5 [uJ]).
2– Exercise (6 points)
A Personal Area Network (PAN) is composed of a PAN Coordinator and 4 motes. Mote 1 has 4
packets to be delivered, Mote 2 has 1 packet to be delivered, Mote 3 has 2 packets to be delivered
and Mote 4 has 3 packets to be delivered. The communication is performed through a token-based
access mechanism. Assuming that:
 the token packet is S=10[byte] long
 the DATA packet is L=127 [byte] long
 the data rate is R=250 [kb/s]
 the propagation delay between each couple (PAN Coordinator- mote) is t=10 [us]
 the distance between each couple (PAN Coordinator- mote) is d=5 [m]
Find out the average duration of the polling cycle (until all the packets have been received by the
PAN Coordinator in the following two cases:
1. the polling follows a round robin policy: the PAN Coordinator polls serially all the devices
(starting from Mote 1), if the device has a packet to deliver it sends it, otherwise it returns
the token to the PAN Coordinator.
2. The polling follows an exhaustive round robin policy: the PAN Coordinator polls serially
the devices (starting from Mote 1) but it keeps polling the same device until all its packets in
the queue have been transmitted (assume that the PAN Coordinator knows the updated
buffer of each device).
Find out the total energy consumption for the four Motes in the two cases in point 1 and 2
(energy for operating TX/RX circuitry is Ec=50 [nJ/bit]; the energy required to support
sufficient transmission output power Etx(d)= k d2 [nJ/bit], being k=1 [nJ/bit/m2]).
3 – Exercise (7 points)
The personal area network (PAN) in the figure is used to gather periodical information on the
average temperature of a given area. To this extent, N motes are geared with temperature sensors.
Consider the following two scenarios:
1. The temperature sensors periodically report their measures to the PAN Coordinator which
then relays each report to the information sink which performs the average operation.
2. The temperature sensors periodically report their measures to the PAN Coordinator which
performs the average operation and then sends one averaged sample to the information sink.
Assuming that:
 The temperature sensors (circles) are all 5 meters away from the PAN Coordinator (triangle)
 The PAN Coordinator is 10 meters away from the information sink (square)
 The packets containing the temperature samples and the averaged temperature are 127 [byte]
 the energy for operating TX/RX circuitry is Ec=50 [nJ/bit];
 the energy required to support sufficient transmission output power Etx(d)= k d2 [nJ/bit],
being k=1 [nJ/bit/m2]
 the energy required to perform the average operation is 4 [uJ] for each temperature measure
to be averaged.
 the information sink is mains-operated (the energy consumption for the averaging operation
performed at the information sink is negligible)
1. Write the energy consumption to get one averaged temperature value at the sink when N=4
in the two aforementioned cases.
2. Under the given parameters, is there any value of N beyond which performing the averaging
operation at the PAN Coordinator is less energy-efficient than at the sink? If so, find out this
value.
3 – Questions (10 points)
1.
Given the following network topology, what is the minimum allowed slot number in the
signaling subframe of SPARE MAC?
2. Briefly explain the binary tree collision resolution protocol.
3. A RFID system is composed of 4 tags and runs the Frame ALOHA protocol. The initial
frame size is r=2. What is the average throughput after the first frame?
4. Briefly describe the network topologies standardized in ZigBee specifications
5. A mote runs the IEEE 802.15.4 Carrier Sense Multiple Access procedure. The current
parameter are CW=2, NB=1, BE= 2. Briefly explain what is the use of these parameters. In
which range the mote will choose the next slot for sensing the channel?
Questions OS (3 points)
1 - Explain the basics ingredients of TinyOS: modules, configuration, command, events and tasks.
You can provide a simple code example to clarify your answer.
2 - Consider the following MoteRunner code: insert self-explaining comments where required to
describe what the following piece of code does. Explain in details what happens when the method
periodicSend is invoked.
import com.ibm.saguaro.system.*;
public class BaseStation {
static BaseStation basestation;
static Timer tsend;
static int dest_node;
static int counter;
static byte[] xmit;
static long xmitDelay;
static RadioTxDone onDone;
static{
basestation = new BaseStation();
Radio.acquire();
Radio.setPanId(0x22, true);
Radio.setShortAddr(0x00);
//->INSERT COMMENT HERE
xmit = new byte[11];
xmit[0] = Radio.FCF_DATA;
xmit[1] = Radio.FCA_DST_SADDR | Radio.FCA_SRC_SADDR;
Util.set16le(xmit, 3, 0x22);
Util.set16le(xmit, 5, 1);
Util.set16le(xmit, 7, 0x22);
Util.set16le(xmit, 9, 0x0000);
//->INSERT COMMENT HERE
onDone = new RadioTxDone(null) {
public void invoke(byte[] pdu, int len, int status, long txend) {
BaseStation.transmitDone(pdu,len,status,txend);
}
};
//->INSERT COMMENT HERE
tsend = new Timer();
tsend.setCallback(new TimerEvent(null){
public void invoke(byte param, long time){
BaseStation.periodicSend(param, time);
}
});
xmitDelay = Time.toTickSpan(Time.MILLISECS, 2500);
tsend.setAlarmBySpan(xmitDelay);
}
Download