12
Sensors & Transducers, Vol. 164, Issue 2, February 2014, pp. 80-91 80 S S S e e e n n n s s s o o o r r r s s s & & & T T T r r r a a a n n n s s s d d d u u u c c c e e e r r r s s s © 2014 by IFSA Publishing, S. L. http://www.sensorsportal.com The Architecture of WiFi-Based WSN for AMR System and E-HWMP Routing Protocol Li LI, Xiaoguang HU School of Automation Science and Electrical Engineering, BeiHang University, 100191, China Tel.: +86-10-82317741 E-mail: [email protected] Received: 25 November 2013 /Accepted: 28 January 2014 /Published: 28 February 2014 Abstract: With the development of SoC technology in recent years, the ultra-low power WiFi System on SoC Chip has emerged. As a result, WiFi-based Wireless Sensor Networks come into use, especially used in Automatic Meter Reading. While because the nodes of Wireless Sensor Networks have limited energy supply, smaller storage capability and slower calculation ability, the current WiFi technology cannot be directly applied to WiFi-based Wireless Sensor Networks. The protocols should be upgraded and the security algorithms should be improved to meet the new requests. Firstly, this article describes the network architecture of WiFi-based WSN for AMR system and discusses the reason for using this analogous Mesh architecture. Secondly, the new Hardware architecture of WiFi-based WSN node is designed to realize the AMR system and verify the research work. The node can collect the data of power meter by WiFi and can be powered by a Lithium Battery. Thirdly, on the basis of study work of WiFi original routing protocol HWMP, a new method on improving the energy saving ability of HWMP to adapt the new features of WiFi-based WSN is proposed. And the simulation work on the new routing protocol E-HWMP has been done with NS2 and the simulation results show that the life cycle of the network has been extended to some degree. Copyright © 2014 IFSA Publishing, S. L. Keywords: WiFi-based wireless sensor network, AMR, Hardware of WiFi-based WSN, Energy saving, Hybrid wireless mesh routing protocol. 1. Introduction In order to stimulate economic development long- term stability and protect the environment, many countries in the world have been carrying their own Smart Grid Plan into reality which include the United States, Japan, China, countries of the EU and other countries [1-4]. Some countries are engaged in the utilization intellectualization for power consumers, some countries focus on the intellectualization of grid, and the others put more emphasis on the power generation with new energy and power storage. Although the focuses of these plans are various, the client intelligent power usage is one of the research focuses no matter what country. As the footstone of the Smart Grid, the new generation of AMR system in Smart Grid can not only collect power usage information remotely, but have functions of power rationing, power analysis, multi-rate billing, remote on-off control, power line loss test, anti-stealing, and the monitoring and management of distributed generation users as well. Currently, the AMR systems are mostly confined in data collection and one-way transmission function and two-way data transmission of the client's smart meter reading and writing control has been Article number P_1836

The Architecture of WiFi-Based WSN for AMR System and … · The Architecture of WiFi-Based WSN for AMR System ... concludes our work and specifies future work. 2. WiFi-based Wireless

  • Upload
    doanbao

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Sensors & Transducers, Vol. 164, Issue 2, February 2014, pp. 80-91

80

SSSeeennnsssooorrrsss &&& TTTrrraaannnsssddduuuccceeerrrsss

© 2014 by IFSA Publishing, S. L. http://www.sensorsportal.com

The Architecture of WiFi-Based WSN for AMR System and E-HWMP Routing Protocol

Li LI, Xiaoguang HU

School of Automation Science and Electrical Engineering, BeiHang University, 100191, China

Tel.: +86-10-82317741 E-mail: [email protected]

Received: 25 November 2013 /Accepted: 28 January 2014 /Published: 28 February 2014 Abstract: With the development of SoC technology in recent years, the ultra-low power WiFi System on SoC Chip has emerged. As a result, WiFi-based Wireless Sensor Networks come into use, especially used in Automatic Meter Reading. While because the nodes of Wireless Sensor Networks have limited energy supply, smaller storage capability and slower calculation ability, the current WiFi technology cannot be directly applied to WiFi-based Wireless Sensor Networks. The protocols should be upgraded and the security algorithms should be improved to meet the new requests. Firstly, this article describes the network architecture of WiFi-based WSN for AMR system and discusses the reason for using this analogous Mesh architecture. Secondly, the new Hardware architecture of WiFi-based WSN node is designed to realize the AMR system and verify the research work. The node can collect the data of power meter by WiFi and can be powered by a Lithium Battery. Thirdly, on the basis of study work of WiFi original routing protocol HWMP, a new method on improving the energy saving ability of HWMP to adapt the new features of WiFi-based WSN is proposed. And the simulation work on the new routing protocol E-HWMP has been done with NS2 and the simulation results show that the life cycle of the network has been extended to some degree. Copyright © 2014 IFSA Publishing, S. L. Keywords: WiFi-based wireless sensor network, AMR, Hardware of WiFi-based WSN, Energy saving, Hybrid wireless mesh routing protocol. 1. Introduction

In order to stimulate economic development long-term stability and protect the environment, many countries in the world have been carrying their own Smart Grid Plan into reality which include the United States, Japan, China, countries of the EU and other countries [1-4]. Some countries are engaged in the utilization intellectualization for power consumers, some countries focus on the intellectualization of grid, and the others put more emphasis on the power generation with new energy and power storage. Although the focuses of these plans are various, the

