# Design of a Wireless Sensor Network Monitoring System for Biological and Pharmaceutical Products

Authors: Chun Ho Wu; Chun Kit Ng; Lixing Wang; G. T. S. Ho; W. H. Ip; J. Zhang
Journal: International Journal of Distributed Sensor Networks
 (2015)

---

## Abstract

Biological and pharmaceutical (B&P) products are essential in modern life. Currently, the demand and requirements of these products are dramatically growing; product quality and integrity then become crucial. As a key factor for ensuring quality and integrity, the current product status monitoring system needs to be enhanced in a more sophisticated and comprehensive way. This research describes the design of a wireless sensor network (WSN) monitoring system for B&P products supply chain management. In this study, the system architecture is presented based on the proposed framework. The framework consists of three processes: the first one is to generate a WSN with full coverage, the second one is to determine the optimal position of the sink, and the last process is to add additional relay nodes for providing fault tolerance to the network. Finally, a feasibility test on B&P product storage in a hospital is conducted. The proposed system provides a systematic approach for the deployment of sensor nodes and relay nodes. It also provides a relatively simple and rapid method for industries in general to follow and implement when designing a WSN system.


---

## Body

## 1. Introduction

Biological products refer to natural substances obtained from living organisms [1], which include blood, blood products, tissue, tissue products, organs, vaccines, microbial samples, and cellular specimens. Pharmaceutical products are drugs or medicines in traditional and modern medicine [2]. Both biological and pharmaceutical (B&P) products are critical and essential in many different areas, such as in medicine, health care, pharmacies, and biotechnology. However, B&P products are highly susceptible to variation of environmental factors, such as temperature, humidity, vibration, tilt, light, and atmospheric pollution. Traditional handling processes of these products in the supply chain are straightforward but have certain drawbacks, in which there is no real-time and continuous monitoring. Thus, unrecorded mishandling will eventually cause microbial or chemical contamination, an increase in the products’ decomposition rate, and leakage if no timely rescue action is taken [3]. Low quality products will jeopardize the health and even the life of end users and also lead to other serious consequences, such as monetary loss and reputation damage. Therefore, there is a need for a real-time and comprehensive monitoring system to keep tracking of the state of the pedigree of B&P products in the supply chain. To fulfill the emerging need, this research proposes a wireless sensor network (WSN) based monitoring system to prevent faults and to enhance the supply chain visibility.A WSN refers to a collection of sensor nodes with the capability of wireless communication [4]. These sensor nodes are generally small in size and cheap, have limited computational power and memory, and are equipped with a limited power source, whose battery is the most common form. In typical usage, sensor nodes are distributed into a target region and form a wireless network. Each sensor node collects the physical or environmental information of the surroundings, such as temperature, humidity, light intensity, and vibration. Information is then sent to a base station (BS), also called a sink, which is a central information aggregation node. Through the sink, a backend system will store the information gathered and perform further analysis and processing. In case the monitoring area is large, hundreds, thousands, or even more sensor nodes can be deployed on the site.In recent time, WSNs have attracted significant attention among researchers and practitioners and have been shown to have a high potential to be a highlighted technology in the next five to ten years [5]. Many WSN based monitoring systems for different applications have successively emerged. As with many new technologies, the adaptation threshold of WSN is relatively high. Considering the design of a WSN for a specific application, many design factors such as cost, energy efficient, coverage, network connectivity, quality of service (QoS), and fault tolerance should be taken into account. Furthermore, there are trade-offs existing between these design factors, so a better balance of the trade-offs has become one of the critical concerns. The design of a WSN is also specific to the application and environmental conditions [6]. Changes may adversely affect the cost and performance of the WSN, and this implies that redesign of the WSN is required. In particular cases, the warehouse of B&P products may vary from site by site. Therefore, a relatively simpler and more systematic WSN construction approach for B&P product monitoring systems will be helpful to both system operators and management. To address this issue, this research proposes a three-stage WSN construction process while considering three crucial design factors, coverage, network connectivity, and fault tolerance. In the first stage, the deployment of the wireless sensor nodes and the relay nodes is determined. Based on the result obtained, the deployment of sinks can be also determined in the following stage. In the last stage, the fault tolerance of the constructed WSN is achieved through the deployment of additional relay nodes, and the required number of the additional relay nodes is obtained using a statistical method.The rest of the paper is organized as follows. The next section reviews the similar works in the literature. Section3 presents a conceptual system architecture of the proposed system and a conceptual framework of the WSN management module is described. It focuses on discussion of the proposed common approach to balance the battery life of each relay node in a WSN. Section 4 is about operating the system using a feasibility test, which is studied to present the work procedure and the archived solution of the proposed system. Section 5 describes experimental analysis in comparing the proposed node deployment strategy with two general types of sensor node deployment strategies. Finally, conclusions are given in Section 6.


