• No se han encontrado resultados

CAPÍTULO IV: MARCO PROPOSITIVO

4.4 SISTEMAS DE GESTIÓN DE LA CALIDAD

4.4.3 Requisitos de la Documentación

The optimum parameters for the implementation of MAC layer protocols is chosen based on the characterization results of CC430 based implant, as listed in table 5.8. This setting of the PHY will be used here after in the network evaluation.

Parameter Value Transmission power -10dbm Transmission distance SC1 - 16 cms SC2 - 40cms SC3 - 100 Frequency of operation 433MHz Antenna orientation 0◦

Packet length 20 bytes Data rate 40 Kbps

Table 5.8: Optimum parameters from hardware evaluation

Chapter 6

Performance evaluation of

wake-up feature based

CSMA/CA protocol

This chapter discusses about the effect of wake-up radio in Carrier sense multiple access with collision avoidance (CSMA/CA) protocol in the sensor nodes and evaluation of the network performance using the optimum parameters for physical layer listed in Chapter 5. The effect of wake-up feature in the CSMA/CA protocol is also evaluated. The main aim of this chapter is to verify the software simulation results of Chapter 4 in implantable sensor node and to find the effect of wake-up radio in the chosen CSMA/CA protocol. In order to know evaluate the network performance with sensor node and in a implanted environment, a CSMA/CA based MAC is implemented in the sensor node. The results from characterising the physical layer of the sensor nodes are used in order to confirm the functioning of the radio communication as per the IEEE standards when implanted inside the animal flesh. The results from software simulation has proved that the wake-up radio will decrease the power consumption and increase the performance of the network parameters listed in Chapter 2. To evaluate the performance of the wake-up radio based MAC protocol in IBSN scenario, experimentation with network of sensor nodes implanted inside the animal tissue and evaluation of network parameters is required. The CSMA/CA access mechanism with wake-up radio had shown interesting results in chapter 4 where, the impact of wake-up radio had increase the network performance by 20% and behaved similar to that of TDMA based access mechanism without any need of time-synchronisation over the network. Hence in this chapter, CSMA/CA access mechanism is chosen and evaluated with implanted sensor nodes.

6.1

CSMA/CA without wake-up radio

In CSMA/CA MAC protocol without wake-up feature, as soon as a node receives a packet that is to be sent, it checks to be sure the channel is clear (no other node is transmitting at the time). If the channel is clear, then the packet is sent. If the channel is not clear, the node waits for a randomly chosen period of time, and then checks again to see if the channel is clear. This period of time is called the backoff factor, and is counted down by a back-off counter. If the channel is clear when the back-off counter reaches zero, the node transmits the packet. If the channel is not clear when the backoff counter reaches zero, the back-off factor is set again, and

the process is repeated. The protocol should keep the number of collisions to a minimum, even under the highest possible load. To this end, the range of the random delay, or the contention window (CW), is set to vary with the load. In the case of a collision, the delay is doubled progressively: 15, 31, 63,...1023, until a successful transmission occurs and the delay is reset to the minimal value. If a node has a packet to send in slotted CSMA/CA, then the three parameters are initialized and the boundary of the next backoff period is located. The MAC layer delays the assessment of the channel for a random number of backoff periods in the range 0 to 2(BO) . After the delay on next backoff boundary, the node will start transmitting, if two

CCAs, the packet transmission, and any acknowledgement can be completed before the end of the CAP within the current window. If it cannot be completed, then it will start evaluation at the start of next window. If the channel is assessed to be busy, then the MAC increments back-off period by one and also ensures that back-off be less than or equal to maximum backoff. CW would be reset to 2 and if the value of backoffs, the CSMA/CA shall start another random delay. Otherwise, the CSMA/CA terminates with a Channel Access failure status.

Packet format The packets are formatted in accordance with the IEEE 802.15.6 standards. Each packet have a preamble, synchronization bits ( only in WuR implementation), length of the packet information, dest address and source address, device info as guided by the manufacturers and the user data. Size of each section is shown in the Fig. 6.1. The purpose of preamble is not to time synchronize the data, but to inform the receiver that it is the start of the frame. Synchronization bits is not present in the CSMA/CA implementation and is zero padded during the transmission. In WuR implementation the time at which the node should be waken-up is presented in this part of the frame. Destination and receiver address is not necessary in this case, however as the size of the network increases, it will be helpful to prevent idle listening from other nodes. Port information and the device information is send along with the packet in order to satisfy the requirements of the hardware provided. The payload data is set to 20 bytes in this case as an optimum from the previous experiments. There is no provision of error checking in this stage, as the network size is smaller and simplest topology is used.

Figure 6.1: Packet format of the CSMA/CA protocol.

Flowchart for CSMA/CA without wake-up radio implementationThe CSMA/CA im- plementation is carried out as shown in the Fig. 6.2. The back-off timer is set based on the formula,BT = 2BE−1 whereBE is the exponentially increasing number.

CHAPTER 6. PERFORMANCE EVALUATION OF WAKE-UP FEATURE BASED CSMA/CA PROTOCOL start Set back- off time to zero Assemble the frame Perform CCA Is the channel idle ?? Transmit application data Wait for random backoff time stop no yes

Figure 6.2: Flowchart for CSMA/CA

f o r ( i = 1 ; i <= MAX NODES; i ++) { i f (m. nbr [ i ] . w e i g h t != −1) { n o d e w e i g h t = m o d d i f f (m. nbr [ i ] . w e i g h t , m. nbr [ s o u r c e ] . w e i g h t ) ; w e i g h t [ node ] [ i ] = n o d e w e i g h t ; / / m a s t e r node h a s t h e h i g h e s t p r i o r i t y make pkt ( pkt ) ; pkt−>t y p e = t y p e ; pkt−>s i z e = 0 ; pkt−>d e s t = i ; i f (CSMA DEBUG) s e n d p k t ( pkt ) ; }

Code 6.1: CSMA/CA pseudo-code