## 7 Performance Evaluation
### Environment for Performance Evaluation  
The goal of the performance evaluation is to show that our proposed schemes can reduce energy consumption when integrating with code dissemination supporting dynamic packet size according to the link quality. We assume a simple 3-hop topology with different link quality as shown in Figure 9, where a bit error rate (BER) is assigned to each link to indicate excellent (PRR: 0.99), fair (PRR: 0.75) and bad (PRR: 0.5) link quality when the packet size is 133 bytes that include a PHY header (6 bytes) and a maximum medium access control protocol data unit (127 bytes) in IEEE 802.15.4 [27] as shown in Figure 10. We assume that code dissemination is performed in sequential order, thus no collisions due to channel contention occur in the simple 3-hop topology. We employ IEEE 802.15.4 as the medium access layer where we use the beacon-enabled mode, and do not use the acknowledgement as shown in Figure 10. In order to take the practical environment into account, the duty cycle is set to 50% by setting the value of the _macSuperframeOrder_ (SO) for the superframe duration (SD) to 6 and the value of the _macBeaconOrder_ (BO) for the beacon interval (BI) to 7 as shown in Figure 10. As a result, the node transmits packets as a long frame in the active period while entering the sleep mode in the inactive period. The long frame is the IEEE 802.15.4 data frame where the size of medium access control protocol data unit (MPDU) is larger than 18 bytes, followed by a long interframe spacing (LIFS) period. We employ the energy model of TelosB [28], which is a commonly used sensor node [15; 16; 17], as follows. \[E\ =\ E_{rx}+E_{tx}+E_{mcu}+E_{ille}+E_{sleep} \tag{11}\]  
Figure 8: The probability of false positive in the Bloom filter. Figure 9: Configuration for the performance evaluation. For the sake of simplicity, we do not consider the energy consumption for the transition procedure among TX, RX, and off state, and assume that the CC2420 makes a transition to the off state immediately after completing data transmission. \(E_{rx}\) and \(E_{tx}\) are the energy consumed when the microcontroller unit (MCU) is on and the radio is RX or TX, \(E_{mcu}\) is the energy consumed when the MCU is on and the radio is off, \(E_{idle}\) is the energy consumed when the MCU is idle and the radio is off, and \(E_{slep}\) is the energy consumed when the node is in the sleep mode. In other words, \(E_{rx}\) and \(E_{tx}\) are the energy consumption for receiving and transmitting the code image, and \(E_{mcu}\) corresponds to the energy consumption for performing cryptographic operations such as digital signatures, MACs and hashes. In addition, \(E_{idle}\) is the energy consumption during the backoff period and the LIFS in the active period, and \(E_{slep}\) is the energy consumption in the inactive period in Figure 10. The energy consumption in each mode is computed by multiplying the time in each mode with the supply voltage and the current in each mode of TelosB which is shown in Table 1. For example, \(E_{tx}\) for transmitting a 40-byte packet is (40 bytes \(\times\) 32 \(\upmu\)s) \(\times\) 3 V \(\times\) 19.5 mA = 74.88 \(\upmu\)J. We assume that the underlying code dissemination protocol is Deluge, and a page size and a packet size are configured to 1024 bytes and 22 bytes which are the default configurations of Deluge in TinyOS. The size of a code image to be disseminated is 10 kB, 20 kB and 30 kB. Additionally, the underlying code dissemination protocol is assumed to be able to optimize the size of the data payload in the medium access control service data unit in Figure 11 according to the given BER in terms of the transmission overhead (_TO_) which is defined as  
Figure 11: The format of IEEE 802.15.4 data frame. Figure 10: The structure of IEEE 802.15.4 superframe in the performance evaluation. \[