## 2. Related Works

The applications of WSN based monitoring systems can be classified into two categories: indoor and outdoor applications. Outdoor applications generally involve deploying a large number of sensor nodes in a large space; examples include precision agriculture monitoring [7], coal mine monitoring [8], and environmental monitoring [9]. The deployment of these applications is challenging due to the harsh outdoor environment. Thus, sensor nodes deployment, communication protocol design, and experiments for outdoor applications are difficult, costly, and time-consuming [10]. For indoor applications, such as data centre monitoring [11], patient monitoring [12], and industrial storage monitoring [13], many deployment strategies only consider the coverage and the network connectivity. However, these strategies may not satisfy certain applications requiring fault tolerance for long-term and reliable service. To address this issue, researchers have proposed solutions for some applications. A backup sensor placement algorithm for structure health monitoring (SHM) application was proposed in [14]. Backup sensors are placed beside potential failure sensor nodes, which are obtained by performing network analysis after the WSN is formed. Some other research works proposed k-connectivity approaches to optimize the number of additional sensor nodes, in which a k-connected WSN is able to tolerate k-1 fail nodes. For example, an approach called full fault-tolerant relay node placement (FFRP) was proposed to maintain k vertex-disjoint paths between every pair of sensor nodes and/or relay nodes through deploying minimum relay nodes [15]. Another approach called partial fault-tolerant relay node placement (PFRP) has been proposed which was used to ensure k edge or vertex-disjoint paths between every pair of sensor nodes [16]. These approaches successfully provide a certain fault tolerance to a WSN, but the implementation of these approaches involves complex calculations and procedures, which may be difficult and impractical for industries to employ.The contributions of interest for researchers in this paper can be summarized as follows. This paper describes generic system architecture for designing a WSN based monitoring system. It not only can be used for B&P products, but also is a reference for other applications. Considering the WSN deployment strategy, a relatively simple and systematic three-stage nodes deployment scheme is developed. In comparison with two general sensor node deployment strategies, the WSN constructed by using the proposed deployment scheme has longer network life than the other two.


## 3. Wireless Sensor Network (WSN) Monitoring System

