**5.1 PoRAP main capabilities**

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 region where data loss is minimised.

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 follows:

#### **5.1.1 Schedule-based protocol**

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 transmission and reception. This scheme is named contention-based.

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

barriers which affect signal attenuation. Received signal strength estimation is unlikely as sensors can be placed in various areas of interest. An estimation model should not only determine distance between sender and receiver as an input, location should also be taken into account. A shorter distance may not always provide a higher received strength if a physical barrier appears in the communication line-of-sight (LOS). Moreover, the link quality metrics fluctuate over the time of day. The observed strength in an indoor environment may be lower during the nighttime. Applying the simple received signal strength estimation models, focusing mainly on distance and hardware properties, may not be sufficient. Therefore, PoRAP employs the measurement-based approach in order to more

Two link quality metrics are used in PoRAP. The RSSI is obtained by the radio chip whilst the PRR is specified by the applications. The relationship between RSSI and PRR can relate the application requirement to the observed link quality. As shown in Section 4.2.5, a clear relationship between the two metrics is established. The PRR steeply increases with the RSSI up to a certain point. The PRR is then stable after a certain value of RSSI and a lower RSSI or

The range of required RSSI is obtained from the reliability requirement and the RSSI-PRR relationship. This range is recognised by the base station. Upon data reception, the base station measures the RSSI and compares it to the RSSI thresholds. The adaptation bits are set with respect to the comparison result. There are three available patterns of bit settings; the transmission power will be increased if the measured RSSI is lower than require and it will be decreased if the RSSI is higher. The sources will be notified to retain the current power if

This section aims to describe PoRAP architecture. PoRAP aims at an efficient data delivery in WSN by means of energy conservation. Input of PoRAP comes from two external components, the user/application and the monitored phenomenon. PoRAP recognises the duty cycle and the awareness of data loss. The sensed data is another input and it will be sent from the source to the base station. In order to achieve the goals, the base station controls the sources whereas the sources send data to the base station. Required functionalities of the base station and the sources are then stated. The interactions between them are described and they are used to address the required components within the source and the base station. Moreover, the interactions between such components are also given in

The main objective of PoRAP development is to provide an efficient data communication in WSN where the user/application has his/its own requirements such as reliability and duty cycle. The development of a generic network protocol for WSN is challenging as WSN are application specific. Fig. 9 shows an overview of PoRAP architecture in terms of the

According to Fig. 9, four main components are addressed including the user/application, sensed phenomenon, base station and sources. As WSN is application specific, the user/application has its own set of requirements. The base station directly interacts with the user/application whilst the sources collect physical directly from the phenomenon. The

functionalities required at the base station and source can be listed as follows:

accurately adapt the transmission power.

TX can be used to obtain the required PRR.

the RSSI is within the range.

**5.2 PoRAP architecture** 

**5.2.1 Overview of PoRAP** 

interactions between its main components.

this section.

of its neighbours. Furthermore, time synchronisation is required as both sender and receiver have to orchestrate the data communications to avoid collision caused by the other receivers.

Centralised scheduling control by the base station is feasible in PoRAP. Slot arrangement information can be sent to all sensors located in the range. The base station broadcasts a packet to all sources located in its range. Slot information such as number of slots, slot length and start time of first slot are included in the payload. Once the first frame is finished, the base station broadcasts again with the transmission power adaptation notification.

#### **5.1.2 Communication power conservation**

Power constraint should be taken into account when designing a protocol for WSN. Sensors may be left unattended after being deployed in the remote or hostile environment where battery recharge or replacement may be costly or infeasible. Communication accounts for power consumption in WSN. Several sensor platforms provide adaptation to the transmitting power and the concept of Transmission Power Control (TPC) has been adapted to WSN. The CC2420 radio employed by Tmote platform, which is used in this research, supports transmission power (TX) setting. The TX levels are stated by a 5-bit number. There are therefore 32 possible TX settings provided by the CC2420. In TinyOS, the setPower() command provided by CC2420Packet interface accepts a value between 0 to 31 for TX setting. However, the CC2420 datasheet specifies programmable TX in 8 steps from approximately -25 to 0dBm which are respectively equivalent to the power levels of 3 and 31. The Tmote datasheet follows guidelines given by the CC2420.

Transmission power adaptation policies in WSN should take application specifics into account. Different applications may require the sources to transmit data at different rates. For example, an environmental monitoring system may require the current temperature hourly whilst a surveillance system may require the data every second when an intrusion is detected. The sensors should be switched to sleep mode after transmission in order to minimise the idle listening. In a multi-hop network, each node is responsible for routing. It has to communicate with its neighbours to discover the best path by means of the least power utilisation. An amount of power is therefore required for listening in the multi-hop. However, a sensor in the single-hop scenario is capable of transmitting data directly to the base station. It may be switched to sleep mode after transmission. However, the source has to listen during the control slot transmission from the base station.

The power adaptation mechanisms in PoRAP do not require historic entries of RSSI and associated transmission power. The main reason is the limitation of buffering capacity of the radio chip. The base station should support a significant number of sources. In the CC2420 radio, the maximum buffer size is 128 bytes. Some bytes are required for the header and other controlling details. Only two bits are used to notify the power adaptation. The RSSI-PRR relationship obtained from the experimental studies is considered for adaptation as it suggests the operating region for WSN. In the case of power adaptation, the base station sets particular bits to notify the source. The sources get the bits and set their transmission power accordingly.

#### **5.1.3 Link quality monitoring**

Radio communication uses air as the transmission medium. There are several attributes ranging from differences in hardware components to environmental factors such as physical

of its neighbours. Furthermore, time synchronisation is required as both sender and receiver have to orchestrate the data communications to avoid collision caused by the

