**4. Motivation of PoRAP development**

This work aims at building a communication protocol for WSN. The targeted scenario is the periodic-based where a low duty cycle is required. The network consists of a fixed set of sources and a base station. Furthermore, direct data communications between the base station and its sources are feasible. The communication protocol to be developed will effectively support the single-hop WSN. Such a structure forms a network cluster which can be used in some environmental or habitat monitoring system such as (Mainwaring et al., 2002) and (Tolle et al., 2005). As the number of sources is fixed throughout the communications, the data reporting rate is fairly constant. The communication of the sources can be therefore scheduled and controlled by the base station. A time slot is allocated to each source and will be used for data communication. Only one source can use the shared medium whilst the others switch to sleep mode by turning their radios off and consuming the least amount of energy. Data collision can be avoided and idle listening can be minimised.

#### **4.1 Sensor node power consumption**

This section establishes the significance of network communication as a consumer of energy within a wireless sensor network. In doing so a careful reading of sensor data sheets is used to inform calculations based upon the sensor's parameters and simulations. What proportion of the power is used for communication is investigated and how power may be conserved is identified.

In order to investigate how power is consumed by a sensor, a simulation study has been established. The results are validated by the CC1000 transceiver data sheet. As the sensor operating system used in this work is TinyOS, the selected simulator is TOSSIM which is a TinyOS library. TinyOS is an operating system specifically designed for embedded devices such as sensors. It has been widely used in both research and commercial communities. The selected release of the simulator is TOSSIM 1 and it does not provide power usage measurement capability. PowerTOSSIM, an extension module developed for analysing power consumption of hardware components (Shnayder et al., 2004) is used to address the investigation on power consumption and it is included in Tiny 1.1.11. The only sensor platform supported in PowerTOSSIM is Mica2 which employed the CC1000 radio chip. The PowerTOSSIM supports an operating frequency of 400 Megahertz (MHz) and a voltage of 3 Volt. The energy model file of PowerTOSSIM adopts the required transmission current for each power level. According to the CC1000 datasheet, 31 output power levels ranging from - 20 to +10dBm can be programmed. The dBm is the measurement of power loss in decibels (dB) using 1 milli-watt (mW) as a reference value.

#### **4.1.1 Simulation parameters**

A sensor node was created in the simulation and performs as a transmitting node. An experiment was conducted to obtain the current consumption required by each transmission power level. In total five transmission powers including -20, -10, 0, +6 and +10dBm were

communication is feasible if the destination is located within the source's range. Multiple transmissions and receptions are not required if direct communication applies. However, the same transmission power cannot always be used as the link quality changes over time.

This work aims at building a communication protocol for WSN. The targeted scenario is the periodic-based where a low duty cycle is required. The network consists of a fixed set of sources and a base station. Furthermore, direct data communications between the base station and its sources are feasible. The communication protocol to be developed will effectively support the single-hop WSN. Such a structure forms a network cluster which can be used in some environmental or habitat monitoring system such as (Mainwaring et al., 2002) and (Tolle et al., 2005). As the number of sources is fixed throughout the communications, the data reporting rate is fairly constant. The communication of the sources can be therefore scheduled and controlled by the base station. A time slot is allocated to each source and will be used for data communication. Only one source can use the shared medium whilst the others switch to sleep mode by turning their radios off and consuming the least amount of energy. Data collision can be avoided and idle listening can

This section establishes the significance of network communication as a consumer of energy within a wireless sensor network. In doing so a careful reading of sensor data sheets is used to inform calculations based upon the sensor's parameters and simulations. What proportion of the power is used for communication is investigated and how power may be

In order to investigate how power is consumed by a sensor, a simulation study has been established. The results are validated by the CC1000 transceiver data sheet. As the sensor operating system used in this work is TinyOS, the selected simulator is TOSSIM which is a TinyOS library. TinyOS is an operating system specifically designed for embedded devices such as sensors. It has been widely used in both research and commercial communities. The selected release of the simulator is TOSSIM 1 and it does not provide power usage measurement capability. PowerTOSSIM, an extension module developed for analysing power consumption of hardware components (Shnayder et al., 2004) is used to address the investigation on power consumption and it is included in Tiny 1.1.11. The only sensor platform supported in PowerTOSSIM is Mica2 which employed the CC1000 radio chip. The PowerTOSSIM supports an operating frequency of 400 Megahertz (MHz) and a voltage of 3 Volt. The energy model file of PowerTOSSIM adopts the required transmission current for each power level. According to the CC1000 datasheet, 31 output power levels ranging from - 20 to +10dBm can be programmed. The dBm is the measurement of power loss in decibels

A sensor node was created in the simulation and performs as a transmitting node. An experiment was conducted to obtain the current consumption required by each transmission power level. In total five transmission powers including -20, -10, 0, +6 and +10dBm were

The next section describes several sources of variability in radio frequency

**4. Motivation of PoRAP development** 

**4.1 Sensor node power consumption** 

(dB) using 1 milli-watt (mW) as a reference value.

**4.1.1 Simulation parameters** 

be minimised.

conserved is identified.

used. The corresponding current consumption was measured by (Shnayder et al., 2004) and their results are shown in Table 1. A simulation duration of 60 seconds and a total of 30 runs were conducted at each power level. A higher current will be consumed if the sensor transmits at a higher power.


Table 1. Current consumption measured by Shnayder et al., 2004