The conceptual architecture of the proposed system is shown in Figure1 and consists of four layers, namely, the information acquisition layer (IAL), network layer (NL), logic and processing layer (LPL), and service output layer (SOL). In the IAL, the product state information and the environmental parameters (i.e., temperature, humidity, and vibration) are collected by the wireless sensor nodes, which are widely spread in the target area, such as a container, warehouse, or distribution centre. The collected data is then routed to the sink through the wireless sensor network (WSN). The sink is located at the network layer to perform data gathering and exchange as well as delivering the control commands from the wireless sensor network management module (WSNMM) to the sensor nodes. WSNMM is one of the core modules used to configure and manage the wireless sensor nodes and optimize their performance. After that, the data is then passed to the data integration and analysis core (DIAC) in the LPL through the Internet via the general packet radio service (GPRS), 3G, Wi-Fi, or other wireless technologies. In the DIAC, the data from the NL can be integrated with the RFID data from the RFID readers deployed at the gateway of the storage region, and further analysis and processing can be performed for decision making. Before setting up the WSN, the user configuration, such as data reporting rate and technical specifications of the B&P products, can be injected into the LPL for configuring and fine-tuning the performance of the DIAC.Figure 1
The conceptual system framework of the proposed system.As the WSN is deployed, SOL will deliver service outputs based on the decisions made in the LPL, including visualizing the data, prompting alerts when abnormal conditions occur, triggering the operation of actuators, and storing the collected and processed data in the database for querying and further analysis in the future.In this paper, the proposed monitoring system framework focuses on dealing with heterogeneous WSN, of which the WSN consists of both sensor and relay nodes. The sensor nodes are supposed to switch between sleep and wakeup mode to conserve energy and the relay nodes are set to be always active for routing the message from sensor nodes to the sink. For the deployment of both sensor and relay nodes, a three-stage process for WSN management is proposed. In the first stage, a WSN model is formulated by considering the sensing coverage and network connectivity. The sensor nodes are defined as a setS={s1,s2,…,sn} and each sensor has the same sensing range rs and communication range rt. The sensing range and communication range are defined based on the unit disc graph model [4], in which there is no significant RF attenuation between the centre and the circumference of the disc. Similarly, the relay nodes are defined as a set T={t1,t2,…,tn} with the same communication range Rt, which is larger than rt. The monitoring area is defined as a set of space points P={p1,p2,…,pn}. For a space point pi in the monitoring area, it is covered by at least one sensor node. This coverage constraint can be represented as(1)six-pix2+siy-piy2≤rs,where (six,siy) and (pix,piy) are the Cartesian coordinates of a sensor node si and a space point pi. Each sensor node in the WSN is also covered by at least one relay node. This can be represented as(2)six-tix2+siy-tiy2≤rt,where (six,siy) and (tix,tiy) are the Cartesian coordinates of a sensor node si and a relay node ti. Moreover, between each pair of relay nodes, there should be a path shorter than the communication range of relay node Rt, and it can be represented as (3)tix-tjx2+tiy-tjy2≤Rt.As the relationships between the nodes in the WSN are built up, the next step is to calculate the required number of sensor nodes. The objective of the first stage is to obtain the minimum number of sensor nodes so that the total sensing range covers all the space points in the monitoring area.In the next stage, the position of the sink is considered. The sink is suggested to be located in an optimal place where the total power consumption of all the relay nodes for data transmission is a minimum [17]. In other words, it means that the total distance between each relay node and the sink should be minimized, because the rate of power consumption is proportional to the distance between the transmitter and a receiver. This can be represented as (4)(x0,y0)=argmin⁡(x,y)∑i=1Ntix-bx2+tiy-by2,where (bx,by), (tix,tiy), and (x0,y0) are the Cartesian coordinates of a sink b at an initial position, a relay node ti, and the optimal position of sink b. N is the total number of relay nodes in the WSN.After going through the first two stages, a ready-to-operate WSN is constructed. However, the WSN is still weak in tolerating node failure, especially relay node failure. As mentioned before, the relay nodes continue in an active state for routing data, the failure rate due to energy exhaustion, and hardware/firmware malfunction being significantly higher. Since the relay nodes form the communication backbone of a WSN, failure of any of them may cause data loss or network collapse. Therefore, in the last stage, additional relay nodes are inserted into the WSN to prevent relay node failure. The additional relay nodes are deployed around the existing relay nodes and stay in a sleep mode at the beginning. They will then wake up periodically and communicate with the existing relay nodes following the Ping-Ack protocol. Once a relay node fails, an additional node nearby will not receive an acknowledgement when it wakes up and polls the relay node. Then, the additional node will wait for a random time from one to five seconds and retry to poll the relay node. If the additional node cannot receive acknowledgement after five retries, the additional node will substitute the functionality of the original relay node.The number of the additional relay nodes is calculated following a series of procedures. Firstly, the monitoring area is divided inton regions based on the coverage areas of the relay nodes. Then, the number of days of different area usage rate is counted in a period when the batteries are expected to be recharged or replaced. The area usage rate refers to how many regions are used for inventory storage. For example, the days in period 1 in which the area usage rate stays above 0, 1/n, 2/n,…n-1/n are counted, respectively, using statistics, where n is the total number of relay nodes. The results are represented as D11,D12,…,D1n. Since one sample is inadequate, the day counts are recorded in the successive periods 2, 3, … until the sample size is statistically reasonable. In the next step, the mean and standard deviation of a region k can be calculated as(5)Dk¯=D1k+D2k+⋯Dmkm,where m is the number of periods counted(6)σk2=m-1m∑i=1mDik-Dk¯2.The collected data is then inputted into a distribution fitting software program, called Stat::fit, for statistical analysis, and the distribution of Dk can be obtained. For example, the normal distribution is obtained from the feasibility study, which is described in next section:(7)fDk,Dk¯,σk2=1σ2πexp⁡-Dk-Dk¯22σ2,and the reliability level should be guaranteed to be larger than r:(8)FDk,Dk¯,σk2≥r.Then, the number of relay nodes in space k can be represented as(9)N=DkE-1,where N represents the additional number of relay nodes and E represents the days the relay nodes can survive when being active.