client intelligent power usage is one of the research focuses no matter what country.

As the footstone of the Smart Grid, the new generation of AMR system in Smart Grid can not only collect power usage information remotely, but have functions of power rationing, power analysis, multi-rate billing, remote on-off control, power line loss test, anti-stealing, and the monitoring and management of distributed generation users as well. Currently, the AMR systems are mostly confined in data collection and one-way transmission function and two-way data transmission of the client's smart meter reading and writing control has been

Article number P_1836

Sensors & Transducers, Vol. 164, Issue 2, February 2014, pp. 80-91

81

considered little. A new generation of AMR architecture which suit the Smart Grid’s new requirement was described [5].

At present, many countries have used many network technologies in AMR program, such as Radio Frequency (RF) [6, 7], ZigBee-based Wireless Sensor Network (WSN) [8-10], GPRS and 3G [11, 12], Power Line Carrier Communication (PLC) [13-15], 485 bus, etc. And including these technologies, WSN and PLC technology are considered the key technology to build a new generation of Smart Grid AMR system in the future.

The communication technologies of Wireless sensor networks used in short-range wireless are ZigBee, Ultra-Wide Band (UWB) and WiFi (Wireless Fidelity) technology, etc. With the development of SoC technology in recent years, the ultra-low power WiFi System on SoC Chip has emerged [16, 17]. As a result, WiFi-based Wireless Sensor Networks came into use [18-24]. WiFi-based Wireless Sensor Network has many special characteristics, such as high bandwidth, a large range covering, direct accessing to the WiFi hotspots at intelligent buildings and smart home without additional equipment. The characteristics make it possible to decrease the costs, so WiFi-based wireless sensor network is more suitable for the AMR and management system in intelligent buildings and smart home.

Because the nodes of Wireless Sensor Networks have limited energy supply, little storage space and low calculation ability, the current WiFi technology cannot be directly applied to WiFi-based Wireless Sensor Networks. While the current researches mainly focus on hardware design and application of WiFi-based sensor node, the research work on routing protocols and security algorithm of WiFi-based wireless sensor network is very little. The current WiFi’s AP is powered by power line with unlimited power and has higher calculation ability and large storage space, the routing protocols and security algorithms of the current WiFi technology are complex and nodes’ energy saving has not been considered in the protocols. While the nodes of WiFi-based wireless sensor networks are powered by batteries and usually used in unattended area, the hardware’s storage space and calculating ability of the WSN node is very limited. For the above reason, current WiFi technology cannot be directly applied to WiFi-based wireless sensor networks. The protocols should be upgrade and the security algorithms should be improved to meet the new requests.

The contributions of this research are as follows. Firstly, this paper describes the network architecture of WiFi-based WSN for AMR system and discusses why we used HWMP as the routing protocol for the WiFi-based AMR system. Secondly, on the basis of the study work of WiFi original routing protocol HWMP, this paper refers a new method on improving the energy saving ability of HWMP to adapt the new features of WiFi-based WSN. Thirdly, the simulation work on the new routing protocol E-HWMP has been

done with NS2 and the simulation results show that the life cycle of the network has been extended to some degree. Furthermore, a new node of WiFi-based WSN has been designed and worked out to realize the AMR system and verify the new routing protocol E-HWMP.

The rest of the paper has been organized in sections. In Section 2, some related work has been discussed. In Section 3, the network architecture of WiFi-based WSN for AMR system has been described and the reason why HWMP is used as the routing protocol for the WiFi-based AMR system has been discussed. In Section 4, the hardware of new node of WiFi-based WSN has been designed and described. In Section 5, a scheme for improving the energy saving of the HWMP routing protocol has been proposed. Simulation results and their corresponding analysis for the new E-HWMP routing protocol are presented in Section 6. Finally, Section 7 concludes our work and specifies future work. 2. WiFi-based Wireless Sensor Network

and Related Work

In recent years, Wireless Sensor Network technology for AMR and management programs in China have been proposed and studied. In 2008, combined with application project “ZigBee-based wireless gas meter reading system for civilian use”, Jinrong Zhang made analysis and researched on the energy efficiency and safety of WSN [26]. In 2009, Lei Chen researched on the clustering energy optimization methods for WSN at the network layer and data link layer, and proposed AMR architecture for heterogeneous WSN [27]. Two of above researches were based on the cluster head congener type WSN, and the cluster head heterogeneous type WSN were not involved. In June 2010, the Binglin Li and other researchers presented an AMRs’ network communications solutions combining with the WSN and PLC network [28], but there is little further study on the network protocol and other specific implementations. There were also various research schemes have been proposed which use ZigBee-based WSN for automatic meter reading and application [29-31], but most of these researches were limited on the hardware of the node and the network structure and research work on the network protocols, energy saving protocols and security was not involved.

With the development of SoC technologies in recent years, many researchers and developers pay much attention to WiFi-based wireless sensor networks. GainSpan, a company invested by Intel, developed the famous low-power WiFi sensor chips GS 1010[16] and G2 Microsystems developed G2C5x series chips [17]. It was reported that power consumption of GS 1010 sensor nodes is so low that a WiFi node can work five to ten years with an AA battery. Of course, the working time also

Sensors & Transducers, Vol. 164, Issue 2, February 2014, pp. 80-91

82

