A Real-Time Monitoring and Statistic System Using ... - IEEE Xplore

3 downloads 87447 Views 634KB Size Report
A Real-time Monitoring and Statistic System Using ... The system has good scalability and ease of ... Keywords—sensor networks; real-time monitoring system;.
2015 First International Conference on Computational Intelligence Theory, Systems and Applications

A Real-time Monitoring and Statistic System Using Hierarchical Sensor Network Ning Sun, Guangjie Han, Chen Lin

He Lu

College of Internet of Things Engineering Hohai University Changhzou, China [email protected], [email protected]

Hangzhou Applied Acoustics Research Institute Hangzhou, China [email protected]

floor's data and sends data to the control node, finally the information of room usage of the whole building is gathered in control node and the total number and the number of people in each study room can be calculated and displayed locally or remotely by control node. On one hand, the sensor network can run independently offline. On the other hand, it can connect the public internet by DTU module and GSM module, then bring the data of sensor networks on the internet. By this way, users can access the sensor network remotely through the server or the client, which can realize the internet of things (IoTs) system [4][5] ultimately.

Abstract—In many occasions, the usage situation of some rooms needs to be reported to users timely, such like libraries, study halls, cafeterias, etc. Usually the room resources are limited, so it is not reasonable if some rooms are overcrowded while some empty. This work aims to design a hybrid sensor network system to real-time monitor the usage situation of the rooms, so the users are able to keep timely information, thereby saving more time for everyone. The system has good scalability and ease of serviceability, adaptability, low cost, and simple promotion with a wide range of applications. Keywords—sensor networks; real-time monitoring system; sensor node; hierarchical network topology; comminucation protocol

II. NETWORK ARCHITECTURE A. Hybrid Archetecure This system contains both wired sensor nodes and wireless sensor nodes which form a hybrid and hierarchical network. The architecture of this system is divided into two parts:

I. INTRODUCTION Firstly we assume an detailed application environment. Every student in school has the experience of occupying a seat in the studying room. In most cases, it will cost us a lot of time and energy to look for an ideal position. As the usage information of self-study rooms cannot be obtained by students, there may be some rooms has been overcrowded and the others are nobody cares, reducing the learning efficiency, waste learning resources. Therefore, this study hopes to take advantage of the sensor networks and design a sensor network system for real-time detection and statistics within each study room teaching road usage, and can reflect to the majority of students, for the students to provide a more humane learning environment, and the system can also facilitate the monitoring and management of self-study classroom teacher, more rational management, deployment of learning resources.

1) Wired sensor network in the corridors of building In the wired sensor network, a sink node is deployed in each floor and connected to the PNC sensor nodes in its floor. The PNC sensor node is in charge of counting the number of people in the room and transmitting the data to the sink node through wired communication module. Furthermore, the sink nodes of each floor are linked with control node by communication module too. 2) Wireless sensor network in study room In this wireless sensor network, every room is regarded as an unattached work area. The sensor nodes in one room are linked via wireless communication module, and every sensor is in charge of counting the number of people in one area and sensor nodes communicate with each other through wireless channel. In certain cases, the number of people in one room cannot be measured by a single sensor, so we need more sensors which can be added or deleted via using wireless sensor network.

The intelligent network system formed by any arrangement of microcomputer nodes in the space is called sensor networks[1]. A hybrid sensor network is proposed in our system which integrates wire and wireless sensor network [2][3]. The network consists of three types of nodes: people_number_count (PNC) sensor nodes, sink nodes and control node. Sensor node detects the change of number of people in one room and sends this data to the sink node which is deployed in each floor, then sink node aggregates the whole

B. Heirarcical Network Topology 1) Topology design of wired sensor network in corridors The topology of wired sensor network is as shown in Fig.1. The sink node in each floor connects with all PNC sensor nodes in this floor; the control node is linked with sink nodes

The work is supported by "the Fundamental Research Funds for The Central Universities, No.2014B01714", "the National Natural Science Foundation of China under Grant, No.61572172", "Qing Lan Project", "Natural Science Foundation of JiangSu Province of China, No.BK20131137 and BK20140248".