The results shown in Table 1 were used to compute the energy consumption required by each transmission power level. Fig. 1 shows error-bar plots of radio and total energy consumption at -20, -10, 0, +6 and +10 dBm. An analysis of power usage and conservation with respect to the maximum power level is described in Table 2.

According to Fig. 1, several observations can be made. Firstly, an increase in transmission power results in a higher energy consumption. Transmitting data at lower power uses less energy. For example, over 75% of energy can be conserved if the minimum power is used for transmission instead of the maximum. Secondly, the radio unit consumes a significant amount of energy. Up to 56% and 84% of energy are used by the radio if the sensor transmits at minimum and maximum power levels, respectively. The results are validated by the CC1000 data sheet which is the employed radio in Mica2. According to the CC1000 datasheet, the required current consumption for -20 and +10 dBm are 6.9 and 26.7 milli-amp (mA), respectively. Therefore, over 74% can be conserved and this is close to the 75% which is obtained from PowerTOSSIM.

Fig. 1. Radio and total energy consumption at various transmission power levels

This section provides details of experimental studies aimed at establishing effects of transmission power, distances and time-of-day on link quality metrics. In total three metrics including RSSI (Received Signal Strength Indicator), LQI (Link Quality Indication) and PRR (Packet Reception Rate) are used to describe the effects. The relationships between the metrics are also investigated and will be used for establishing power adaptation policies.

There is a variety of sources which cause variability in link quality in wireless communication. Unlike wired communication, environmental factors such as climatic conditions and time-ofday also affect the degree of signal attenuation. A significant degree of signal attenuation or interference may lead to unsuccessful data transmission. Link quality measurement is

A transmitter sends data packets at a specific transmission power wirelessly over a medium to a receiver. The transmission power level is programmable and this capability is provided by a transceiver or radio unit which is a component responsible for data transmission and reception. A sensor communicates with the other node by sending and receiving messages via wireless channel which is normally air. Several signals are generated from various sources such as electronic appliances and they are dissipated to the air. A wireless channel may then have background noise which is capable of interfering with data delivery between a pair of nodes. Moreover, time-of-day and climatic conditions such as fog and rain affects the wireless link quality. In order to determine link quality characteristics, all causes of signal strength reduction are considered as sources of signal attenuation. The reduced magnitude in signal strength is therefore defined as signal attenuation. If the transmission power is less than signal attenuation, the message cannot be successfully received. When the receiver is not able to receive the sent packet and the number of received packets is not increased, the reliability requirement defined by an application may not be met.

Transmission power should be adjusted in response to the changing link quality.

order to provide reliability of packet reception.

A radio unit provides several mechanisms to measure received signal power. The measured values are categorised as received signal strength (RSS). In total two attributes including RSSI (Received Signal Strength Indicator) and LQI (Link Quality Indication) are in the RSS category. The RSS can be used to indicate link quality. The reliability requirement specified by an application indicates a required number of packets received at the base station. The percentage of data receptions can be used to describe the link quality. The packet reception rate (PRR) is therefore introduced. Relationships amongst transmission power (TX), received signal strength (RSS) based attributes and PRR is useful for mapping application requirements to link quality measurements. Thus, the transmission power is adapted in

Received Signal Strength Indicator (RSSI) is defined as a measurement of the signal strength of an incoming message. The transmitted signal strength or transmission power reduces as the signal propagates through the medium. The RSSI is measured at the receiver and it demonstrates the received signal strength. Therefore, signal attenuation is approximately the difference between the transmission power and the RSSI. Link Quality Indication (LQI) is another metric in the RSS-based category. According to the definition outlined in IEEE 802.15.4 Standard for Local and Metropolitan Area Networks, the LQI measurement is a characterisation of the strength and/or quality of received packet. Each received packet has its own LQI measurement and the integer value ranges from 0 to 255. Therefore, the

**4.2 Environmental investigation of transmission power and reliability** 

therefore one of the major issues in wireless network communication.

**4.2.1 Link quality metrics** 


Table 2. Average radio power consumption (mJ) and percentages of used and saved power

Two key motivations are established with respect to the simulation results. Firstly, transmission power considerably affects radio power consumption. The power-aware approach based upon power adaptation is Transmission Power Control (TPC). PoRAP adopts the TPC concepts in order to achieve the power conservation goal. The selected sensor platform in this work is Tmote and it employs the CC2420 radio instead of the CC1000. Like the CC1000, the CC2420 also supports transmission power adaptation but it provides a different range of power levels. Table 3 shows some of the possible power levels and the corresponding current consumption. An analysis of power conservation with respect to the maximum level is also shown.


Table 3. Transmission power levels provided by CC2420 and analysis of power conservation

According to Table 3, over 50% of power can be saved if the minimum power is used for data transmission. The transmission power is one of the main factors which produces different reception strengths. The power adaptation is based upon the current link quality in order to maintain a good link. However, power adaptation is based upon several factors affecting link quality such as distance and time-of-day.

Secondly, according to Fig. 1, the radio unit accounts for a significant amount of power compared to the total consumed by all hardware components. Keeping the radio in sleep mode after the sensor has transmitted the data may establish an enhancement in power conservation. This is feasible if the single-hop network sensors do not listen to transmissions from other nodes in order to discover optimal data paths. The schedule-based MAC (Medium Access Control) approach suits the direct communication scenario as each of the sources wake up for control reception and data transmission. Otherwise, they are in sleep mode and consume the least amount of communication energy.