depends on the frequencies and time when the chip wakes up to work. Yu-Ping CHEN compared GS 1010 with ZigBee sensors in standby and startup power consumption and got the conclusion that the average standby and startup power consumption of WiFi sensor chip is less than ZigBee sensor [18].

In China, some researchers have done much work in this area too. Han Shuang has developed a WiFi-based sensor node with GS 1010 chip and realized data transition and node positioning function [19]. Liu Hongyi has also realized remote environments monitoring system indoor and outdoor with GS 1010 chip [20]. Lin Bin and Zeng Qiang have also done much application research work in these fields [21, 22]. Chen Wu has designed and developed the hardware of WiFi-based Wireless Sensor Network node with ARM9-based S3C2440 processor [23]. There are more researchers that discussed and describe the new applications with WiFi Sensor Network node [24, 25].

3. The Network Architecture of Wifi-Based Wireless Sensor Network for AMRS

3.1. The Network Architecture of Traditional

AMR System

The traditional AMR system is composed of the following components: a central computer (master), concentrator, collection terminals, power meter or water meter and other instruments. The network topology diagram of traditional AMRs is shown in Fig. 1.

Fig. 1. The network architecture of traditional AMRS.

It can be seen from Fig. 1 that the traditional AMRs architecture is a typical distributed control

system, and it has a tree network structure. The system can be divided into three layers: the first is the upper communication network between system management center and the concentrator; the second layer is the middle communication network between the concentrator and the collector; the third layer is the bottom communication network between the collector with the meter and other instruments. The upper communication network can use various types of communication networks such as 3G, GRPS, VPN special network, telephone network and other communication, which are wide-area communications network technologies; the middle communication network can use existing wiring systems, such as: telephone network, cable television, power network and wireless communications networks, etc. and it can also use a variety of network resources, such as residential cabling system (PDS). The bottom communication can use PLC transmission mode, 485 mode and wireless mode. 3.2. The Network Architecture of the New

Generation of AMR System

The new generation of AMR system facing to the Smart Grid, should not only have the functions of the traditional data collection, but have the functions of intelligent limited power, distributed intelligent power transmission which user make, multi-rate, anti-tamper, line loss detection and others as well. Furthermore, it should also has the characters of fast installation, easy expansion and easy maintenance. Therefore, considering its functions and features, the traditional architecture and protocols of AMR system hasn’t met the demands of the new generation AMR system facing to the Smart Grid well.

The architecture of next-generation AMR’s network based on WiFi WSN facing to Smart Grid in an intelligent community is shown in Fig. 2.

The Solution is designed for AMR system in high-rise residential apartment community. For example, to each high-rise apartment building, network topology design is divided into four layers. The first layer is the network among power, water meters and gas meters within the each family; the second layer is the network among the power meters of the different family and the concentrator; the third layer is the part between the main concentrator and cell concentrator of each building; the fourth layer is the network between the main concentrator and remote municipal management center.

In the first layer, every family is a terminal cluster, which head is the power meter node. The energy of each power meter is not limited. The power meter node is responsible for regularly collecting data on water and gas meter by WiFi-based WSN communication mode, and transmitting control and management information. The water meter and gas meter are WSN sensor nodes which have WiFi capabilities and battery-powered. In the future, Power meter node can also be used as the control center of

Sensors & Transducers, Vol. 164, Issue 2, February 2014, pp. 80-91

83

the digital home, communicating with home air conditioning, TV and lights through the WiFi-based WSN on the condition that air-conditioning, TV and

other home appliances are WiFi sensor network nodes with WiFi capabilities.

Fig. 2. The network architecture of AMRS based WiFi WSN.

The second layer of network is the part between different power meters. The energy of power meter nodes can be powered by the power lines without limitation. It can replace the traditional meter and be used as a relay node. For the power meters in the same unit are near to each other and uniformly distributed, the ideal network topology of different power meter nodes is a tree structure. There is a concentrator in the roof of each building, which is similar to the sink node. The concentrator is the root node of the network in this building. The power meters are the parent nodes and the leaf nodes of the tree. The topology sketch is shown in Fig. 3.

The topology sketch of the third layer network is shown in Fig. 4. The central concentrator of the community is the sink node. Concentrators of each building are general sensor nodes, which are self-organized with the central concentrator (sink nodes) in a sensor network. The topology of third layer network may be star network, ring network or mesh network. Because the nodes are not too many and uniformly distributed, the ideal topology structure of the third layer network is star network, which is effective and can avoid the problem of data circle. In ideal condition, the building concentrators can constitute ring network and be used as the repeaters of other nodes to transfer data from other buildings to the central concentrator.

The fourth layer network is the part between the central concentrator of the community and the remote management center. There are many optional communication modes, such as 3G, VPN special network, WiMAX and so on.

Fig. 3. The second layer network topology diagram.

Sensors & Transducers, Vol. 164, Issue 2, February 2014, pp. 80-91

84

Fig. 4. The Third layer network topology diagram.

The above topology is designed for ideal situation. But in practice the self-organized network of the wireless sensor nodes might not be so ideal, so the case that there are errors and the network cannot be self-organized should be considered. Therefore, the design for the automatic generation of hierarchical topology protocols and routing protocols are the key factor of the best network topology. 3.3. The Architecture Referring Wireless

MESH Network and Heterogeneous Hierarchical Structure Network

The network topologies of large scale Wireless