Centralised scheduling control by the base station is feasible in PoRAP. Slot arrangement information can be sent to all sensors located in the range. The base station broadcasts a packet to all sources located in its range. Slot information such as number of slots, slot length and start time of first slot are included in the payload. Once the first frame is finished, the base station broadcasts again with the transmission power adaptation

Power constraint should be taken into account when designing a protocol for WSN. Sensors may be left unattended after being deployed in the remote or hostile environment where battery recharge or replacement may be costly or infeasible. Communication accounts for power consumption in WSN. Several sensor platforms provide adaptation to the transmitting power and the concept of Transmission Power Control (TPC) has been adapted to WSN. The CC2420 radio employed by Tmote platform, which is used in this research, supports transmission power (TX) setting. The TX levels are stated by a 5-bit number. There are therefore 32 possible TX settings provided by the CC2420. In TinyOS, the setPower() command provided by CC2420Packet interface accepts a value between 0 to 31 for TX setting. However, the CC2420 datasheet specifies programmable TX in 8 steps from approximately -25 to 0dBm which are respectively equivalent to the power levels of 3 and

Transmission power adaptation policies in WSN should take application specifics into account. Different applications may require the sources to transmit data at different rates. For example, an environmental monitoring system may require the current temperature hourly whilst a surveillance system may require the data every second when an intrusion is detected. The sensors should be switched to sleep mode after transmission in order to minimise the idle listening. In a multi-hop network, each node is responsible for routing. It has to communicate with its neighbours to discover the best path by means of the least power utilisation. An amount of power is therefore required for listening in the multi-hop. However, a sensor in the single-hop scenario is capable of transmitting data directly to the base station. It may be switched to sleep mode after transmission. However, the source has

The power adaptation mechanisms in PoRAP do not require historic entries of RSSI and associated transmission power. The main reason is the limitation of buffering capacity of the radio chip. The base station should support a significant number of sources. In the CC2420 radio, the maximum buffer size is 128 bytes. Some bytes are required for the header and other controlling details. Only two bits are used to notify the power adaptation. The RSSI-PRR relationship obtained from the experimental studies is considered for adaptation as it suggests the operating region for WSN. In the case of power adaptation, the base station sets particular bits to notify the source. The sources get the bits and set their transmission power

Radio communication uses air as the transmission medium. There are several attributes ranging from differences in hardware components to environmental factors such as physical

other receivers.

notification.

accordingly.

**5.1.3 Link quality monitoring** 

**5.1.2 Communication power conservation** 

31. The Tmote datasheet follows guidelines given by the CC2420.

to listen during the control slot transmission from the base station.

barriers which affect signal attenuation. Received signal strength estimation is unlikely as sensors can be placed in various areas of interest. An estimation model should not only determine distance between sender and receiver as an input, location should also be taken into account. A shorter distance may not always provide a higher received strength if a physical barrier appears in the communication line-of-sight (LOS). Moreover, the link quality metrics fluctuate over the time of day. The observed strength in an indoor environment may be lower during the nighttime. Applying the simple received signal strength estimation models, focusing mainly on distance and hardware properties, may not be sufficient. Therefore, PoRAP employs the measurement-based approach in order to more accurately adapt the transmission power.

Two link quality metrics are used in PoRAP. The RSSI is obtained by the radio chip whilst the PRR is specified by the applications. The relationship between RSSI and PRR can relate the application requirement to the observed link quality. As shown in Section 4.2.5, a clear relationship between the two metrics is established. The PRR steeply increases with the RSSI up to a certain point. The PRR is then stable after a certain value of RSSI and a lower RSSI or TX can be used to obtain the required PRR.

The range of required RSSI is obtained from the reliability requirement and the RSSI-PRR relationship. This range is recognised by the base station. Upon data reception, the base station measures the RSSI and compares it to the RSSI thresholds. The adaptation bits are set with respect to the comparison result. There are three available patterns of bit settings; the transmission power will be increased if the measured RSSI is lower than require and it will be decreased if the RSSI is higher. The sources will be notified to retain the current power if the RSSI is within the range.

#### **5.2 PoRAP architecture**

This section aims to describe PoRAP architecture. PoRAP aims at an efficient data delivery in WSN by means of energy conservation. Input of PoRAP comes from two external components, the user/application and the monitored phenomenon. PoRAP recognises the duty cycle and the awareness of data loss. The sensed data is another input and it will be sent from the source to the base station. In order to achieve the goals, the base station controls the sources whereas the sources send data to the base station. Required functionalities of the base station and the sources are then stated. The interactions between them are described and they are used to address the required components within the source and the base station. Moreover, the interactions between such components are also given in this section.

#### **5.2.1 Overview of PoRAP**

The main objective of PoRAP development is to provide an efficient data communication in WSN where the user/application has his/its own requirements such as reliability and duty cycle. The development of a generic network protocol for WSN is challenging as WSN are application specific. Fig. 9 shows an overview of PoRAP architecture in terms of the interactions between its main components.

According to Fig. 9, four main components are addressed including the user/application, sensed phenomenon, base station and sources. As WSN is application specific, the user/application has its own set of requirements. The base station directly interacts with the user/application whilst the sources collect physical directly from the phenomenon. The functionalities required at the base station and source can be listed as follows:

1. PoRAP focuses on the set of fixed sources which are located within communication range of the base station. The control packet includes scheduling and power adaptation notification and is broadcast to the sources using the maximum power level. This is

3. After conducting time synchronisation and transmission power adaptation, the source waits for its slot to conduct data transmission using the adjusted transmission power.

4. The base station measures the RSSI during data reception. The observed RSSI is compared to the desired range which includes minimum and maximum values. The setting of the RSSI thresholds is obtained from the RSSI-PRR relationship. The selected RSSI should be obtained from the region where significant stability in the PRR is observed. The base station then decides whether transmission power adaptation is