Secondly, according to Fig. 1, the radio unit accounts for a significant amount of power compared to the total consumed by all hardware components. Keeping the radio in sleep mode after the sensor has transmitted the data may establish an enhancement in power conservation. This is feasible if the single-hop network sensors do not listen to transmissions from other nodes in order to discover optimal data paths. The schedule-based MAC (Medium Access Control) approach suits the direct communication scenario as each of the sources wake up for control reception and data transmission. Otherwise, they are in sleep

**Percentage of Used Power** 

**Percentage of Used Current** 

**Percentage of Saved Power** 

**Percentage of Saved Current** 

**Average of Radio Power Consumption (mJ)** 

**Current Consumption (mA)** 

**Transmission Power (dBm)** 

respect to the maximum level is also shown.

affecting link quality such as distance and time-of-day.

mode and consume the least amount of communication energy.

**Transmission Power (dBm)** 

#### **4.2 Environmental investigation of transmission power and reliability**

This section provides details of experimental studies aimed at establishing effects of transmission power, distances and time-of-day on link quality metrics. In total three metrics including RSSI (Received Signal Strength Indicator), LQI (Link Quality Indication) and PRR (Packet Reception Rate) are used to describe the effects. The relationships between the metrics are also investigated and will be used for establishing power adaptation policies.

#### **4.2.1 Link quality metrics**

There is a variety of sources which cause variability in link quality in wireless communication. Unlike wired communication, environmental factors such as climatic conditions and time-ofday also affect the degree of signal attenuation. A significant degree of signal attenuation or interference may lead to unsuccessful data transmission. Link quality measurement is therefore one of the major issues in wireless network communication.

A transmitter sends data packets at a specific transmission power wirelessly over a medium to a receiver. The transmission power level is programmable and this capability is provided by a transceiver or radio unit which is a component responsible for data transmission and reception. A sensor communicates with the other node by sending and receiving messages via wireless channel which is normally air. Several signals are generated from various sources such as electronic appliances and they are dissipated to the air. A wireless channel may then have background noise which is capable of interfering with data delivery between a pair of nodes. Moreover, time-of-day and climatic conditions such as fog and rain affects the wireless link quality. In order to determine link quality characteristics, all causes of signal strength reduction are considered as sources of signal attenuation. The reduced magnitude in signal strength is therefore defined as signal attenuation. If the transmission power is less than signal attenuation, the message cannot be successfully received. When the receiver is not able to receive the sent packet and the number of received packets is not increased, the reliability requirement defined by an application may not be met. Transmission power should be adjusted in response to the changing link quality.

A radio unit provides several mechanisms to measure received signal power. The measured values are categorised as received signal strength (RSS). In total two attributes including RSSI (Received Signal Strength Indicator) and LQI (Link Quality Indication) are in the RSS category. The RSS can be used to indicate link quality. The reliability requirement specified by an application indicates a required number of packets received at the base station. The percentage of data receptions can be used to describe the link quality. The packet reception rate (PRR) is therefore introduced. Relationships amongst transmission power (TX), received signal strength (RSS) based attributes and PRR is useful for mapping application requirements to link quality measurements. Thus, the transmission power is adapted in order to provide reliability of packet reception.

Received Signal Strength Indicator (RSSI) is defined as a measurement of the signal strength of an incoming message. The transmitted signal strength or transmission power reduces as the signal propagates through the medium. The RSSI is measured at the receiver and it demonstrates the received signal strength. Therefore, signal attenuation is approximately the difference between the transmission power and the RSSI. Link Quality Indication (LQI) is another metric in the RSS-based category. According to the definition outlined in IEEE 802.15.4 Standard for Local and Metropolitan Area Networks, the LQI measurement is a characterisation of the strength and/or quality of received packet. Each received packet has its own LQI measurement and the integer value ranges from 0 to 255. Therefore, the

had been reached. The other experimental parameters such as power levels, data sending

Fig. 2 shows the average RSSI readings of the three sensors at various locations and transmission power levels. The missing data indicate that the power provides RSSI reading less than -95dBm which is the minimum value reported by TinyOS. Fig. 3 shows average LQI readings of a sensor at various locations and transmission power levels. The missing

rate and number of runs are stated in Section 4.2.2.

data indicate unsuccessful data delivery.

Fig. 2. Effects of sensor locations on RSSI

Fig. 3. Effects of sensor locations on LQI

minimum and maximum values of LQI for each packet are 0 and 255, respectively. The IEEE standard recommends at least eight unique values of LQI should be used in order to yield a uniform distribution between the two limits. The following details of LQI are based upon the CC2420 radio unit as it is used in both Tmote Sky and Tmote Invent which are the chosen platforms in this research. Apart from RSSI and LQI, PoRAP determines an additional link quality index. The main reason is that both RSSI and LQI are not transparent to the user or application. Mapping mechanisms are required in order to convert an application requirement to the ranges of RSSI and LQI values the base station should have. This subsection aims to describe the Packet Reception Rate (PRR) which is more closely related to the application requirement. In this research, the PRR is defined as a percentage of the number of correctly received to that of transmitted packets. The PRR value is in the range of 0% to 100%. The 100% PRR indicates complete reliability. Each received packet has its own measured RSSI and LQI which can be used to predict the PRR. Models representing relationships amongst metrics are therefore required and demonstrated later in this chapter.