978-1-4673-8600-5/15 $31.00 © 2015 IEEE DOI 10.1109/CCITSA.2015.42

136

III. SYSTEM DESIGH

in each floor. All of the above nodes form the wire sensor network. If it's necessary we can add or delete PNC sensor nodes by connecting or disconnecting new nodes to the sink node in the same floor. Besides, in the case of adding more rooms to be measured, we need only link the PNC sensor nodes with its corresponding sink node. This hierarchical network topology has good scalability and easy maintainability.

A. Hardware Design of Sensor Nodes There are three kinds of sensor nodes mainly related in this system, which are the PNC sensor node, sink node and control node, respectively. The following hardware designs are proposed for each type node based on the network design. 1) The people_number_count (PNC) sensor nodes Screen Module

Input Module

Data Process Module

Shortdistance Wireless Communi cation Module

485 Bus Line Module

Sense Module

Power Management Module

Fig. 3. module of PNC sensor node

This type of nodes have the function of data processing, wired communication, short-range wireless communication, counting the number of persons and so on. According to the functional requirements, it is composed of the following modules as shown in Fig.3: sense module; short-range wireless communication module; 485 bus communication module; display module; input module; data processing module and power management module.

Fig. 1. work process design of wired sensor networks in corridors

2) Topology design of wireless sensor networks in selfstudy rooms

2) The sink node Screen Module

Input Module

Data Process Module

485 Bus Line Module

Fig. 2. work process design of wireless sensor networks in self-study rooms Power Management Module

When more sensors are needed to realize the function of measuring the number of people in one room, PNC sensor nodes can make up a small wireless sensor network using their short range wireless communication module in one room. Usually there are one master node and one or more than one slave nodes in a room which form a small wireless sensor network within one room. The sensor nodes in the small wireless sensor network have already been set as master or slave by procedures in the module. Each sensor node is in charge of one area of the room and senses the change of number of people in this area. Master and slave nodes make use of the short range wireless communication module (e.g. ZigBee [6]) to transmit the data. Master node integrates the data which is collected by each sensor node into a data that represents the total number of people in the room㧘and finally uploads it to the sink node in its floor. Master node communicates with the sink node in the same floor via wired communication module. The topology and work process of the wireless sensor network is illustrated in Fig.2.

Fig. 4. module of sink node

This type of node should be with the functions of data processing to make data aggregation, wired communication and so on. According to the functional requirements of the sink node, it is composed of the following modules as shown in Fig.4: the 485 bus communication module, display module, input module, data processing module and power management module. 3) The control node This type of node should be with the function of data processing, wired communication, local display and so on. According to the functional requirements of the control node, its modules include: 485 bus communication module, display module, input module, data processing module and power management module. Furthermore, if the result needs to transmit to a remote server, the control node should has an additional long-distance wireless communication module which can be 3g/4g, etc.

137

Data Process Module Input Module

It's the identification code for each node for each node to identify specifically which nodes are connected with itself. We can simply modify the address information of corresponding nodes to add or remove node.

485 Bus Line Module

Screen Module

Longdistance Wireless Communi cation Module (3g/4g, etc)

b) Command It is the specific content asking to the destination node, e.g. if the number of people from the destination node is needed to return, the command will be Peoplecnt. if temperature information is needed to return, the command will be Temp; and Answerall is the command for returning all the commands.

Power Management Module

Fig. 5. module of control node

c) Data Data is the specific answer content to command, such as the number of people. The data will be written between / /.

B. Design of Communication Protocol The network communication protocol is worked as "legal" in a system. It is necessary to define the communication protocol firstly before using a network. The network communication protocol will be introduced based on three elements as follows:

In summary, the address code is written between "", and the data is written between / /. It eases the identification and judgment of programming and promotes simplifying the program design.

1) Grammer It is divided into the following two kinds of data types:

3) Time Sequence By host inquiry, the entire process of network system is controlled, and the time sequence of the network is adjusted by command and answer.