5. The source stops its radio after transmission to save power. The amount of power consumption is the least when the source is in sleep mode. Timing is required for the

The previous section points out several essential functions which are required to achieve the objectives of PoRAP development. This section aims to describe the essential components which give rise to this functionality. The selected operating system for WSN in this work is TinyOS which already provides several useful components and PoRAP takes those in TinyOS and adds some further modifications. The main components are determined from the interactions including the user/application, the observed phenomenon, the base station and source. Several components required at the base station and source are then considered.

The base station recognises the requirements of the user/application and controls the sources based upon the requirements. As PoRAP aims at the direct communication, the control information is broadcast to the sources which are located within the communication range. After physical data collection, the sources set their communication parameters prior to data transmissions. Fig. 11 depicts several components required at the base station and sources.

source to start the radio again for the next communication cycle.

Moreover, the interactions between each component are demonstrated.

feasible as the base station obtains extra power from the connecting computer. 2. Once the control packet is received by the source. Information on scheduling and notification is read. The source synchronises its schedule with the other nodes together

with adjusting its transmission power accordingly.

The radio must be started for communication.

required. The notification is set accordingly.

**5.2.2 Components** 

*A) Components at base station and sources* 

Fig. 11. Components at base station and sources

Fig. 9. Overview of PoRAP

#### **Base station:**


#### **Source:**


Several interactions between the source and base station are required to achieve the functional requirements and they are addressed in Fig. 10.

Fig. 10. Interaction between sources and base station

 **Recognise the requirements of user/application:** PoRAP aims at the low duty cycle application where the key objective is power conservation instead of throughput. Examples of this application category are habitat and environmental monitoring systems. **Control the source's operation:** This work focuses on the single-hop network where direct communication between sources and base station is feasible. No routing is required at each source and its operation is controlled by the base station in two aspects. Firstly, the base station determines whether transmission power used by the source needs to be adjusted by looking at the RSSI. Secondly, the communication cycle of each source is scheduled in order to avoid data collision and minimise idle listening.

 **Collect physical data:** WSN has been deployed to collect physical data from the targeted environment such as temperature and humidity. This work looks at how an efficient data delivery can be achieved by using lower transmission power whilst data loss is minimised. The processes of data collection are outside the scope of this study. **Data transmission:** After receiving the control information, the source sets two parameters. Firstly, it synchronises the communication schedule. Thus it will know when to start the radio for control reception and data transmission. Secondly, the source adapts its transmission power level according to the included notification. Lower power

can be used and a significant amount of transmission power can be conserved. Several interactions between the source and base station are required to achieve the

functional requirements and they are addressed in Fig. 10.

Fig. 10. Interaction between sources and base station

Fig. 9. Overview of PoRAP

**Base station:** 

**Source:** 


#### **5.2.2 Components**

The previous section points out several essential functions which are required to achieve the objectives of PoRAP development. This section aims to describe the essential components which give rise to this functionality. The selected operating system for WSN in this work is TinyOS which already provides several useful components and PoRAP takes those in TinyOS and adds some further modifications. The main components are determined from the interactions including the user/application, the observed phenomenon, the base station and source. Several components required at the base station and source are then considered. Moreover, the interactions between each component are demonstrated.

#### *A) Components at base station and sources*

The base station recognises the requirements of the user/application and controls the sources based upon the requirements. As PoRAP aims at the direct communication, the control information is broadcast to the sources which are located within the communication range. After physical data collection, the sources set their communication parameters prior to data transmissions. Fig. 11 depicts several components required at the base station and sources.

Fig. 11. Components at base station and sources

The base station acts as a destination for the data. The requirements are stored in the memory and they are used to set required RSSI range and the data sending rate. In PoRAP, the schedule-based scheme is adopted where each source has its own slot for data transmission. The slot must be large enough to accommodate several communication delays. According to the results in Section 4.3.2, sending and receiving delays are mainly dependent upon the packet size whereas the two-way propagation delay is significantly small. Models are required for estimating the slot size and they will be described later in this chapter. The next transmission begins after the other sources have already transmitted. Hence, PoRAP suits the applications which require a low duty cycle. The timer is used for scheduling the communications so it also uses this requirement from the

The required RSSI range can be obtained from the RSSI-PRR relationship which is dependent upon different conditions such as time-of-day, environment and location of deployment. The PRR is also used as an additional link quality metric as it is close to the reliability requirement. The main objective of PoRAP is to conserve communication energy whilst data loss is minimised. In the short term, the base station measures the RSSI when it receives the data packet. It uses the observed RSSI to determine whether power adaptation is required. The notification bits which are reserved for each source are then set. In the medium or longer term, the base station measures the PRR and uses that to determine what the upper and lower RSSI bounds should be. If more packets are lost, the RSSI bounds are increased. However, the bounds are slowly lowered to reduce power expenditure if the loss is low or non-existence. The number of notification bits is crucial as the base station has to communicate with all the sources in its range. Using too many bits may lead to a control

The base station radio is not started or stopped as it has to continually receive the data packets from its sources. Data packet receptions occur after broadcasting the control packet at the maximum transmission power level. This concept is feasible as the base station has an

packet which is larger than the buffering capacity of the radio chip.

Fig. 12. Interactions between components

**Base station** 

application.