#### **4.2.2 Experimental setup**

In our implementation-based experiments, Tmote Invent and Tmote Sky are used as the sensor and base station, respectively. Both of them employ the CC2420 radio which has working frequency band from 2,400 to 2,483 Megahertz (MHz). The radio transmission data rate is 250 kilobits per second (kbps). The random access memory (RAM) and program flash sizes are 10 and 48 kilobytes (Kbytes). The main difference between both platforms is that the Tmote Invent provides built-in sensor and battery boards. The minimum and maximum transmission power levels are -25 and 0dBm, respectively. Tmote sensors consume 8.5 and 17.4 milli-amps (mA) for transmitting a data packet at minimum and maximum power levels, respectively. A current of 19.7mA is required for radio receiving. This indicates that receiving accounts for a large radio power usage. Listening removal in PoRAP may enhance power conservation in WSN. Each Tmote sensor includes an internal Inverted-F antenna which is a wire monopole. The top section of the antenna is folded down to be parallel with the ground plane. The communication ranges for indoor and outdoor are 50m and 125m, respectively.

The experiments were conducted in the 16m x 20m indoor environment. The base station was plugged into a desktop computer and received data from sensors. Three sensors were used and they were placed at the same locations. In total 10 locations including 1, 2, 3, 4, 5, 7, 10, 13, 16 and 20m were used. The sensors and base station had the same antenna orientation and height above floor level. The payload size was 12 bytes. In total 8 transmission power levels including 3, 7, 11, 15, 19, 23, 27 and 31 associated to -25, -15, -10, - 7, -5, -3, -1 and 0 dBm were used. The sensors transmitted one packet every second. At each power, the sensors transmitted 50 packets for statistical analysis. Upon data reception, the base station measured RSSI and LQI. The number of received packets was counted in order to compute PRR.

#### **4.2.3 Experiments on location as a determination of necessary transmission power**

The significance of the locations of the sending and receiving motes to determine the relationship between transmission power (TX) and reception quality is established. In this experiment, the base station location was the same whilst three sensors were placed at 10 different locations in the same direction with clear line-of-sight (LOS) including 1, 2, 3, 4, 5, 7, 10, 13, 16 and 20m. Each power adaptation cycle was ended after the maximum power

minimum and maximum values of LQI for each packet are 0 and 255, respectively. The IEEE standard recommends at least eight unique values of LQI should be used in order to yield a uniform distribution between the two limits. The following details of LQI are based upon the CC2420 radio unit as it is used in both Tmote Sky and Tmote Invent which are the chosen platforms in this research. Apart from RSSI and LQI, PoRAP determines an additional link quality index. The main reason is that both RSSI and LQI are not transparent to the user or application. Mapping mechanisms are required in order to convert an application requirement to the ranges of RSSI and LQI values the base station should have. This subsection aims to describe the Packet Reception Rate (PRR) which is more closely related to the application requirement. In this research, the PRR is defined as a percentage of the number of correctly received to that of transmitted packets. The PRR value is in the range of 0% to 100%. The 100% PRR indicates complete reliability. Each received packet has its own measured RSSI and LQI which can be used to predict the PRR. Models representing relationships amongst metrics are therefore required and demonstrated later in this chapter.

In our implementation-based experiments, Tmote Invent and Tmote Sky are used as the sensor and base station, respectively. Both of them employ the CC2420 radio which has working frequency band from 2,400 to 2,483 Megahertz (MHz). The radio transmission data rate is 250 kilobits per second (kbps). The random access memory (RAM) and program flash sizes are 10 and 48 kilobytes (Kbytes). The main difference between both platforms is that the Tmote Invent provides built-in sensor and battery boards. The minimum and maximum transmission power levels are -25 and 0dBm, respectively. Tmote sensors consume 8.5 and 17.4 milli-amps (mA) for transmitting a data packet at minimum and maximum power levels, respectively. A current of 19.7mA is required for radio receiving. This indicates that receiving accounts for a large radio power usage. Listening removal in PoRAP may enhance power conservation in WSN. Each Tmote sensor includes an internal Inverted-F antenna which is a wire monopole. The top section of the antenna is folded down to be parallel with the ground plane. The communication ranges for indoor and outdoor are 50m and 125m,

The experiments were conducted in the 16m x 20m indoor environment. The base station was plugged into a desktop computer and received data from sensors. Three sensors were used and they were placed at the same locations. In total 10 locations including 1, 2, 3, 4, 5, 7, 10, 13, 16 and 20m were used. The sensors and base station had the same antenna orientation and height above floor level. The payload size was 12 bytes. In total 8 transmission power levels including 3, 7, 11, 15, 19, 23, 27 and 31 associated to -25, -15, -10, - 7, -5, -3, -1 and 0 dBm were used. The sensors transmitted one packet every second. At each power, the sensors transmitted 50 packets for statistical analysis. Upon data reception, the base station measured RSSI and LQI. The number of received packets was counted in order

**4.2.3 Experiments on location as a determination of necessary transmission power**  The significance of the locations of the sending and receiving motes to determine the relationship between transmission power (TX) and reception quality is established. In this experiment, the base station location was the same whilst three sensors were placed at 10 different locations in the same direction with clear line-of-sight (LOS) including 1, 2, 3, 4, 5, 7, 10, 13, 16 and 20m. Each power adaptation cycle was ended after the maximum power

