**5. Routing protocols**

Due to the robustness, low cost, low power consumption and simplicity, this work is based on the IEEE 802.15.4 standard. For the devices to form large scales networks, as described in RFC 5548 (2009), the protocol from this standard must operate on a mesh-type topology, so that the devices communicate in multiple hops, based on the low range communication (around 100 meters) with distributed routing to transmit information to their final destinations.

However, the large number of nodes and the peculiar nature of operation of wireless sensors urban networks require the project of routing and medium access control (MAC) protocols to be specifically developed.

Protocols that use only global disseminations to communicate, through broadcast messages (known as flooding protocols), may cause high package traffic, which can lead to a high number of collisions and, thus, reduce the delivery rate. In addition, they demand high energy consumption to exchange information.

On the other hand, *unicast* protocols should be stateless, which means that packages cannot store information about the route taken to avoid loops or package delivering problems. This is due to a limitation of information that the package of lower layers from the IEEE 802.15.4 standard has. Moreover, protocols must considerer the minimum energy consumption and a satisfactory delivery rate.

The public lighting concessionaire has the geodesic coordinates of the lighting points in their digital maps, which help in the structure management and maintenance. The routing protocols can then implement mechanisms that use such information.

Furthermore, devices must have mechanisms that minimize energy consumption, such as periodically switching the radio off, since devices would be idle most of the time.

This section intends to only cite the proposed protocols. They were divided according to two different types of traffic (divergent and convergent), and evaluated to demonstrate which are more suitable for the mentioned urban network.

## **5.1. Divergent traffic**

346 Energy Efficiency – The Innovative Ways for Smart Energy, the Future Towards Modern Utilities

The communication standard adopted between the operation and the industrial computer is CyberOPC. CyberOPC is an academic research project that proposes an open communication system, based on HTTP (Hyper Text Transfer Protocol), specially developed for remote control and supervision of industrial systems over public IP (Internet Protocol)

Communication works as follows: management applications installed on the Operation computer request control and supervision data via the Ethernet network to the industrial computer installed on the compartment. The message is received by the computer and

The communication controller transmits the message via the wireless network, identifying the request. The sensor nodes receive the notifications, process the request and transmit the response to the controller via the wireless network. The response is received by the controller via the wireless network, and retransmitted to the computer via the serial port. The industrial computer sends the response to the operation computer via the Ethernet

For detailed information about this control and monitoring application, refer to Fonseca

Due to the robustness, low cost, low power consumption and simplicity, this work is based on the IEEE 802.15.4 standard. For the devices to form large scales networks, as described in

transferred to the communication controller connected to the serial port.

**Figure 5.** Application Architecture

networks (TORRISI, 2011).

**5. Routing protocols** 

network.

(2011).

The proposed protocol for divergent traffic consists of four parts: it is based on the GPSR protocol (KARP and KUNG, 2000), which has two modes, greedy and perimeter (i); the second part is that when it reaches a particular target region, indicated by the geodesic coordinates, it spread the message, thus operating in *geocast* mode (ii); the third part is that it is able to reverse the direction of the perimeter mode, in order to go around blank spaces competently (iii); finally, the last part consists of retransmitting to different neighbors in case a fail occurs, using the original GPSR criterion to chose neighbors (iv). Originally, GPSR uses the right-hand rule to define the node to retransmit the package, choosing the neighbor by the smaller angle. Then, to reverse the direction, the logic was reversed, using the left-hand rule. Figure 6 shows the mode of operation of the protocol for divergent traffic.

For detailed information about the protocol used for divergent traffic, including flowcharts and analyses, refer to Pantoni and Brandão (2011).

Street Lighting System Based on Wireless Sensor Networks 349

**Figure 7.** Height mapping for gradient routing protocol. Source: Ye et al. (2005)

and analyses, refer to Pantoni and Brandão (2012).

is expected, plus a rationalization of energy consumption.

among the neighbors.

**6. Conclusions** 

smart grid applications.

humidity sensors, temperature sensors, etc.

sorted according to the distance will be selected based on the succeeding lowest height

For detailed information about the protocol used for convergent traffic, including flowcharts

The public lighting system provides automation for control process, diagnostics and alarms from possible failures in the structure. Therefore, an improvement in public lighting service

The two task forces related to the IEEE 802.15.4 standard (IEEE 802.15 WPAN TASK GROUP 4G, 2011; IEEE 802.15 WPAN TASK GROUP 4E, 2011) assure a protocol extension to the lower layers in order to increasingly meet urban networks requirements, as well as

Although this work comprises a specific application for public lighting, it can also be applied to other applications, such as monitoring energy and water consumption meters, measurement of climatic factors in order to implement weather forecast systems, with

**Figure 6.** Operation of the routing protocol for divergent traffic

## **5.2. Convergent traffic**

The main idea of the routing algorithm based on gradient is to forward the package towards the sink node choosing the neighbors with the lowest height, where height represents the number of hops over nodes in relation to the sink node.

In order to enable the routing process, the sink node broadcasts a message with its height equals to zero (H=0) in the initialization phase. The nodes that receive the "gradient initialization" package assign the incremented value to their height variable and, later on, broadcast the message to other nodes on the network, in order to assign heights to all network nodes, creating height levels (H) on the network, as indicated in Figure 7.

The logic of the protocol consists of transmitting a package to only one neighbor, according to the lowest height. The proposed protocol differs from the previous works because it considers other aspects to forward the package in case the neighbors have identical heights. In addition, in case acknowledgment messages identify a failure in transmission, the package is retransmitted to other neighbors, and the retransmissions are limited to only one transmitter node per data flow.

The protocol is based on choosing the neighbors for retransmitting the message according to the number of attempts made. The next hop is selected based on a list that is sorted in descending order by the longest distance and populated with all neighbors, except the neighbor from the last hop. On the first transmission, among the neighbors with the lowest heights, the most distant node from the current node will be chosen; in other words, the first element from the list. If it is the first retransmission, the second most distant element will be chosen, and so on. If no nodes with the same lowest height are chosen, the next group to be

**Figure 7.** Height mapping for gradient routing protocol. Source: Ye et al. (2005)

sorted according to the distance will be selected based on the succeeding lowest height among the neighbors.

For detailed information about the protocol used for convergent traffic, including flowcharts and analyses, refer to Pantoni and Brandão (2012).