Sensor Network are of a hierarchical network structure. The nodes of hierarchical WSN include several clusters and each of them consists of a cluster head and several cluster members. Cluster head is responsible for coordinating the work of nodes in the cluster and data integration, and cluster members are common nodes. According to the difference between the cluster head and normal nodes, the hierarchical network structures are divided into two types, isomorphic hierarchical structure and heterogeneous hierarchical structure. In isomorphic hierarchical structure network, the cluster head nodes and the common members are the same, and the cluster head is selected from common clusters members using a specific clustering algorithm. In heterogeneous hierarchical structure network, the nodes’ energy of the cluster head and the common members are different. And the cluster head is usually a special one with more powerful processing and communication capability, whose node energy is more powerful or unlimited. The heterogeneous hierarchical structure network is shown in Fig. 5 [32].

In the Internet of Things, natural gas meters, water meters and power meters are nodes of the wireless sensor network. Because power meters can be powered by power line, its node energy can be unlimited. But for water meters and natural gas

meters, it is difficult to be powered by power line. They can be powered only by batteries and their node energy is limited. For these reasons, the heterogeneous hierarchical structure is suitable for remote meter reading network. The power meter is the smart control center and the head of heterogeneous clusters. Besides reading and transmitting local data, power meter can be used to collect and transfer the data from water meters and natural gas meters in the wireless network. Furthermore, it is easy to act as control center of other kinds of nodes at home in the future.

Fig. 5. The topology of heterogeneous hierarchical network.

There are three types of topologies in the WiFi network, point to point, point to multi-points in Star Network and wireless mesh structure. The standards for WiFi are IEEE 802.11 series, in which IEEE 802.11s is specially made for wireless mesh structure. Wireless mesh structure is shown in Fig. 6. In mesh network, routing protocols are used to build mesh paths between Mesh Points and Mesh Access Points and each Mesh Point works just like a route to provide relay services. Mesh Access Point (MAP) can be Mesh Point or Access Point which can provide access services to the mobile client terminals in the mesh network [33].

If we compare the structure of Mesh Network on IEEE 802.11s with heterogeneous hierarchical wireless sensor network, we can find that they are very similar. Mesh Portal can work as a gateway and provide access to other network. Mesh Portal is similar to the sink node of wireless sensor network, MAP is similar to the cluster head of heterogeneous hierarchical network, and mobile client terminals are similar to the common nodes in wireless sensor network. So the protocol of WiFi Wireless Mesh network can be used to the WiFi-based wireless sensor network after being optimized, such as routing protocol, security technology and so on.

Sensors & Transducers, Vol. 164, Issue 2, February 2014, pp. 80-91

85

Fig. 6. 802.11s Structure of Wireless Mesh Network.

The architecture of WiFi-based new generation of remote Automatic Meter Reading Network has been designed, as is shown in Fig. 2 [5], which can be used in intelligent community buildings. Comparing Fig. 2 with Fig. 6, we can find that they are very similar in the topology structure too. The concentration sever is similar to MPP, the concentrator of buildings is similar to MAP and the meters are similar to mobile terminal. Because the energy of power meter is unlimited, the power meters can be connected to build a tree, which is like the bone of network. And this character is very similar to HWMP’s tree routing expanding. In additional, power meter is also responsible for bidirectional data transmission between water meter and gas meter.

So the structure of wireless mesh can be referred to realize remote Automatic Meter Reading network. For example, the network topology and route referring to the routing protocols of Mesh Network can be designed, and the security system of AMR network referring to the security protocols of Mesh Network can be built. But it must be noted that most of the nodes of wireless sensor network are powered by batteries, so their node energy is limited, and the calculating capability and storage capacity is limited. So the network protocols of WiFi Wireless Mesh Network only can be used in the new generation of remote AMR network after being optimized. Since the default routing protocol of Wireless Mesh is HWMP, the energy consumption of nodes running in HWMP should be reduced. 4. Design of WiFi-based WSN

Sensor Hardware

In order to test and verify the protocol, the hardware of the Remote Automatic Meter Reading System has been designed and worked out, which can collect the data of external power meter correctly and communicate with the others by embedded WiFi module. The system is powered by high-power

lithium battery and can be used in unattended places and environment without power line.

The hardware of WiFi-based Wireless Sensor Network node includes the processor STM32F407, the WiFi module WM-G-MR-09, the voltage regulator chips HT7533 and HT7333, power-manage chip TP4056, hardware encryption chip, flash chip W25Q16, 485 bus chip MAX3485, near-infrared chip TFDU4100, far infrared ports and lithium batteries. The structure is shown in Fig. 7.

Fig. 7. The hardware structure of WiFi-based Wireless Sensor Network node.

Processor STM32F407 is a Cortex ™-M4 core based 32-bit ARM processor. With the built-in 192 K RAM and the 1 M Flash, the processor can meet the demand for certain scale operating system and its maximum processing speed can reach 144 MHz. The built-in RTC module can provide accurate calendar time. Besides that, the system has 3 12-bit AD modules, 2 12-bit DA modules, 16 DMA, 17 timers, 3 I2C, 3 SPI interfaces, 4 USART, 2 CAN, 1 USB and 1 parallel camera interface, which can meet the system demands for expanding.

WiFi module use WM-G-MR-09, which complies with IEEE802.11b/g standard. Its maximum communication speed is 54 Mbps. With 3 SPI interface, the module is highly integrated, so it has been widely used in various WiFi products.