Each of the required components is described as follows:

	- o *Data communications:* Control information is sent by the base station's radio chip and is received by the source's radio chip. Data is sent by the source's radio chip and is received by the base station's radio chip.
	- o *Data buffering:* Prior to forwarding the received data to the higher layers or transmitting the data through the medium, the data is buffered. The buffering capacity is limited and dependent upon the radio chip. The capacity is important to the design of packet structures. For example, the control packet must not be longer than the allowable capacity but it has to carry all the required information.
	- o *Received signal strength measurement:* The received signal strength is important as it can reflect the current link quality. The latest radio chip provides the measurement of received signal strength such as Received Signal Strength Indicator (RSSI) and Link Quality Indication (LQI). RSSI is used in this work as it can be obtained from several radio models and its relationship with the Packet Reception Rate (PRR) is clear.
	- o *Transmission power adaptation:* The RSSI changes with transmission power and several factors such as location, time-of-day and environment. One of the main features in PoRAP is transmission power adaptation. The key concept is adjusting the current transmission power to achieve the power conservation and data loss minimisation. The latest radio model supports programmable transmission power.

#### *B) Interactions between components*

This section aims at addressing the interactions between the components, and they are described in Fig. 12. The interactions within the base station and source can be separately described as follows:

 **Radio:** Each sensor employs the radio communication for wirelessly communicating with its neighbours or destinations. The radio has four major functions as follows:

> o *Data communications:* Control information is sent by the base station's radio chip and is received by the source's radio chip. Data is sent by the

> o *Received signal strength measurement:* The received signal strength is important as it can reflect the current link quality. The latest radio chip provides the measurement of received signal strength such as Received Signal Strength Indicator (RSSI) and Link Quality Indication (LQI). RSSI is used in this work as it can be obtained from several radio models and its

> o *Transmission power adaptation:* The RSSI changes with transmission power and several factors such as location, time-of-day and environment. One of the main features in PoRAP is transmission power adaptation. The key concept is adjusting the current transmission power to achieve the power conservation and data loss minimisation. The latest radio model supports

relationship with the Packet Reception Rate (PRR) is clear.

 **Timer:** WSN is considered a share-medium system as all nodes have to access the medium prior to transmission. PoRAP aims at single-hop WSN where direct communication between source and base station is feasible. The sources are not responsible for routing. Instead of applying the contention-based scenario, the transmissions are scheduled. A slot is allocated for each source so that it can send only when its slot arrives. Otherwise, the radio is stopped and the source is switched to sleep mode for minimum energy consumption. A timer is therefore required for scheduling

 **Control:** It is used to control the other components especially when there is no control mechanism provided for some components. For example, an additional control interface is required for the radio and the interface is used to start and stop the radio. **Memory:** This component is the basic one which is also included in the sensor. Several variables along with their values and measurements are stored in the memory. For example, the required RSSI range which is obtained from the RSSI-PRR relationship. This range is stored in the memory and will be compared to the observed RSSI to

 **Sensor board:** This component is crucial for the sensors as it is responsible for collecting the physical data from the environment. The sensor board consists of several sensors

This section aims at addressing the interactions between the components, and they are described in Fig. 12. The interactions within the base station and source can be separately

source's radio chip and is received by the base station's radio chip. o *Data buffering:* Prior to forwarding the received data to the higher layers or transmitting the data through the medium, the data is buffered. The buffering capacity is limited and dependent upon the radio chip. The capacity is important to the design of packet structures. For example, the control packet must not be longer than the allowable capacity but it has to

Each of the required components is described as follows:

carry all the required information.

programmable transmission power.

determine whether any transmission power adaptation is required.

the radio start and stop.

such as temperature and humidity.

*B) Interactions between components* 

described as follows:

Fig. 12. Interactions between components

#### **Base station**

The base station acts as a destination for the data. The requirements are stored in the memory and they are used to set required RSSI range and the data sending rate. In PoRAP, the schedule-based scheme is adopted where each source has its own slot for data transmission. The slot must be large enough to accommodate several communication delays. According to the results in Section 4.3.2, sending and receiving delays are mainly dependent upon the packet size whereas the two-way propagation delay is significantly small. Models are required for estimating the slot size and they will be described later in this chapter. The next transmission begins after the other sources have already transmitted. Hence, PoRAP suits the applications which require a low duty cycle. The timer is used for scheduling the communications so it also uses this requirement from the application.

The required RSSI range can be obtained from the RSSI-PRR relationship which is dependent upon different conditions such as time-of-day, environment and location of deployment. The PRR is also used as an additional link quality metric as it is close to the reliability requirement. The main objective of PoRAP is to conserve communication energy whilst data loss is minimised. In the short term, the base station measures the RSSI when it receives the data packet. It uses the observed RSSI to determine whether power adaptation is required. The notification bits which are reserved for each source are then set. In the medium or longer term, the base station measures the PRR and uses that to determine what the upper and lower RSSI bounds should be. If more packets are lost, the RSSI bounds are increased. However, the bounds are slowly lowered to reduce power expenditure if the loss is low or non-existence. The number of notification bits is crucial as the base station has to communicate with all the sources in its range. Using too many bits may lead to a control packet which is larger than the buffering capacity of the radio chip.

The base station radio is not started or stopped as it has to continually receive the data packets from its sources. Data packet receptions occur after broadcasting the control packet at the maximum transmission power level. This concept is feasible as the base station has an

PoRAP repetitively increases or decreases the transmission power within an allowable range

In PoRAP, a frame is used to represent a communication cycle which consists of one control

*G* indicates the guard of the frame and is used to protect frame overlapping. A control slot is used by the base station for broadcasting control data which includes scheduling information and transmission power (TX) adaptation notification to its sources. The slot information is required by the sources in order to synchronise themselves to the base station. The time of starting the first data slot is required so that the sources know when data is sent. In PoRAP, each slot has the same length which should accommodate a specific

According to Fig. 13, the sources firstly turn their radios on during the control slot to receive the control information. If they are not assigned to the first data slot, they stop the radios after knowing when their slots start. When their slots arrive, the radios are re-started to send the data. Unlike sources, the base station listens to the medium for data packet reception all

There are four main delay components in Fig. 14. The *G* and *P* are respectively the guard time and propagation delay. The first component is the guard length which prevents the slots from overlapping. Feasible overlapping scenarios together with guard time consideration are provided later in this section. The second component consists of fire-tosend (F2S), send and transmission delays and this is the sending delay component. This