**4.2.2 Experimental setup** 

respectively.

to compute PRR.

had been reached. The other experimental parameters such as power levels, data sending rate and number of runs are stated in Section 4.2.2.

Fig. 2 shows the average RSSI readings of the three sensors at various locations and transmission power levels. The missing data indicate that the power provides RSSI reading less than -95dBm which is the minimum value reported by TinyOS. Fig. 3 shows average LQI readings of a sensor at various locations and transmission power levels. The missing data indicate unsuccessful data delivery.

Fig. 2. Effects of sensor locations on RSSI

Fig. 3. Effects of sensor locations on LQI

2. The higher LQI results in a more stable PRR. The relationship between LQI and PRR shown in Fig. 5 (b) is less clear than Fig. 5 (a). Similar results are also addressed in (Lin et al., 2006). According to these observations, RSSI should be used to relate to the

3. The LQI significantly increases with the RSSI. Convergence to particular LQI values is then observed. A lower bit error rate is observed when the base station receives packets

PRR.

with higher RSSI measurements.

Fig. 4. (a) Fluctuation in link quality metrics over 24 hours RSSI

Fig. 4. (b) Fluctuation in link quality metrics over 24 hours LQI

According to Fig. 2 and Fig. 3, most of the RSSI measurements proportionally increased with the transmission power levels. Unlike the RSSI, the LQI measurements were stable at closer locations especially when higher power was used for transmission. Most of the LQI values decreased at greater distances. The minimum power level of -25dBm could be used to successfully deliver data to the base station only when the locations were within 7m. The decrease in received signal strength with increasing distances assumed in the prediction models do not apply in the results. For example, in the case of 2m, the sensor provides a weaker strength compared to a distance of 3m. The experimental results given in (Lin et al., 2006) and (Stoyanova et al., 2007) demonstrate similar observations on location effects. The RSSI and LQI are measured only when the base station receives data. The observed minimum RSSI values higher than -95 dBm indicate data reception.

#### **4.2.4 Fluctuation in link quality metrics over time of day**

This section investigates on how RSSI, LQI and PRR fluctuate over the time of day. The same base station and Sensor 1 were used. The sensor was located at 20m in the same environment. It transmitted one packet every second at 0 dBm for 1,440 minutes or 24 hours. The experiment was started in the morning before the office hour.

Fig. 4 demonstrates fluctuation of the RSSI, LQI and PRR over time of day. The RSSI fluctuated during the first half of the experiment. It was stable during the night time and the fluctuation was back later in the experiment. Unlike the RSSI, the LQI fluctuated throughout the experiment. At the beginning the PRR siginificantly decreased. This observation was resulted from the presence of people around the lab. The PRR increased during the night time as there were no staff and student in the lab.

In summary, apart from transmission power, location and heterogeneity in the manufacture, the link quality metrics are affected by the time-of-day. The presence of people around the lab is the main factor in this experiment and is considered as temporary physical barrier. Radio communication in WSN requires a line-of-sight. Some packets may be lost if there are some people in the sending path.

#### **4.2.5 Relationship between metrics**

This section aims to describe the relationships between RSSI, LQI and PRR. During packet reception, the base station measures RSSI and LQI. Apart from RSSI and LQI, the standard message type of TinyOS includes the CRC field which is a Boolean data type. The base station also looks at the CRC field to see if the data packet is received correctly. The numbers of data transmissions and receptions are counted to compute the PRR. This scheme can be used in a long-term operation.

However, the PRR may be estimated from the RSSI or LQI measurements. This concept suits a short term operation. The base station does not count the numbers of sent and received packets. Hence, the relationship between metrics needs to be established. Fig. 5 shows relationships between the link quality metrics at 5m, 12m and 19m. The average RSSI and LQI are computed at each transmission power level. The number of received packets is counted in order to calculate the PRR.

According to Fig. 5, several observations can be made as follows:

1. The PRR steeply increases with RSSI up to a certain point followed by more stable reliability measurements. Significant variations in reception rates are found when the RSSI readings are between -95 and -90 dBm. At least 95% PRR may be achieved at all distances if the sensor transmits data at the power producing RSSI greater than -90 dBm.

According to Fig. 2 and Fig. 3, most of the RSSI measurements proportionally increased with the transmission power levels. Unlike the RSSI, the LQI measurements were stable at closer locations especially when higher power was used for transmission. Most of the LQI values decreased at greater distances. The minimum power level of -25dBm could be used to successfully deliver data to the base station only when the locations were within 7m. The decrease in received signal strength with increasing distances assumed in the prediction models do not apply in the results. For example, in the case of 2m, the sensor provides a weaker strength compared to a distance of 3m. The experimental results given in (Lin et al., 2006) and (Stoyanova et al., 2007) demonstrate similar observations on location effects. The RSSI and LQI are measured only when the base station receives data. The observed

This section investigates on how RSSI, LQI and PRR fluctuate over the time of day. The same base station and Sensor 1 were used. The sensor was located at 20m in the same environment. It transmitted one packet every second at 0 dBm for 1,440 minutes or 24 hours.

Fig. 4 demonstrates fluctuation of the RSSI, LQI and PRR over time of day. The RSSI fluctuated during the first half of the experiment. It was stable during the night time and the fluctuation was back later in the experiment. Unlike the RSSI, the LQI fluctuated throughout the experiment. At the beginning the PRR siginificantly decreased. This observation was resulted from the presence of people around the lab. The PRR increased during the night