In order to meet the demand for large-capacity data storage, large capacity FLASH chip, W25Q16, has been chosen in the system, which has 2 M storage capacity. With the SPI interface, the maximum data storage speed can reach 30 MB/S. And it can be erased at least 100,000 times.

Sensors & Transducers, Vol. 164, Issue 2, February 2014, pp. 80-91

86

Since WiFi module consumes much power, the solution that the WiFi module and processor are powered separately is chosen. In such way, the power supply can be shut down when the WiFi module is not in working. The selected voltage regulator chips are HT7533 and HT7333, whose power consumption is only a few A.

To reduce power consumption, low power consumption circuit was designed for FLASH, 485, far infrared, near infrared and other peripherals. When a peripheral is not in working, the power supply will be shut down to reduce its power consumption.

For Lithium Batteries are used to supply power for different components separately, the battery charging and discharging should be managed. Lithium charging chip, TP4056, is used in charging management. With the chip, the batteries can be linearly charged with constant voltage and constant current. And the chip can check the temperature of the battery, close the battery when the voltage is low and recharge the battery automatically when the voltage restores normal status. There are two pins on the chip to indicate the status of charging and finish charging, which can be used easily in charging management to protect the battery from over charging. Furthermore, the AD module can monitor the power of the battery. 5. Routing Protocol of HWMP

Hybrid Wireless Mesh Protocol (HWMP) is the default routing protocol of Wireless Mesh Standard IEEE 802.11s [34, 35]. It is the hybrid of reactive routing protocol and tree topology-based proactive routing protocol. It is a routing protocol specifically for Wireless Mesh, in which the nodes of Mesh are relatively fixed and the nodes in trunk vary little. According to HWMP, Mesh nodes can be added or deleted easily.

Being a kind of hybrid routing protocol, HWMP includes reactive routing protocol and proactive routing protocol. The tree-based proactive routing protocol is adopted in backbone network and the Radio-Metric AODV (RM-AODV) is adopted in variable network topology, which is evolved from AODV. AODV is IP-based routing protocol and works in network layer, which uses the number of hops as metric. RM-AODV is MAC address-based routing protocol and works in physical layer, which uses Radio-Aware routing metric to choose path.

A Mesh Point acts as the MPP (Mesh Portal Point) and root node of the tree routing network when a mesh network begins. Other MP Points proactively maintain the path to root node and the root node maintains the paths to each Mesh Point. In this way, a two-way proactive path tree of distance vector can be built. When there is data to be sent in a MP, it will send the data to the gateway node according to the path tree first. If the data should be sent to external network, the MPP gateway will send the data packet

to destination via external network link. Otherwise if the data is sent to other MP in the Mesh Network, the gateway will send it to the right Mesh Point. When the destination MP receives the data from the source node in inner network, it will send back the corresponding routing request packet by starting the Radio-Metric Ad hoc On-Demand Distance Vector (RM-AODV). When the source node receives the packet, it will add the paths directly according to the received packet, through which the source node and the destination node are hop connected. If the transmission efficiency of a new path is higher, it will be used in the following transmission work. Since there is distance between gateway node and other Mesh Points in a Mesh Network, the hop transmission through nodes in inner network is more efficient and needs less network resources. The hybrid routing configuration process is shown in Fig. 8.

Fig. 8. Configuration process of HWMP.

A default Radio-Aware routing metric is defined for IEEE 802.11s devices according to the routing protocol HWMP in the new issued formal standard 802.11s. Airtime link metric is a measure to calculate the channel resources consumed in the data frame sending via specific wireless link. Formula (1) is used in calculating the consumption of spare time in every link. The path metric is the sum of all link metrics.

eBC

fr

ta r

O

1

1 , (1)

where O is the Channel Access Overhead; Bt is the Number of bits in test frame; r is the Transmission bit rate; efr is the Error rate of every frame.

O is all the Channel Access Overhead, which includes frame headers, training sequences, access

Sensors & Transducers, Vol. 164, Issue 2, February 2014, pp. 80-91

87

protocol frames, etc. It varies depending on the technology of physical layer, such as IEEE 802.11b or 802.11g. Bt is Number of bits in test frame which is 8192 bits. The input parameters r and efr are the data rates in Mb/s and the frame error rate for the test frame size Bt respectively. The rate r represents the data rate at which the mesh STA would transmit a frame of standard size Bt based on current conditions and its estimation is dependent on local implementation of rate adaptation. The frame error rate efr is the probability that when a frame of standard size Bt is transmitted at the current transmission bit rate r, the frame is corrupted due to transmission error.

After analyzing the simulation code of HWMP in NS-2.33 it was found that HWMP code is similar to AODV protocol code of NS2. They are all mainly composed of protocol body, routing table, broadcast timer, route cache timer, cache broadcast ID timer and route cache queue. The work flow of HWMP protocol is analyzed as follows.

When a packet is received, which means the function recv(Packet*, Handler*) is called, different functions are called to deal with it according to the packet type.

1) If it is a protocol packet, function recvHWMP() will be called to deal with it. The TTL will be minus 1, before different functions are called according to different packet types. If it is a routing requested packet, the function