## 4. A Feasibility Study of the Proposed System

In this section, a case study is conducted to show the feasibility and describes the operation procedures of the proposed system.There is a storage room for B&P products in the studied hospital as shown in Figure2, in which there are four zones. Zone D is a refrigerated area, which is for products with different storage temperature needs, where there are existing own monitoring devices. Therefore, we only discuss the devices designed and installed for Zone A, Zone B, and Zone C.Figure 2
The storage zones for B&P products.The wireless sensor nodes and relay nodes are deployed in the storage room to monitor the environmental condition surrounding the B&P products. According to the previous section, the procedure is divided into three steps. In the first step, the sensor nodes are deployed to cover all the area in the storage room by applying formula (1). The sensor node deployment strategy is based on a greedy algorithm. Pseudocode 1(a) shows the pseudocode of the sensor node deployment. In the initialization stage, P is defined as a set of small grid points representing the space points in the monitoring area. C(si) is defined as a set of points covered by a sensor node si, in which the covered points conform to formula (1). S is defined to store the position of the deployed sensor nodes, which is set as empty at the beginning. When the algorithm starts to execute, a sensor node si is placed in a position where the intersection of the area covered by si and the uncovered monitoring area is a maximum. If there are many options in placing the sensor node, the algorithm will randomly choose one of the options. Then, the covered points will be subtracted from P and the position of the sensor node will be stored in S. The placement process runs continuously until P becomes an empty set, which means all the grid points are covered.Pseudocode 1:Pseudocode of node deployment algorithm: (a) sensor node deployment algorithm and (b) relay node deployment algorithm.
Node Deployment Algorithm
(a)
(1)INITIALIZATION:
(2)  SetP as a set of grid points which P = {p1,p2,p3,…,pn}
(3)  SetC(si) as a set of points covered by a sensor node si which conform to formula (1)
(4)  SetS as a set of sensor nodes which S=∅
(5)STEPS:
(6)While  P≠∅
(7) randomly place a sensor nodesi that maximizes |C(si)∩P|
(8)P=P-C(si)
(9)S=S∪{si}
(10)End While
(11)Return  S
(b)
(1)INITIALIZATION:
(2)   SetC(ti) as a set of sensor nodes covered by a relay node ti which conform to formula (2)
(3)   SetT as a set of relay nodes which T=∅
(4)STEPS:
(5)While  S≠∅
(6) place a relay noderi that maximizes |C(ti)∩S| AND conform to formula (3)
(7)S=S-C(ti)
(8)T=T∪{ti}
(9)End While
(10)Return  TThe in-house developed sensor node used in the case study is shown in Figure3. It consists of a digital humidity and temperature sensor, an ultrasonic sensor, and a ZigBee communication module.Figure 3
The sensor node used in the case study.The relay node was developed using the same hardware architecture as the sensor nodes, but the wireless communication module is set as a ZigBee router instead of a ZigBee end device, and a higher grade of microcontroller is used. Table1 shows the specification of the sensor and relay nodes. The sensor node deployment results are shown in Figure 4. After calculation, it was found that 42 nodes were needed.Table 1
Specification of the sensor and relay nodes.
Parameter
Value
Frequency band
2.4 GHz
Receive current consumption (RX)
24 mA
Transmit current consumption (TX with 1 dBm output)
29 mA
Transmit current consumption (TX with 4.5 dBm output)
33.5 mA
Sleep current consumption
1μA
Radio baud rate
250 Kbps
Flash memory
128 KB
RAM
8 KB
Packet size
45 bytesFigure 4
Deployment of sensor nodes.In the second step, formulas (1)–(3) are again applied to calculate the number of relay nodes to cover all the sensor nodes in the deployment area for receiving all the information. The pseudocode of the relay node deployment algorithm is shown in Pseudocode 1(b). It is also based on a greedy algorithm, which is similar to the sensor node deployment strategy. The optimal location of the sink is then determined by using formula (4). Figure 5 shows the location of the sink, and 14 relay nodes are needed. At this point, the initial instalment of the node deployment is finished. In the third step, an investigation is made to find whether the storage room is always full. If the answer is no, the instalment is finished. Otherwise, some additional relay nodes should be added. As 14 replay nodes are deployed, the room can be divided into 14 regions. Thus, the days that the inventory level stays above 0%, 7.1%, 14.2%, …92.3% are counted. In this case study, the historical inventory information is used for the statistics, and a normal distribution is obtained from the distribution fitting software, Stat::fit. Concerning the goodness of fit, the Kolmogorov Smirnov (KS) test was used and the result showed an acceptance of “Do not reject” with a significance value of 0.05. Batteries were replaced regularly each month (30/31 days). The average active working days for the battery of a relay node were 6 days. The reliability was set as 99.5%. After calculation by formulas (5)–(9), the additional relay nodes in each region were determined. Table 2 shows the results.Table 2
Estimation of additional relay nodes.
Zone
Region (k)
D
k
N
A
1
31
5
A
2
31
5
A
3
28
4
A
4
29
4
B
5
27
4
B
6
27
4
B
7
25
4
B
8
26
4
B
9
10
1
B
10
6
0
C
11
17
2
C
12
19
3
C
13
12
1
C
14
4
0Figure 5
Deployment of relay nodes and the sink.As the result shows, Zone A has the highest priority for deploying more additional nodes, and 4 to 5 additional nodes for each relay node are needed. Zone B has less priority and Zone C has the lowest priority. At first, all the additional relay nodes were set in sleep mode. If the warehouse was not full, the idle relay node in the region was also set in sleep mode.After the deployment of WSN, the system works to collect data. Figure6 illustrates a main interface of the web-based system. In this case, the main function of the system is to monitor the stock in and out and, more importantly, the environmental factors (i.e., temperature and humidity) in the storage room. When there are products stored in a particular region, the corresponding relay node is set in active status. It activates sensor nodes in the region to monitor temperature and humidity. Once an abnormal temperature appeared, the system will send an alert to the users. Thus, the hospital can take immediate action to cope with any accidental events. RFID tags are recommended to be installed on the B&P products or pallets of the B&P products. The functions of the system can be therefore extended with the application of RFID. The arrival and leaving time can also be recorded automatically, making it useful for the management of B&P products. Table 3 shows the types of the information collected by the system.Table 3
Types of collected environment and product information.
Global data
Date and time
Number of zones
Zone ID(s)
Number of regions
Region number(s)
Number of nodes
Nodes number(s)
Relay node data
Battery capacity
Serial number
Node number
Region number
Status
Sensor node data
Temperature
Humidity
Battery capacity
Serial number
Model number
Node number
Status
Product data
Zone ID
Region number
Product serial number
Transaction ID
Tag ID/pallet ID
Arrival date and time
Storage date and time
Leaving date and time
Quality guarantee date
Temperature record (during the storage)
Humidity record (during the storage)Figure 6
The web-based interface of the proposed system used in the case study.