slot at the beginning followed by several data slots. Its structure is shown in Fig. 13.

instead of discovering the right power.

Fig. 13. Frame structure

Fig. 14. Data slot decomposition

**5.2.4 Frame structure and slot decomposition** 

data payload size to be completely transmitted and received.

the time. The decomposition of a slot is depicted in Fig. 14.

extra source of power from its connecting computer. In PoRAP, the power conservation goal is mainly located at the sources.

#### **Source**

In WSN, the source is responsible for physical data collection. The data is then transmitted to the base station. The key objective of PoRAP is to conserve communication power of the source. Prior to transmission, the source determines whether it has to adapt its current power. The notification is included in the control packet and it is received by the radio of the source. As the buffering capacity of the radio is limited, the base station notifies what the source should do to its current power instead of specifying the appropriate power level. Thus, the source has to store the current power in the memory. For example, the current power is increased if a lower RSSI is measured by the base station. Moreover, the source should recognise the limitations of the transmission power adaptation. The base station may need its source to increase the power even if the maximum has already been reached. The minimum and maximum power levels are dependent upon the selected radio chip.

Apart from the power adaptation signaling, the scheduling is also included in the control packet. Time synchronisation is crucial in the schedule-based approach. The local clock of each node may run at different speeds. In PoRAP, the sources synchronise with their base station. The synchronisation refers to several timestamps which are conducted at the MAC layer where hardware and operating system dependent delays can be disregarded. The scheduling is also recognised by timer and controls components. Several timers are required as they are responsible for timing the sending and receiving communications. The timers operate closely with the control in order to start and stop the radio. For example, the radio is stopped after the data packet is sent. The source knows when it has to wake up to receive the next control packet. The timer is then started, counting the generated ticks. A control interface is used to start the radio for control reception when the scheduled time has come.

#### **5.2.3 Transmission power adaptation policies**

A sensor consists of hardware components working together to facilitate sensing, processing and communicating tasks. Amongst these components, the transceiver or radio unit is responsible for data communication. Normally, the radio unit supports programmable transmission power and the possible adaptable range is given in the datasheet. For example, the Tmote sensor platform which is chosen for this work employs the CC2420 radio. The minimum and maximum powers are 0 and -25dBm, respectively. There are two main factors which should be taken into account when transmission power adaptation is required. Several hardware limitations of the radio unit include the allowable minimum, maximum transmission power and base noise. The environmental factors leading to signal strength attenuation should be determined. The selected transmission power should be high enough to produce the associated receiving strength which is not discarded by the receiving node. The maximum power allowed by the radio unit is used as the upper limit. In PoRAP, sources use maximum power for their first transmissions. This policy ensures that the packets will likely be transmitted to the base station. However, both base noise and attenuation are respectively hardware and environment dependent. It is difficult to specify an accurate power adaptation level which can be generally used. Moreover, additional resources will be required if the sources periodically measure and send their base noise to the base station. Attenuation is hard to predict as link quality changes over time. Hence,

extra source of power from its connecting computer. In PoRAP, the power conservation goal

In WSN, the source is responsible for physical data collection. The data is then transmitted to the base station. The key objective of PoRAP is to conserve communication power of the source. Prior to transmission, the source determines whether it has to adapt its current power. The notification is included in the control packet and it is received by the radio of the source. As the buffering capacity of the radio is limited, the base station notifies what the source should do to its current power instead of specifying the appropriate power level. Thus, the source has to store the current power in the memory. For example, the current power is increased if a lower RSSI is measured by the base station. Moreover, the source should recognise the limitations of the transmission power adaptation. The base station may need its source to increase the power even if the maximum has already been reached. The

minimum and maximum power levels are dependent upon the selected radio chip.

Apart from the power adaptation signaling, the scheduling is also included in the control packet. Time synchronisation is crucial in the schedule-based approach. The local clock of each node may run at different speeds. In PoRAP, the sources synchronise with their base station. The synchronisation refers to several timestamps which are conducted at the MAC layer where hardware and operating system dependent delays can be disregarded. The scheduling is also recognised by timer and controls components. Several timers are required as they are responsible for timing the sending and receiving communications. The timers operate closely with the control in order to start and stop the radio. For example, the radio is stopped after the data packet is sent. The source knows when it has to wake up to receive the next control packet. The timer is then started, counting the generated ticks. A control interface is used to start the radio for control reception when

A sensor consists of hardware components working together to facilitate sensing, processing and communicating tasks. Amongst these components, the transceiver or radio unit is responsible for data communication. Normally, the radio unit supports programmable transmission power and the possible adaptable range is given in the datasheet. For example, the Tmote sensor platform which is chosen for this work employs the CC2420 radio. The minimum and maximum powers are 0 and -25dBm, respectively. There are two main factors which should be taken into account when transmission power adaptation is required. Several hardware limitations of the radio unit include the allowable minimum, maximum transmission power and base noise. The environmental factors leading to signal strength attenuation should be determined. The selected transmission power should be high enough to produce the associated receiving strength which is not discarded by the receiving node. The maximum power allowed by the radio unit is used as the upper limit. In PoRAP, sources use maximum power for their first transmissions. This policy ensures that the packets will likely be transmitted to the base station. However, both base noise and attenuation are respectively hardware and environment dependent. It is difficult to specify an accurate power adaptation level which can be generally used. Moreover, additional resources will be required if the sources periodically measure and send their base noise to the base station. Attenuation is hard to predict as link quality changes over time. Hence,

is mainly located at the sources.

the scheduled time has come.

**5.2.3 Transmission power adaptation policies** 

**Source** 

PoRAP repetitively increases or decreases the transmission power within an allowable range instead of discovering the right power.