In summary, apart from transmission power, location and heterogeneity in the manufacture, the link quality metrics are affected by the time-of-day. The presence of people around the lab is the main factor in this experiment and is considered as temporary physical barrier. Radio communication in WSN requires a line-of-sight. Some packets may be lost if there are

This section aims to describe the relationships between RSSI, LQI and PRR. During packet reception, the base station measures RSSI and LQI. Apart from RSSI and LQI, the standard message type of TinyOS includes the CRC field which is a Boolean data type. The base station also looks at the CRC field to see if the data packet is received correctly. The numbers of data transmissions and receptions are counted to compute the PRR. This scheme

However, the PRR may be estimated from the RSSI or LQI measurements. This concept suits a short term operation. The base station does not count the numbers of sent and received packets. Hence, the relationship between metrics needs to be established. Fig. 5 shows relationships between the link quality metrics at 5m, 12m and 19m. The average RSSI and LQI are computed at each transmission power level. The number of received packets is

1. The PRR steeply increases with RSSI up to a certain point followed by more stable reliability measurements. Significant variations in reception rates are found when the RSSI readings are between -95 and -90 dBm. At least 95% PRR may be achieved at all distances

if the sensor transmits data at the power producing RSSI greater than -90 dBm.

minimum RSSI values higher than -95 dBm indicate data reception.

The experiment was started in the morning before the office hour.

**4.2.4 Fluctuation in link quality metrics over time of day** 

time as there were no staff and student in the lab.

some people in the sending path.

**4.2.5 Relationship between metrics** 

can be used in a long-term operation.

counted in order to calculate the PRR.

According to Fig. 5, several observations can be made as follows:


Fig. 4. (a) Fluctuation in link quality metrics over 24 hours RSSI

Fig. 4. (b) Fluctuation in link quality metrics over 24 hours LQI

Fig. 5. (b) Relationships between metrics LQI-PRR

Fig. 5. (c) Relationships between metrics RSSI-LQI

This section provides some experimental results on delays in wireless sensor network (WSN) which affects PoRAP architecture development. Communication is represented by a frame structure which consists of several slots. A slot is assigned to each source and it transmits data when the allocated slot arrives. The slot length should be long enough to avoid data collisions at the base station where two packets from two different sources arrive approximately at the same time. Several experiments have been conducted in order to

**4.3 Delays in wireless sensor network** 

Fig. 4. (c) Fluctuation in link quality metrics over 24 hours PRR

The relationship between link quality metrics can be used to estimate an observed reliability from the measured receiving strength. This observation is addressed in (Lin et al., 2006) and (Srinivasan et al., 2006). After measuring the metrics, the base station determines whether the current transmission power requires an adaptation. The PRR steeply increases with the RSSI followed by significantly more stable measurements. The PRR should not be estimated from the RSSI between -95 to -90dBm as transmission power adaptation based upon this region will not be accurate. The measurements demonstrate that the network should operate at levels taken from an appropriate region.

Fig. 5. (a) Relationships between metrics RSSI-PRR

The relationship between link quality metrics can be used to estimate an observed reliability from the measured receiving strength. This observation is addressed in (Lin et al., 2006) and (Srinivasan et al., 2006). After measuring the metrics, the base station determines whether the current transmission power requires an adaptation. The PRR steeply increases with the RSSI followed by significantly more stable measurements. The PRR should not be estimated from the RSSI between -95 to -90dBm as transmission power adaptation based upon this region will not be accurate. The measurements demonstrate that the network should operate

Fig. 4. (c) Fluctuation in link quality metrics over 24 hours PRR

at levels taken from an appropriate region.

Fig. 5. (a) Relationships between metrics RSSI-PRR

Fig. 5. (b) Relationships between metrics LQI-PRR

Fig. 5. (c) Relationships between metrics RSSI-LQI

#### **4.3 Delays in wireless sensor network**

This section provides some experimental results on delays in wireless sensor network (WSN) which affects PoRAP architecture development. Communication is represented by a frame structure which consists of several slots. A slot is assigned to each source and it transmits data when the allocated slot arrives. The slot length should be long enough to avoid data collisions at the base station where two packets from two different sources arrive approximately at the same time. Several experiments have been conducted in order to

 Fire-to-Send *x2 – x1* Send Command Delay *x3 – x2* Transmission *x4 – x3* Reception *x6 – x5* Receive *x7 – x6*

 Reception *y2 – y1* Receive *y3 – y2* Fire-to-Send *y5 – y4* Send Command Delay *y6 – y5* Transmission *y7 – y6*

Two-Way Propagation *(x5 – x3) - (y6 – y1)*

According to Table 4, the transmission and reception delays are calculated based upon when the events take place. The transmission delay is defined as the duration required for the radio to transmit the packet. In TinyOS 2.x, the CC2420Transmit interface provides a sendDone() event which notifies packet transmission completion. The reception delay is the duration required for packet reception by the radio, and the receive event is used for the timestamp. The fire-to-send delay indicates the desired interval for starting packet

One Tmote Sky base station and one Tmote Invent source were used. The source was located at 0.5 m away from the base station. The base station was plugged into a desktop computer. In total 1,000 cycles of message exchange were run for each source. After the packet had been received, the node waited for 128ms and initiates its data transmission.