## 5. Experimental Analysis

For comparison, two types of general sensor node deployment strategies were used in this case study with the objective of achieving full coverage (i.e., the coverage metrick=1) of the region of interest. One of the deployment strategies is controlled deployment, at which the nodes are deployed into the region of interest evenly following a grid, with size r/2. Another one is random deployment, in which the nodes are deployed randomly following a Poisson point process with the density λ equal to 0.044 in order to fulfill the coverage requirement [18]. The sink position of both strategies is set to the middle of the region of interest.To perform the comparison more comprehensively, a new performance metric called network health is introduced, and an experiment is conducted to test the network health of the three approaches. The network health is measured as a percentage, in which 100% network health means that the data from all the sensor nodes can be received by the backend system under the assumption that the Internet can always be connected. If there areS nodes in total in a WSN, the connection loss of one node results in a 1/S decrease in the network health.For conducting the experiment, each sensor node in the WSN sends a measurement data periodically every 5 seconds to the backend server through the sink when the products are stored in its sensing coverage zone. If there is no product detected, a node will send a message of no product present to the backend system and switch to sleep mode and will wake up every 10 seconds to check whether there are products in its sensing zone. The backend system will count the data from each node. If the data of a node is not received continuously over 1 minute (60 seconds), the node is treated as a dead node and the overall network health will decrease in proportion accordingly.Table4 shows the preliminary comparison results of these two general node deployment strategies (approaches A and B) and the proposed approach (approach C). In approach A, 58 sensor nodes were deployed in the targeted monitoring zone with 100% coverage rate and the LEACH clustering algorithm was used for the energy efficiency measure. Similarly, in approach B, 129 sensor nodes were deployed with 100% coverage rate and the LEACH clustering algorithm was used. In approach C, 42 sensor nodes were deployed with 100% coverage rate. Since the two-tiered clustering method was applied, 14 relay nodes were deployed for routing the data from the sensor nodes to the backend system, and also 41 additional relay nodes for fault tolerance. For the cost in terms of the number of sensor nodes, approach A is 58, approach B is 129, and approach C is 108, where the cost of a relay node used in approach C is equal to 1.2 times that of a sensor node. Figure 7 illustrates the experiment results in these three approaches. As the results show, the network health remained 100% at the beginning. Around the 14th day, the network using approach A started losing nodes. This node loss occurred in the network using approach B around the 16th day, which was later than approach A. For approach C, the network health drop occurred around the 18th day.Table 4
The deployment results of the three deployment approaches.
A (even deployment with grid)
B (Poisson process deployment)
C (proposed approach)
Number of sensor nodes
58
129
42
Number of relay nodes
0
0
14
Energy efficiency measure
LEACH clustering
LEACH clustering
Two-tiered clustering
Additional relay nodes
0
0
41
Coverage rate (%)
100
100
100
Total nodes
58
129
97
Cost
58
129
108Figure 7
The experiment results of the three deployment approaches.As the results show, the three approaches can achieve 100% coverage rate. Approach A has poorer performance in terms of network health than the other two approaches, although its cost is the lowest. For approach B, the occurrence of node loss is later than approach A. It may be because of more nodes sharing the routing load in approach B, but its cost is the highest. Approach C contains fewer nodes than approach B, but it had better performance in the experiment. The reason is that the relay nodes take over the routing works and they are fault-tolerated by the additional relay nodes. Another reason may be because there is no guaranteed number of redundant nodes to share the routing load in some critical regions (e.g., the region connecting two large portions of the network) in the WSN. When the energy of the nodes in these critical regions runs out, a large number of sensor nodes will become dead nodes and the network health may drop significantly.