#### **5.2.4 Frame structure and slot decomposition**

In PoRAP, a frame is used to represent a communication cycle which consists of one control slot at the beginning followed by several data slots. Its structure is shown in Fig. 13.

*G* indicates the guard of the frame and is used to protect frame overlapping. A control slot is used by the base station for broadcasting control data which includes scheduling information and transmission power (TX) adaptation notification to its sources. The slot information is required by the sources in order to synchronise themselves to the base station. The time of starting the first data slot is required so that the sources know when data is sent. In PoRAP, each slot has the same length which should accommodate a specific data payload size to be completely transmitted and received.

Fig. 13. Frame structure

According to Fig. 13, the sources firstly turn their radios on during the control slot to receive the control information. If they are not assigned to the first data slot, they stop the radios after knowing when their slots start. When their slots arrive, the radios are re-started to send the data. Unlike sources, the base station listens to the medium for data packet reception all the time. The decomposition of a slot is depicted in Fig. 14.

Fig. 14. Data slot decomposition

There are four main delay components in Fig. 14. The *G* and *P* are respectively the guard time and propagation delay. The first component is the guard length which prevents the slots from overlapping. Feasible overlapping scenarios together with guard time consideration are provided later in this section. The second component consists of fire-tosend (F2S), send and transmission delays and this is the sending delay component. This

results. It is an interval from calling the send() command until capturing the SFD. Several mechanisms undertaken by the application software and operating system to facilitate the sending also require time and are included in the send delay. For example, when the send() command is called by the application, an interrupt is signaled to TinyOS. The packet is buffered and the CC2420 is switched to transmitting mode. This sending overhead due to software manipulation and hardware setup is regardless of payload size. Increases in payload size require additional delays. For example, for every byte increase in the payload size, the send and reception delays of a source respectively increase by 0.043 and 0.076ms. However, the payload size does not affect receive delay. The coefficients can be used to

PoRAP is developed to effectively support data communication in single-hop wireless sensor network (WSN). The base station communicates with its sources for controlling and data collection purposes. As the base station does not know when each source is booted, a setup process is required at the beginning of frame structure. Acting as a data receiver, the base station always listens to the medium for incoming messages after broadcasting the control packet. Hence, the base station desires extra power which can be obtained from

Prior to data transmission, the sources have to setup their parameters based upon the control information received from their base station. The information such as number of slots, slot length and slot start time is used to control the sources in order to send data within an allocated slot at an adapted transmission power. As the base station has no information on when the sources join the network, it has to discover which sources are booted and ready for communication. In the control and setup phase, the base station periodically broadcasts control packets to all sources located in its communication range. The broadcasted packet is received by the booted sources and they use the received

There are three main parts to the control information included in the control packet. The first attribute indicates the identification of the base station. This field supports a future enhancement of PoRAP which supports the multiple base station system. It can be also used to differentiate between the control and data packets. The second attribute is schedule related. Some information is required by the sources in order to synchronise with their base station. These parameters include the number of slots, slot length and the start time of the first slot. The base station specifies the slot start time with respect to the Start of Frame Delimiter (SFD) transmission in order to minimise the effects of application and hardware processing delays. The source assigned to the first data slot sets its timer to fire and sends data when the time arrives. Other sources start at different times and they compute the starting times from the slot information. The transmission parameters are required to be completely set before the phase begins. Slot length determination for data slot can therefore be applied to the control slot. The base station periodically broadcasts its control packet. There are two main objectives of periodic broadcasting are maintaining synchronisation between nodes and supporting changes in network topology. Additional sources may be booted during the frame and some sources may be running out of energy. The number of

estimate the communication delays.

external sources such as a desktop or laptop computer.

information to setup the communication parameters.

sources is therefore modified by the base station.

**5.2.6 PoRAP scenario** 

*A) Control and setup phase* 

component is caused by the source. The third one is propagation delay which is considerably smaller than the other delays. Finally, the receiving delay component includes the reception and receive delays. This component is considered during packet arrival at the base station.

#### **5.2.5 Estimation of communication delays**

A schedule-based approach is adopted in PoRAP. The base station allocates and manages several time slots. In this work, a set of fixed nodes is determined. The number of data slots is therefore equal to the number of booted sources which are able to receive the control packet broadcast by the base station. The source initiates transmission when its assigned slot arrives. Apart from data slots, a frame also contains a control slot which is used by the base station. The slot must be large enough to accommodate sending and receiving delays to avoid feasible data collisions. As shown in Section 4.3.2, the delays are dependent upon packet sizes. This section analyses these relationships for delay estimations.

The experimental results on delays described in Section 4.3.2 demonstrate linear relationships between delays and data packet sizes. The key objective in this part is to discover the two coefficients obtained from linear regression analyses. The coefficients will be used to establish the models providing estimated delays where payload sizes are input. In total 5 payload sizes including 39, 55, 75, 95 and 115 bytes were varied to investigate changes in delays. Regression analyses have been applied to the results of the sending and receiving delays of the source and the base station. As linear relationships between delays and payload sizes are observed, two coefficients of the linear equation (*c0* and *c1*) are the required output where *c0* is the y-intercept and *c1* is the slope. The Table 6 summarises the coefficients of each delay.

According to Table 6, the coefficients for the base station do not significantly differ from those for the source. The fire-to-send delays of the base station are constant whilst the source provided a linear relationship.


Table 6. Coefficients obtained from experimental results at 99th percentile

In the case where the payload size is zero, a specific duration is still required for header transmission and reception. For CC2420, the header is approximately 11 bytes and requires 0.352ms for the delivery. An additional duration is required for transmitting processes which can be considered as an overhead. The send delay is the largest of the experimental