a) Command The structure is "address" + "command", in which address means the address code of receiving sensor node and command refers to the specific content of the command issued. The Specific structure is explained as follows: Each command begins with the character @ and ends with the character #; address code is written in ""; the contents of the command are immediately following the address code; and the ending is marked by sending carriage returns \ n.

C. Programm Design 1) Programming of PNC Sensor Node According to the topology of wireless sensor network described in section II, PCN sensor nodes constitute a small wireless sensor network within one room. Therefore, one master node needs to communicate with one (or more than one) slave node. The master and slave nodes make the judgment of how to run program by identifying the address code. The process is shown in Fig.6.

Example: @ "XXX" Peoplecnt # \ n is asking XXX node about the information of number of people. The network has two special commands not written in accordance with the above format, which are asking instruction @ hello # \ n and return address code instruction @ IDnumber # \ n.

Initialization: Configure Address Code(e.g. 100)

Yes Yes

Is Master Node?

Use wireless module to send query command @hello#

No No Use wireless module to receive query command @hello#

b) Answer It is formed by "address" + "Command" + "data", where address and command has the same definition with a). Data refers to the specific data received from sensor nodes according to answer command. The specific structure of answer is as follows: Command beginning, address, command, and the ending same to a). Data is written between/ /.

No No

Receive successfully?

Receive data from slave nodes

Is received data correct? No No Not Not receive receive

Yes Yes

Yes Yes Send Command to request data from slave node @ 101 Answerall#

Send Address Code @ 101 ACK/#

Receive command to send data @ 100 Answerall#

Receive data from slave

Get the number of people by sense module

Receive Receive Send the total number of people in this room

Number of People

Example: @ "XXX" Peoplecnt /100/ # \ n is the number of people which sent to its superiors by XXX node. In addition, there is a special answer format. When the node needs to return specific data of multiple commands, the multiple answers are separated by a comma, e.g. @"XXX"Peoplecnt/100/, Temp/20/#\n.

No No Is format correct?

Transmit data

Wait for command from sink node

Data aggregation

End

End

Fig. 6. data flow of sensor node

2) Programming Design of Sink Node According to the topology of network, sink node is in charge of the following works: collect the PCN data from all sensor nodes in its floor; and make data aggregation of the receive data; ultimately send the aggregated data to control node. The work process is illustrated in Fig.7.

2) Semantics In the following, specific meaning and significance of each data segment will be explained one by one: a) Address code

138

Use 485 bus module to send query command @hello#

Initialization: configure address code

No Is the format correct?

Yes

Received data Not receive

Send answer command to the sensor node @ 100 Answerall#

Store the data & data aggregation

Wait for command from control node

Fig. 9. CodeWarrior 5.1 development environment

Receive

B. Implementation of System From Fig.10 to Fig.13 imply the deployment of three types of nodes and the implement of the hybrid sensor network.

Send the aggregated data the this floor

1) Deployment of PNC sensor nodes PNC sensor nodes are deployed near the door of the study room and PNC sense module is installed in the doorframe as shown in Fig.10. It needs attention that the installation height can't be over high to avoid blind zone of detection. In Fig.11, there are two doors in one study room, so two sensor nodes are installed near the doors. They form a wireless sensor network within the room and cooperate to get the information of the number of people in this room

End

Fig. 7. data flow of sink node

3) Programming Desigh of Control Node According to the network topology, control node obtains data from all sink nodes and then get the information of the room usage situation of the whole building. It can display the result locally or transmit the data to a remote server via an additional long-distance wireless communication. The process is shown in Fig.8 Use 485 bus module to send query command to sink node @hello#

Initialization

No No Is format correct?

Yes Yes Receive the data from sink node

Fig. 10. Deployment of PNC sensing module

Send return command to sink node @ 10 Answerall#

Store the data

Use DTU module to connect Internet and send data to remote server

Use 485 bus module to communicate with serial port screen module and show the whole data on screen

End

Fig. 8. data flow of control node Fig. 11. Deployment of sensor nodes