## 6. Conclusions

Adopting WSN technology requires consideration of a series of design factors, including energy efficiency, sensor nodes placement, sensing coverage, and network connectivity. To manage these factors effectively, a three-stage framework is proposed. In the first stage, a minimum number of sensor nodes and relay nodes are placed, fully covering the monitoring area. Next, the sink is put in an optimal place where the total transmission power of all the relay nodes can be minimized. Lastly, the number of additional relay nodes is calculated, in order to provide fault tolerance to the relay nodes in a WSN. The proposed approach uses statistics to calculate the number of the additional relay nodes needed in a target area. Furthermore, a feasibility test is conducted to show the work procedure and functions of the system. In the case study, the proposed system shows its superiority over the common control and random sensor node deployment strategies, through which the WSN using the proposed approach can provide longer monitoring services. To conclude, the proposed system provides a systematic manner for the deployment of sensor nodes and relay nodes, which also provides a relatively simple and rapid method for industries, in general, to follow and implement when designing a WSN system. However, the proposed deployment algorithm is mainly based on a greedy algorithm. An optimal result in terms of the number of deployed nodes may not be guaranteed, which implies the total implementation cost of a WSN system using the proposed approach may not be well justified. Therefore, our future work will focus on designing and developing a rapid approach to optimize both the aforementioned basic design factors and the number of deployed nodes simultaneously.



---

*Source: 760242-2015-04-07.xml*