component is caused by the source. The third one is propagation delay which is considerably smaller than the other delays. Finally, the receiving delay component includes the reception and receive delays. This component is considered during packet arrival at the

A schedule-based approach is adopted in PoRAP. The base station allocates and manages several time slots. In this work, a set of fixed nodes is determined. The number of data slots is therefore equal to the number of booted sources which are able to receive the control packet broadcast by the base station. The source initiates transmission when its assigned slot arrives. Apart from data slots, a frame also contains a control slot which is used by the base station. The slot must be large enough to accommodate sending and receiving delays to avoid feasible data collisions. As shown in Section 4.3.2, the delays are dependent upon

The experimental results on delays described in Section 4.3.2 demonstrate linear relationships between delays and data packet sizes. The key objective in this part is to discover the two coefficients obtained from linear regression analyses. The coefficients will be used to establish the models providing estimated delays where payload sizes are input. In total 5 payload sizes including 39, 55, 75, 95 and 115 bytes were varied to investigate changes in delays. Regression analyses have been applied to the results of the sending and receiving delays of the source and the base station. As linear relationships between delays and payload sizes are observed, two coefficients of the linear equation (*c0* and *c1*) are the required output where *c0* is the y-intercept and *c1* is the slope. The Table 6 summarises the

According to Table 6, the coefficients for the base station do not significantly differ from those for the source. The fire-to-send delays of the base station are constant whilst the source

**Delays Measured at Coefficients** 

1. Fire-to-send (F2S) Base station Constant delays of 0.50 ms

2. Send Base station 11.367 0.043

3. Transmission Base station 0.490 0.033

4. Reception Base station 1.521 0.076

5. Receive Base station Constant delays of 0.22 ms

In the case where the payload size is zero, a specific duration is still required for header transmission and reception. For CC2420, the header is approximately 11 bytes and requires 0.352ms for the delivery. An additional duration is required for transmitting processes which can be considered as an overhead. The send delay is the largest of the experimental

Table 6. Coefficients obtained from experimental results at 99th percentile

*c0 c1*

Source 0.204 0.025

Source 11.263 0.043

Source 0.552 0.033

Source 1.521 0.076

Source Constant delays of 0.22 ms

packet sizes. This section analyses these relationships for delay estimations.

base station.

coefficients of each delay.

provided a linear relationship.

**5.2.5 Estimation of communication delays** 

results. It is an interval from calling the send() command until capturing the SFD. Several mechanisms undertaken by the application software and operating system to facilitate the sending also require time and are included in the send delay. For example, when the send() command is called by the application, an interrupt is signaled to TinyOS. The packet is buffered and the CC2420 is switched to transmitting mode. This sending overhead due to software manipulation and hardware setup is regardless of payload size. Increases in payload size require additional delays. For example, for every byte increase in the payload size, the send and reception delays of a source respectively increase by 0.043 and 0.076ms. However, the payload size does not affect receive delay. The coefficients can be used to estimate the communication delays.

#### **5.2.6 PoRAP scenario**

PoRAP is developed to effectively support data communication in single-hop wireless sensor network (WSN). The base station communicates with its sources for controlling and data collection purposes. As the base station does not know when each source is booted, a setup process is required at the beginning of frame structure. Acting as a data receiver, the base station always listens to the medium for incoming messages after broadcasting the control packet. Hence, the base station desires extra power which can be obtained from external sources such as a desktop or laptop computer.

#### *A) Control and setup phase*

Prior to data transmission, the sources have to setup their parameters based upon the control information received from their base station. The information such as number of slots, slot length and slot start time is used to control the sources in order to send data within an allocated slot at an adapted transmission power. As the base station has no information on when the sources join the network, it has to discover which sources are booted and ready for communication. In the control and setup phase, the base station periodically broadcasts control packets to all sources located in its communication range. The broadcasted packet is received by the booted sources and they use the received information to setup the communication parameters.

There are three main parts to the control information included in the control packet. The first attribute indicates the identification of the base station. This field supports a future enhancement of PoRAP which supports the multiple base station system. It can be also used to differentiate between the control and data packets. The second attribute is schedule related. Some information is required by the sources in order to synchronise with their base station. These parameters include the number of slots, slot length and the start time of the first slot. The base station specifies the slot start time with respect to the Start of Frame Delimiter (SFD) transmission in order to minimise the effects of application and hardware processing delays. The source assigned to the first data slot sets its timer to fire and sends data when the time arrives. Other sources start at different times and they compute the starting times from the slot information. The transmission parameters are required to be completely set before the phase begins. Slot length determination for data slot can therefore be applied to the control slot. The base station periodically broadcasts its control packet. There are two main objectives of periodic broadcasting are maintaining synchronisation between nodes and supporting changes in network topology. Additional sources may be booted during the frame and some sources may be running out of energy. The number of sources is therefore modified by the base station.

An experiment was conducted in a 16m x 20m indoor environment to evaluate the energy conservation of PoRAP. A network consisting of 20 sources and a base station was set up. Tmote Sky motes were used as both sources and base station. The sources were placed at 20 different locations with 14 different distances and the base station was connected to a desktop machine. All motes had the same height above ground level and had the same antenna orientation. The minimum and maximum distances are 1 and 22.5m, respectively. Initially, the base station broadcast its 18-byte control packet to the sources. The sources then transmitted the 48-byte data packets back to the base station. A communication cycle was completed after the base station had received the data from all sources. Apart from the maximum power settings, four additional RSSI settings are included. The minimum RSSI thresholds were set to -90, -80, -70 and -60dBm whereas the corresponding maximum thresholds were -80, -70, -60 and -50dBm, respectively. The power is not adapted if the measured RSSI is between the thresholds and the aim is to obtain nearly 100% PRR. Each mote transmitted every 5 minutes and the experiment lasted for 24 hours. The results are