recvPREQ(Packet*) will be called to deal with it. If the packet is generated by the node itself or has already been received, the node will discard it and the process will be ended. Otherwise, the node will deposit the serial number of the packet in cache, add the path sent by the packet to reverse route and forward the packet. After that, the node will call corresponding function to deal with it according to the destination address. If the node is the destination node, the function sendPREP will be called. If the node is not the destination node and the route to destination node is known, the function sendPREP will insert the next hop node into the precursor list between source node and destination node. If the route to destination node is unknown, the number of hop will be plus 1 and the forward function will be called to broadcast the packet. If it is routing response packet, the function

recvPREP(Packet*) will be called. The node should query the route to destination node. If there is no such route, a new route should be added. After the new route is added, the node should update the route information to the destination node and distribute the related packets. If the node is not the destination node but it knows the route to destination, the number of hops will be plus 1 and the forward function will be called to distribute the packet. Accordingly the response precursor list will be updated. If the node is not the destination node and it does not know the route to destination, the packet will be discarded.

2) If what the node received is already the sent data packet or TTL of the packet equals 0, the node

will terminate the process. If the packet is generated by upper-layer protocol, the node will add data header to it. HWMP works according to the path selection protocol in the second layer and its addressing mode is MAC address, but in the source code the IP address is used instead for technical reasons. Finally the node handles it according to destination route.

The above is the routing process of HWMP protocol. In fact, there is a pre-compiling switch in the head file of hwmp.cc. The switch, “#define ROOT_INDEX (4)”, is used to start the tree proactive routing protocol and call a timer, thus the route table can be updated every 10 seconds. If we disable the switch, the tree proactive routing protocol of HWMP will not start and there is no difference between HWMP and RM-AODV.

6. Improved Routing Protocol E-HWMP

By analyzing the work flow of HWMP protocol, it can be found that the node energy is not considered in routing selection. But in fact there are some nodes are battery-powered in hybrid AMR network based on WiFi wireless sensor network, and their node energy is limited. Nodes with adequate energy should be considered in priority when the next hop node should be selected. So it is necessary to adjust the original HWMP protocol to meet the requirements of the nodes with limited energy. The adjustment includes adding energy model to call the energy parameters of nodes, modifying the data packet header of protocol packet and original routing metric of HWMP in airtime. The adjusted protocol is called Energy saving-based Hybrid Wireless Mesh Protocol (E-HWMP) routing protocol.

1) The improvement of routing metric in airtime The calculation method for routing airtime metric

of HWMP is shown in formula 1. It is known that it is irrelevant with node energy, so only if a parameter of node energy should be added to it by multiplying original routing airtime metric E times, can the remained energy of nodes be considered in route selection according to HWMP. The method to get E is shown in formula (2).

1

1cnt

ii

NodeE energy

, (2)

where Nodecnt is the collection of all nodes on the route; energyi is the current energy of node i.

The bigger the number of hop is, the bigger the value of E is in case that all the nodes in route have the same quantity of energy. If the number of hop is fixed, the more the rest energy in routing nodes is, the smaller the value of E is. By examining the remained energy of nodes in route before the path is built, the case that the nodes with high energy consumption are selected can be avoided. In such way, the route loop problem can be effectively avoided.

Sensors & Transducers, Vol. 164, Issue 2, February 2014, pp. 80-91

88

The way to calculate the metric is shown in formula (3).

1 1

1 *cnt cnt

ajii j

Node LinkMetric energy C

,

(3)

where Caj is the airtime of the jth link; Linkcnt is the collection of all the links in the route.

2) Adding node energy coefficient As there is no node energy coefficient in the

HWMP codes, the file that defines the node energy model, mobilenode.h, should be called. After that the remained energy in current node can be read by pointer. A pointer is defined in the above codes to point to the current node and to get the remained energy in the node. The above index means the ID of current node and ienergy is the energy value of current node.

3) Adjusting the data structure of the HWMP packet header

PREQ and PREP of RM-AODV are adopted to build the route tree and find on-demand routing in both proactive and reactive routing. There is no energy-related parameter in original path request packet (PREQ) and path response packet (PREP) of HWMP, so the packet header of PREQ and PREP which uses routing metric should be revised. A data variable named energylost should be used to record the sum of reciprocal of the left energy value in current path, as is shown in formula (4).

energylost+=1/ienergy, (4)

The revised packet header of path request (PREQ)

is shown in Fig. 9, and the revised packet header of path response (PREP) is shown in Fig. 10. The energy parameter energylost is newly added to record the reciprocal sum of the left energy value in the current path automatically.

Fig. 9. The modified packet header structure of PREQ.

4) Analysis of work flow By analyzing the codes of HWMP, it can be

known that the PREQ request should be sent at first to build a path when an MP sends data to another MP or builds a path to root node. So the routing metric should be revised in the function recvPREQ where

the PREQ is received and processed. The value of the new routing metric equals the value of the original routing metric mulplfied by the energy parameter, energylost.

Fig. 10. The modified packet header structure of PREP.

There is similar routing metric in function recvPREP. There might be difference between the information in PREP packet and current network for the reason that the PREP packets might not be sent from the destination node and the PREP packets could also be sent from the nodes in the path to destination node. And the energy information varies from time to time. So the path selection rules in function recvPREP do not need to be modified.

The improved protocol is named E-HWMP to distinguish it from the original protocol HWMP. New routing metric related to node energy is used to get the network topology and route. In such way the energy demand to the nodes may be reduced and the life cycle of network may be extended.

7. Simulation