In order to consider the effects of payload size, an additional experiment was conducted. The scenario shown in Fig. 6 was used. All settings are the same except the payload sizes. In total five payload sizes were used including 39, 55, 75, 95 and 115 bytes. Note that the maximum payload for the CC2420 radio is limited to 117 bytes whilst the header size is 11 bytes. Send command and transmission delays of the source were determined. Two-way propagation delays were also computed. In the case of 39 bytes, reception and receive delays of source and base station were observed whilst all delays were observed for the larger payload sizes. Statistical analysis of fire-to-send, send and transmission delays in milliseconds were conducted. The relationships between the 50th percentiles or medians of all sending delays and payload sizes are shown in Fig. 7. Note that "Send Command" delay is represented as "Send" in the figure. The results show that all delays increase with increasing payload sizes. The source requires more time to deliver larger packets to the radio. Similarly, larger packets require a longer duration for transmission. Increases in send command and

Statistical analyses of reception and receive delays in milliseconds were also made. The relationships between the 50th percentiles or medians of both receiving delays and payload sizes are shown in Fig. 8. Linear relationship between reception delay and payload size is

transmission delays are greater than those of fire-to-send delay.

also observed in Fig. 8. The receive delays are constant for all payload sizes.

Base Station

Source

Table 4. Summary of delay calculations

transmission after the timer is fired.

**4.3.2 Experimental results** 

**Delays Calculations**

investigate some factors which affect the delays, including heterogeneity in sensor manufacturing and payload sizes.

#### **4.3.1 Timestamp measurements and delay calculations**

Details of timestamping scenario and delay calculations are given. As the base station does not know when the source is booted, at the beginning it broadcasts the control packet periodically. The periodic broadcast was set to 1 second. After the source is booted, it starts its transmission after the packet has been received. Similarly, the base station starts the next transmission after it has received the packet back from the source. Packet timestamping mechanisms and delay calculations are respectively illustrated in Fig. 6 and Table 4.

According to Fig. 6, the base station is booted at *x0*. When the base station is ready to send, the timer is set to be fired at *x1* and send command is called at *x2*. A timer is used in order to trigger packet transmission. Prior to transmission, the base station sets some fields in the message structure such as its id and transmission power. The SFD (Start of Frame Delimiter) transmission occurs at *x3*. The timestamp is created and the packet payload content is modified to include the time of the transmission. Therefore, the fire-to-send and send command delays of the base station are equal to *x2* – *x1* and *x3* – *x2*. The packet is completely transmitted by the radio at *x4* and the transmission delay is *x4* – *x3*.

Fig. 6. Timestamp at various events

After being booted at *y0*, the source receives the SFD at *y1*. The receive event of the radio and application are signalled at *y2* and *y3* when the source receives the packet. The reception and receive delays of the base station are therefore *y2* - *y1* and *y3* – *y2*. Once the packet has been received, the source requires some duration to process the information obtained from the packet. It then sets up its own transmission and the bits of packet are loaded into the radio buffer. The timer is fired at *y4* and the send command is called at *y5*. The SFD is transmitted at *y6*. Hence, the send command delay of the source is equal to *y6* – *y5*. The transmission delay is *y7* – *y6*. Table 4 summarises the delay calculations.

investigate some factors which affect the delays, including heterogeneity in sensor

Details of timestamping scenario and delay calculations are given. As the base station does not know when the source is booted, at the beginning it broadcasts the control packet periodically. The periodic broadcast was set to 1 second. After the source is booted, it starts its transmission after the packet has been received. Similarly, the base station starts the next transmission after it has received the packet back from the source. Packet timestamping

According to Fig. 6, the base station is booted at *x0*. When the base station is ready to send, the timer is set to be fired at *x1* and send command is called at *x2*. A timer is used in order to trigger packet transmission. Prior to transmission, the base station sets some fields in the message structure such as its id and transmission power. The SFD (Start of Frame Delimiter) transmission occurs at *x3*. The timestamp is created and the packet payload content is modified to include the time of the transmission. Therefore, the fire-to-send and send command delays of the base station are equal to *x2* – *x1* and *x3* – *x2*. The packet is completely

After being booted at *y0*, the source receives the SFD at *y1*. The receive event of the radio and application are signalled at *y2* and *y3* when the source receives the packet. The reception and receive delays of the base station are therefore *y2* - *y1* and *y3* – *y2*. Once the packet has been received, the source requires some duration to process the information obtained from the packet. It then sets up its own transmission and the bits of packet are loaded into the radio buffer. The timer is fired at *y4* and the send command is called at *y5*. The SFD is transmitted at *y6*. Hence, the send command delay of the source is equal to *y6* – *y5*. The transmission

mechanisms and delay calculations are respectively illustrated in Fig. 6 and Table 4.

manufacturing and payload sizes.

Fig. 6. Timestamp at various events

delay is *y7* – *y6*. Table 4 summarises the delay calculations.

**4.3.1 Timestamp measurements and delay calculations** 

transmitted by the radio at *x4* and the transmission delay is *x4* – *x3*.


Table 4. Summary of delay calculations

According to Table 4, the transmission and reception delays are calculated based upon when the events take place. The transmission delay is defined as the duration required for the radio to transmit the packet. In TinyOS 2.x, the CC2420Transmit interface provides a sendDone() event which notifies packet transmission completion. The reception delay is the duration required for packet reception by the radio, and the receive event is used for the timestamp. The fire-to-send delay indicates the desired interval for starting packet transmission after the timer is fired.