IV. SYSTEM IMPLEMENT

2) Deployment of sink node In every floor, one sink node is deployed to collect the PNC information of each room in its floor. Sink node communicate with the PNC sensor nodes via 485 bus communication. The deployment and network communication can be found in Fig.12.

A. Compile Tool We use CodeWarrior 5.1 as the development tool. CodeWarrior is a software from Metrowerks company for embedded development for MCU and DSP [7]. Fig. 9 shows the compile environment of CodeWarrior.

139

Fig. 15. Result display in control node

V. CONCLUSION Fig. 12. Deployment of sink node

In this work, we design a hierarchical sensor network to count the usage situations of self-study rooms real-time and accurately. Three types of nodes are designed and communication protocol is proposed. We do the experiment to realize the system successfully. The information can be displayed on the LCD screen in order to be seen by students. By using this system, the majority of students are able to arrange their plan which can save more time.

3) Deployment of control node There is one control node deployed in every building. The control node collects the data from sink nodes in every floor and comes out the result of all room usage data in this building. The result can be displayed by its display module. As an extension function, it can add remote wireless communication mode to transmit data to a remote server.

Besides, this project of sensor network system can be adequate for other circumstances. Such as in the business region, the passenger flow volume of each shop can be quickly detected by this system, then shopkeepers can analyze and summarize the data for winning higher economic benefits. It can be seen that the sensor networks with emerging technology has nice scalability as well as convenient maintainability. This system is able to detect the number of people and change law in every room even the whole building. It possesses advantages of wide range of applications, adaptability, low cost, and simple promotion. So the sensor networks system is very practical. In the future, it's possible that the DTU module and GSM module can be added to this sensor network system, and we can develop server programs to achieve remote access and view of this sensor network system which can provide much more convenient and pragmatic service.

Fig. 13. Deployment of control node

C. Experiment Result In experment, we make the three types of nodes and realize the network funciton based on the systme design above. Fig.14 shows the experement of wire sensor network, while Fig.15 refers to the final result which is displayed in the control node.

References [1]

[2]

[3]

[4]

[5]

Fig. 14. Experiemnt of wire sensor network

140

Puccinelli, D.; Haenggi, M., "Wireless sensor networks: applications and challenges of ubiquitous sensing," in Circuits and Systems Magazine, IEEE , vol.5, no.3, pp.19-31, 2005. Shi Lan; Miao Qilong; Jinglin Du, "Architecture of Wireless Sensor Networks for Environmental Monitoring," in Education Technology and Training, 2008. and 2008 International Workshop on Geoscience and Remote Sensing. ETT and GRS 2008. International Workshop on , vol.1, no., pp.579-582, 21-22 Dec. 2008 Guangjie Han, Deokjai Choi, Wontaek Lim. A Novel Sensor Node Selection Method Based on Trust for Wireless Sensor Networks. IEEE WiCOM, Shanghai, China, pp:2397-2400, Sep 2007. Nan Lin; Weihang Shi, "The research on Internet of things application architecture based on web," in Advanced Research and Technology in Industry Applications (WARTIA), 2014 IEEE Workshop on , vol., no., pp.184-187, 29-30 Sept. 2014. Asghar, M.H.; Mohammadzadeh, N.; Negi, A., "Principle application and vision in Internet of Things (IoT)," in Computing, Communication

[6] [7]

[8]

& Automation (ICCCA), 2015 International Conference on , vol., no., pp.427-431, 15-16 May 2015. ZigBee Alliance, http://www.zigbee.org/. CodeWarrior™ Development Studio IDE 5.X User’s Guide, http://www.coe.montana.edu/ee/courses/ee/ee371/pdffiles/ide_5.5_users _guide.pdf.

141

Guangjie Han, Hai Zhao, Jindong Wang, Tao Lin, and Jiyong Wang. Webit: A Minimum and Efficient Internet Server for Non-PC Devices[C]. IEEE GLOBECOM, Vol.5, San Francisco, USA, pp.2928– 2931, Dec 2003.