In order to verify the effect of improved E-HWMP protocol, simulation tests have been down. In the tests, the energy model of NS2 is used. Energy model of NS2 can be started by TCL language in the energy simulation process and run according to the parameters set in TCL script. Surely the left energy information in current node should be called in the codes if the energy information is considered in the routing protocol.

The simulation tests generate six different scenes which have 50,100,150,200,250,300 static nodes. At the same time, when the number of nodes is 100, more tests were taken with three grades of initial energy, 5 J, 10 J and 15 J. The details of the parameters are shown in Table 1.

Table 1. Parameters of the passive routing test.

Simulation time 100 s Transfer Protocol UDP Packet type CBR Transmission rate 1 Mbps Transmission 200 M Mac Layer 802.11 DCF Antenna type Omnidirectional Node moving speed Fixed

Sensors & Transducers, Vol. 164, Issue 2, February 2014, pp. 80-91

89

The time of the first timeout node in the original HWMP and improved E-HWMP is shown in Fig. 11. The initial energy of all nodes is 15 J, the transmission power is 1 W, the receiving power is 1 W and waiting power is 0.05 W.

Fig. 11. The time of first timeout node in different protocols.

The figure shows that the life cycle of the first timeout node in the case of E-HWMP is obviously extended when the number of nodes is not 200, and there is little difference between the life cycles of two protocols in the scale of 200 nodes. It should be noted that there is a 10-second extension, or improved by 25 percent, when the number of nodes is 250.

The average end-to-end time delay in different situations is shown in Fig. 12.The figure shows that there is little difference between the two protocols when the number of nodes is 50 or 250. There is decrease in time delay in E-HWMP when the number of nodes is 100, 150 or 300. But there is more time delay when the number of nodes is 200.

As is shown in Fig. 13, the life cycle of the first timeout node in E-HWMP is extended to a certain degree when there are 100 nodes in the system and the initial energy is 5 J, 10 J and 15 J respectively.

Number of nodes

Fig. 12. End to end time delay in the environment of different nodes.

Fig. 13. The simulation result of E-HWMP and HWMP with 100 nodes and different initial energy.

Furthermore, in the proactive routing test an 8 * 12 point matrix, which can simulate the network topology of the building meter reading system, is built. The distance between two adjacent nodes is 200 m. The root node which simulates the concentrator of buildings is located in the top of the lattice, and it is connected with other nodes in the middle of lattice by one hop. The topology is shown in Fig. 14.

The result of this simulation shows that there is a 1 second delay in the passing out time of the first timeout node in E-HWMP protocol, compared with the first timeout node in HWMP protocol.

Fig. 14. The topology of proactive routing for test. 8. Conclusion

The network architecture of WiFi-based WSN used in AMR network is discussed in the article. The result of the simulation shows that the analogous WiFi Mesh network architecture is more applicable in this area.

In order to realize the AMR system and verify the research work, the new Hardware of WiFi-based WSN node is designed. The node can collect the data of power meter by WiFi. For low power consumption circuit is adopted and the battery charging and

Number of nodes

Sensors & Transducers, Vol. 164, Issue 2, February 2014, pp. 80-91

90

discharging are managed, the node can be powered by a Lithium Battery.

Compared with the original HWMP, the life cycle of the first timeout node in E-HWMP is extended to a certain degree and the existing period of the network is prolonged. At the same time, there is no large difference in the end-to-end time delay between E-HWMP and HWMP. The result of the simulation under proactive routing model imitating the AMR system of apartment building shows that E-HMWP is more suitable than HWMP for the remote Automatic Meter Reading network. References [1]. Qing Song, Jing Tang, Xiao Feng, Development and

analysis of smart grid at home and abroad, Electrotechnics Electric, No. 3, March 2010, pp. 1-4.

[2]. Shi Fang, Strategic plan for the smart grid in Europe and America, Sino-Global Energy, No. 6, June 2009, pp. 107.

[3]. Technical and system requirements of advanced distribution automation, Technical Report, Electric Power Research Institute, Palo Alto, CA, 2004.

[4]. European commission, European technology platform smart grids: vision and strategy for Europe's electricity networks of the future, 2008, (http://ec.europa.eu/research/energy/pdf/smartgrids_ en.pdf).

[5]. Li Li, Xiaoguang Hu, Huang Jian, Design of new architecture of AMR system in Smart Grid, in Proceedings of the 6th IEEE Conference on Industrial Electronics and Applications (ICIEA’2011), China, June 2011, pp. 2025-2029.

[6]. A. Ali, N. A. Razali, N. H. Saad, N. Vitee, Implementation of automatic meter reading (AMR) using radio frequency (RF) module, in Proceedings of the IEEE International Conference on Power and Energy (PECon), December 2012, pp. 876-879.

[7]. C. Brasek, Urban utilities warm up to the idea of wireless automatic meter reading, IEEE Computing & Control Engineering Journal, Vol. 15, Issue 5, 2004, pp. 10-14.

[8]. P. Corral, B. Coronado, A. C. De Castro Lima, O. Ludwig, Design of automatic meter reading based on Zigbee, IEEE Latin America Transactions, Vol. 10, Issue 1, January 2012, pp. 1150-1155.

[9]. C. Prapasawad, K. Pornprasitpol, W. Pora, Development of an automatic meter reading system based on ZigBee PRO Smart Energy Profile IEEE 802.15.4 standard, in Proceedings of the IEEE International Conference on Electron Devices and Solid State Circuit (EDSSC), December 2012, pp. 1-3.