**-90 < RSSI < -80 -80 < RSSI < -70 -70 < RSSI < -60 -60 < RSSI < -50 Max TX** 

**Packet Loss (%)** 

**Saved Trans Current** **Packet Loss (%)** 

**Saved Trans Current**  **Packet Loss (%)** 

**Saved Trans Current**

1 51.2 0 51.2 0 51.2 0 35.6 0 0 0 2 51.2 0.3 35.6 0.7 0 0 0 0 0 0 4 43.1 2.3 43.1 0.7 28.2 0 0 0 0 0 6 43.1 4.7 28.2 0 0 0.3 0 0 0 0 8 51.2 5 0 0.7 0 0.3 0 0 0 0 10 51.2 5.3 35.6 0 0 0 0 0 0 0 12 51.2 5.7 20.1 0 0 0 0 0 0 0 14 0 14 28.2 0 0 0 0 0.4 0 3.7 16 28.2 5.7 20.1 0 0 0 0 0 0 1.2 20 43.1 3.7 0 0.7 0 0 0 1.2 0 2.1

According to Table 7, lower RSSI settings result in higher percentage of packet loss and conserved transmitting power. Lower power is used to produce the required RSSI range. A significant amount of power up to 50% can be yielded. However, the highest packet loss is

This chapter describes several aspects which should be considered during developing a network protocol for wireless sensor network (WSN). WSN has been used in both surveillance and civil applications. It is considered application specific as each application has its own set of requirements. Two main categories are proposed including event-based and periodic-based application. Throughput is the key requirement in the event-based whilst lifetime is the key in the periodic-based. Moreover, one of major drawbacks of WSN

**6. PoRAP energy conservation evaluation** 

shown in Table 7.

**7. Conclusion** 

**Saved Trans Current**  **Packet Loss (%)** 

**Saved Trans Current**

Table 7. Conserved transmitting current and data packet loss

obtained when the RSSI is between -90 and -80 dBm.

**Packet Loss (%)** 

**Dist. (m)** 

#### *B) Data delivery phase*

Slots are allocated by the base station in order to facilitate data transmissions of the sources. The data delivery phase starts after the control packet is received by the sources. The number of slots is fixed as it assumes that the base station communicates with the fixed number of sources and the number is constant throughout the operation. Data collected by the sources is stored in the data packet and is delivered to the base station.

The Received Signal Strength Indicator (RSSI) is measured when the base station receives the data. The RSSI linearly relates to the transmission power and the RSSI-PRR relationship is established in Fig. 5 (a). The PRR steeply increases with the RSSI up to a certain point. The increase in PRR then becomes insignificant or it becomes constant after this point. The RSSI is monitored and compared to the desired range. Power adaptation notification is conducted by the base station. The sources are notified by control packet reception in the next frame.

Apart from data, the identification (id) of a source is also included in the data packet. Specifying source id is an important issue and it may be done in several ways. For example, the SFD of the control packet reception time may be modified to obtain the id. However, sensors are considered resource constrained. Simple calculations should be included in the sources. Within the 128-byte buffering limitation in CC2420, one to two bytes should be enough to represent the id. Furthermore, the id can be assigned at installation time. Prior to deployment, a particular id is allocated to the source. For example, an id of 1 may be used for installing PoRAP in the first source in the network. Additional power conservation is introduced during the data delivery phase. The strategy benefits from adopting the time-slot based concept. As sources know when to receive control and to transmit data packets, it is possible to periodically turn the radio on for such periods. Fig. 15 describes the mode switching concept during the data delivery phase. The C&S, R, S and G represent control and setup, receive, send and guard, respectively.

Fig. 15. Mode switching during the data delivery phase

According to Fig. 15, each source is in wakeup mode when its radio is turned on for two reasons; control packet reception and data packet transmission. Otherwise, its radio is turned off and the source is switched to sleep mode. However, the base station radio is always turned on. This strategy minimises idle listening power at the sources.

Slots are allocated by the base station in order to facilitate data transmissions of the sources. The data delivery phase starts after the control packet is received by the sources. The number of slots is fixed as it assumes that the base station communicates with the fixed number of sources and the number is constant throughout the operation. Data collected by

The Received Signal Strength Indicator (RSSI) is measured when the base station receives the data. The RSSI linearly relates to the transmission power and the RSSI-PRR relationship is established in Fig. 5 (a). The PRR steeply increases with the RSSI up to a certain point. The increase in PRR then becomes insignificant or it becomes constant after this point. The RSSI is monitored and compared to the desired range. Power adaptation notification is conducted by the base station. The sources are notified by control packet

Apart from data, the identification (id) of a source is also included in the data packet. Specifying source id is an important issue and it may be done in several ways. For example, the SFD of the control packet reception time may be modified to obtain the id. However, sensors are considered resource constrained. Simple calculations should be included in the sources. Within the 128-byte buffering limitation in CC2420, one to two bytes should be enough to represent the id. Furthermore, the id can be assigned at installation time. Prior to deployment, a particular id is allocated to the source. For example, an id of 1 may be used for installing PoRAP in the first source in the network. Additional power conservation is introduced during the data delivery phase. The strategy benefits from adopting the time-slot based concept. As sources know when to receive control and to transmit data packets, it is possible to periodically turn the radio on for such periods. Fig. 15 describes the mode switching concept during the data delivery phase. The C&S, R, S and G represent control

According to Fig. 15, each source is in wakeup mode when its radio is turned on for two reasons; control packet reception and data packet transmission. Otherwise, its radio is turned off and the source is switched to sleep mode. However, the base station radio is

always turned on. This strategy minimises idle listening power at the sources.

the sources is stored in the data packet and is delivered to the base station.

*B) Data delivery phase* 

reception in the next frame.

and setup, receive, send and guard, respectively.

Fig. 15. Mode switching during the data delivery phase