One Tmote Sky base station and one Tmote Invent source were used. The source was located at 0.5 m away from the base station. The base station was plugged into a desktop computer. In total 1,000 cycles of message exchange were run for each source. After the packet had been received, the node waited for 128ms and initiates its data transmission.

#### **4.3.2 Experimental results**

In order to consider the effects of payload size, an additional experiment was conducted. The scenario shown in Fig. 6 was used. All settings are the same except the payload sizes. In total five payload sizes were used including 39, 55, 75, 95 and 115 bytes. Note that the maximum payload for the CC2420 radio is limited to 117 bytes whilst the header size is 11 bytes. Send command and transmission delays of the source were determined. Two-way propagation delays were also computed. In the case of 39 bytes, reception and receive delays of source and base station were observed whilst all delays were observed for the larger payload sizes.

Statistical analysis of fire-to-send, send and transmission delays in milliseconds were conducted. The relationships between the 50th percentiles or medians of all sending delays and payload sizes are shown in Fig. 7. Note that "Send Command" delay is represented as "Send" in the figure. The results show that all delays increase with increasing payload sizes. The source requires more time to deliver larger packets to the radio. Similarly, larger packets require a longer duration for transmission. Increases in send command and transmission delays are greater than those of fire-to-send delay.

Statistical analyses of reception and receive delays in milliseconds were also made. The relationships between the 50th percentiles or medians of both receiving delays and payload sizes are shown in Fig. 8. Linear relationship between reception delay and payload size is also observed in Fig. 8. The receive delays are constant for all payload sizes.

Cycles 999 1,000 1,000 1,000 999

This section describes the design of PoRAP (Power & Reliability Aware Protocol) which aims at minimising communication energy in wireless sensor network (WSN). The

In PoRAP, power can be conserved via transmission power adaptation and efficient medium access management. The selected link quality index is Received Signal Strength Indicator (RSSI) and it is measured by the base station during data reception. Along with the awareness of data loss, the adjusted power will often maintain the network operating at the

Additional communication can be saved by adopting the schedule-based MAC approach. Sending and receiving delays can be estimated as they are dependent upon packet size whilst two-way propagation delay is significantly small. Data transmissions are scheduled and the sources are mostly in sleep mode to conserve energy. Only one source engages the shared medium at a time for data transmission. Thus, data collision can be avoided and idle listening can be minimised. More explanations on PoRAP key capabilities are given as

In the single-hop networks, sources are capable of communicating with their base station directly. This scenario is feasible when the sources and base station are located within communication range of each other. The base station may be connected to several sensors which require an access to the shared medium. Uncontrolled medium access possibly leads to data collisions at the base station. Collision is one of the main sources of power wastage in the WSN shared medium system. The medium access control (MAC) approach attempts collision avoidance. There are currently two main approaches proposed for WSN. Firstly, the medium is sensed to detect any ongoing activities in the medium before conducting data

PoRAP employs another approach in which each node is assigned a specific duration to use the shared medium. This scheme is called schedule-based. The other sensors cannot access and use the medium whilst a sensor is communicating within its time slot. Sources listen to the base station only once in a frame. Idle listening is therefore minimised. Moreover, data collisions at the base station can be avoided as there is only one source sending at a time. The slot length should be long enough to let the source and base station complete data transmission and reception. This scheme may not be suitable in the case of multi-hop WSN where each resource-constrained sensor has to maintain slot information

**39 55 75 95 115** 

0 858 807 785 755 740 1 141 193 212 245 259 2 0 0 3 0 0

**Attribute Payload Size (bytes)** 

Table 5. Frequencies of two-way propagation delays

experimental results stated in previous section inform the design.

transmission and reception. This scheme is named contention-based.

Frequencies

follows:

**5. Design of PoRAP** 

**5.1 PoRAP main capabilities** 

region where data loss is minimised.

**5.1.1 Schedule-based protocol** 

The 32-KHz clock has been used in this experimental study and provides 32,768 ticks per second. There are 32 ticks in one millisecond. Therefore, the finest precision is approximately 0.03125 millisecond or 31.25 microseconds. The two-way propagation delays for all payload sizes are calculated and frequencies of the delay occurrences in ticks are shown in Table 5.

According to Table 5, frequencies of the 0-tick decrease with increasing payload sizes. Larger packets require more time to travel from source to destination. However, the twoway propagation delays are significantly less than the other delays.

Fig. 7. Relationships between source sending delays and payload sizes

Fig. 8. Relationships between source receiving delays and payload sizes

The 32-KHz clock has been used in this experimental study and provides 32,768 ticks per second. There are 32 ticks in one millisecond. Therefore, the finest precision is approximately 0.03125 millisecond or 31.25 microseconds. The two-way propagation delays for all payload sizes are calculated and frequencies of the delay occurrences in ticks are

According to Table 5, frequencies of the 0-tick decrease with increasing payload sizes. Larger packets require more time to travel from source to destination. However, the two-

way propagation delays are significantly less than the other delays.

Fig. 7. Relationships between source sending delays and payload sizes

Fig. 8. Relationships between source receiving delays and payload sizes

shown in Table 5.


Table 5. Frequencies of two-way propagation delays