[10]. Nhat-Quang Nhan, Minh-Thanh Vo, Tuan-Duc Nguyen, Huu-Tue Huynh, Improving the performance of mobile data collecting systems for electricity meter reading using Wireless Sensor Network, in Proceedings of the International Conference on Advanced Technologies for Communications (ATC), October 2012, pp. 241-246.

[11]. T. Khalifa, K. Naik, A. Nayak, A survey of communication protocols for automatic meter reading applications, Communications Surveys & Tutorials, Vol. 13, No. 2, 2011, pp. 168-182.

[12]. Xuebo Chen, Ying Zhang, Lipei Wang, Hardware design of the wireless automatic meter reading system based on GPRS, in Proceedings of the 10th World Congress on Intelligent Control and Automation (WCICA), July 2012, pp. 4536-4540.

[13]. B. Sivaneasan, P. L. So, E. Gunawan, A new routing protocol for PLC-Based AMR systems, IEEE Transactions on Power Delivery, Vol. 26, Issue 4, October 2011, pp. 2613-2620.

[14]. Qiao Chen-Xi, Hu Xiao-Guang, The realization of broadband carrier communication in remote automatic meter reading system, in Proceedings of the 10th IEEE International Conference on Industrial Informatics (INDIN), July 2012, pp. 1073-1076.

[15]. M. Popa, Gateway design and implementation in an Automatic Meter Reading system based on Power Line Communications, in Proceedings of the 7th International Conference on Networked Computing and Advanced Information Management (NCM), June 2011, pp. 295-298.

[16]. Daniel M. Dobkin, Bernard Aboussouan, Low Power Wi-Fi™ (IEEE 802.11) for IP Smart Objects, White Paper, Gainspan Corporation, 2009.

[17]. G2 Microsystems, Ultra Low-power Wi-Fi Datasheet V0.95, 2006, (www.g2microsystems.com).

[18]. Yu-Ping Chen, Quincy Wu, Power consumption measurement and clock synchronization on low-power wireless sensor networks, in Proceedings of the 14th International Conference on Advanced Communication Technology (ICACT), February 2012, pp. 406-409.

[19]. Han Shuang, Design and application of a Wi-Fi based wireless sensor networks node, Beijing University of Posts and Telecommunications, 2010.

[20]. Liu Hongyi, Zhao Fang, Li Zhaohui et al., Design and implementation of an indoor and outdoor environment remote monitoring system based on WiFi Sensor Network, Journal of Computer Research and Development, No. 47 (Suppl.), 2010, pp. 361-365.

[21]. Lin Bin, The design of wireless sensor networks detection system based on Wi-Fi, Southwest Jiaotong University, 2011.

[22]. Zeng Qiang, Design and Implementation of WIFI wireless sensor networks, North University of China, 2012.

[23]. Chen Wu, Yu Zhen-Xing, Hong Liang, et al., The design of wireless sensor network node based on Wi-Fi, in Proceedings of the 24th Chinese Control and Decision Conference, August 2012.

[24]. Li Li, Xiaoguang Hu, Huang Jian, The applications of WiFi-based wireless sensor network in Internet of Things and Smart Grid, in Proceedings of the 6th IEEE Conference on Industrial Electronics and Applications (ICIEA), 2011, pp. 2025-2029.

[25]. Zhang Hongying, The WiFi based on singlechip microcomputer wireless sensor network products were reviewed, Public Communication of Science & Technology, No. 12, 2011, pp. 211-213.

[26]. Jinrong Zhang, Wireless sensor network energy efficiency and security research, Chongqing University, April 2008.

[27]. Chen Lei, Optimization of clustering methods of sensor network research, University of Science and Technology of China, April 2009.

[28]. Li Binglin, Song Haiyan, Wireless sensor network technologies and passive optical network technology in the smart grid electricity collection system, East

Sensors & Transducers, Vol. 164, Issue 2, February 2014, pp. 80-91

91

China Electric Power, Vol. 38, Issue 6, 2010, pp. 0812-0815.

[29]. Chen Hongfei, ZigBee and GPRS-based remote wireless meter reading system intelligent terminal design, Central South University, May 2009.

[30]. Wang Fubin, Short-range wireless communication technology in meter reading system, Shandong University, April 2009.

[31]. Cai Wenjia, Based on wireless sensor networks for remote meter reading system, Hubei Power, No. 32, 2008, pp. 48-50.

[32]. Meng Zhonglou, The research on topology control for wireless sensor network, Huazhong University of Science and Technology, May 2009.

[33]. I. F. Akyildiz, Xudong Wang, Weilin Wang, Wireless mesh networks: A survey, Computer Networks Journal, Vol. 47, Issue 4, March 2005, pp. 445-487.

[34]. IEEE Standard 802.11s ™ -2011. 10”, IEEE Computer Society, September 2011.

[35]. Yang Mengke, Yang Yatao, Bai Zhongying, Research on multi-portal routing protocol for wireless mesh networks based on HWMP, Microelectronics & Computer, Vol. 26, No. 12, December 2009, pp. 4-8.

___________________

2014 Copyright ©, International Frequency Sensor Association (IFSA) Publishing, S. L. All rights reserved. (http://www.sensorsportal.com)