1 Wireless Sensor Network
In this chapter, wireless sensor network (WSN) principles are being shortly introduced and discussed. In order to increase the level of understanding for analyzing Wireless Sensor Network (WSN) systems it is useful to study the technology behind them – the technologies which are presented in this section.
Wireless Sensor Networks (WSNs) are distributed and independent sensors that are connected and worked together to measure quantities such as temperature, humidity, pressure, noise levels or vibrations . WSNs can measure vehicular movement (velocity, location, etc.) and monitor conditions such as lightning condition, soil makeup and motion . Nowadays, WSNs are utilized in many common applications such as vehicle applications. Some of vehicle applications are: vehicle tracking and detection, tire pressure monitoring, vehicle speed detection, vehicle direction indicator, traffic control, reversing aid sensors etc. Such applications can be divided in major categories such as safety, security, environment and logistics.
To implement WSN in an application and have an efficient system, first we need to consider about WSN technology, components and communication topology and protocols. Therefore, first, in this chapter, basic information about WSN components, the communication devices and process unit of WSN will be described. Then, the chapter will be followed by a description of the WSN topologies and protocols emphasizing on mesh WSN technology with ZigBee Protocol.
1.1 Wireless Sensor Network component
To provide comprehensive view of WSN hardware, understanding of WSN components’ structure is required. Wireless sensors are small microcontrollers equipped with wireless communication device and an energy supplier. The architecture of WSNs is illustrated in Figure 3â€‘1 .
As Figure 3â€‘1 shows the components of WSNs are sensing unit, processing unit, power supplier and communication device. The sensing unit consists of sensors and Analog to Digital Converters (ADCs). ADCs are responsible for gathering the signals and converting them into digital signals data and transfer them through each other using network topology to the processor unit. In the sensing unit, each sensor is called an ‘end node’ and varies in size and cost. The mission of these multifunction sensor nodes are to sense, process data and collaborate with other nodes . Wireless sensor network can be positioned in two ways, either using a complex technique with the large sensors far from the object or using several sensors with an engineered design on position and topology . In addition, each node provided with a wireless communication transceiver as a communication component.
In the process unit, the controller and small memory storage are responsible for managing the collaboration within the sensors to achieve the assigning task. In addition, the communication device with a transceiver makes the network connection. Above all, the essential component of WSN is the power unit, which supports the power for all units .
One of the unique characteristics of sensor networks is that they are equipped with an on-board processor. This feature enables them to locally process some simple computations and broadcast only necessary processed data . Network communication is really complicated and needs years of study , but to be able to implement WSN, we need to know some basic primary concepts of communication technology such as; network topologies, network protocol and their standards and specifications.
1.2 Communication technology
To cover technical aspects of WSN, network topology and network protocol studying is needed. This study will help to provide information about reliability, robustness, security and stability and of WSN’s software aspect to answer the research questions RQ. 1 ,RQ. 2 and RQ. 3 .
1.2.1 Topologies in WSN Communication
In network communication, the big issue is how data transfers through nodes and nodes interconnect with each other. Several basic network topologies may be used for transmitting to and receiving from a node. The Alliance for Telecommunications Industry Solutions (ATIS) – the standards organization of telecommunication industry – explained the network topology as “The physical, real, logical or virtual arrangement of the nods/elements of a network” . The topology shows the diameter and the number of nodes between any two nodes. Moreover how a data process and the data routing complexities are relied on the chosen topology. Consequently, some characteristics of a sensor networks such as latency, robustness and capacity are changed by their topology .
Figure 3â€‘2 is a graphic mapping of networks topology which shows the links of one or more nodes and explains the physical topology of the network. Despite having the same topology, two networks can differ in transmission rates because of their physical interaction, signal types and distance between nodes . Table 3â€‘1 describes the different types of network topology.
Basic topology types
|Point-to-point||Permanent||A permanent connection between two endpoints and nodes|
|Switched||A dynamic point-to-point circuit that can be dropped if needed.|
|Bus topology||Linear topology||All nodes are linked to a common transmission medium (bus) which has exactly two endpoints and all data is able to transfer through all nodes.|
|Distributed bus||All nodes of the network are linked like a branch to a main bus which causes more than two endpoints. Data goes in all directions to all nodes connected on the bus cable until it finds unique addresse.g. the MAC address or IP address on the network and transmit the data.|
|Ring topology||Each node is linked in a ring or loop to the closest node. The data travels in the ring only in one direction and each node can transmit only one piece of data at a time. Ring topology used control access in the network and if one node fails entire network will fail.|
|Star topology||Each node has exactly two branches linked to it. External nodes are connected to a central node. The external nodes are only permitted to communicate with the center node and a failure of an external node will cause it to be isolated from the others.|
|Tree topology||Each node is linked in different tree paths. In each branch, each node transfers the data to upper node. So, a node failure causes the whole connected branch to fail.|
|Mesh topology||Partially connected||At least two nodes linked with two or more node in a network.|
|Fully connected||Direct link between any two nodes. There will be n(n-1)/2 links|
Mix topology types
|Hybrid topology||An arrangement of any two or more different basic network topologies.|
Table 3â€‘1 Topology TYPES .
Since Mesh topology is a main topic in the thesis, it is studied more in-depth in this section
184.108.40.206 Mesh Wireless Network
Wireless mesh network is a term used when all wireless nodes are connected to each other within an ad-hoc multi-hob and mesh topology. In this network, any pair of nodes is able to communicate between each other within more than one path. In this network each node is used as a router to forward packets to the neighbor nodes which they have linked to. That means all nodes communicate directly or through other midway nodes without any manual configuration. Therefore, this network also called a self-configuration and self-organized network [11; 12].
As described in Table 3â€‘1, there are two types of mesh topology ‘Partially connected’ and ‘Fully connected’ (See Figure 3â€‘3). In a fully connected topology each node has the ability to communicate with all other nodes in the network and creates an interconnection links. By increasing the number of nodes in a mesh network, the number of links increases as well. On the other hand, in a partially connected topology, instead of direct interconnection between nodes, each node has two or more links to others to provide alternate routing and traffic balancing. Due to more links and indirect connections between nodes, traffic can flow through one or more router nodes to the destination  and create more reliable interconnections between nodes.
Moreover, in partial network, the nodes are connected to either the node with higher rate of data transaction or the nearest neighbor node while in fully connected network all nodes have a direct links with each other. This multiple link path conducts a reliable communication. Therefore, whenever a connection fails or a node breaks down, the packages can automatically change their path by ‘jumping’ from a disconnected node. This is often called the self-healing of the network. This means that the network’s connection stability and reliability are not essentially affected by node failures .
Due to the characteristics of wireless sensor network mesh, this network is self-configuring and self-organizing network in which each end-node is also used as a router (dual role- data originator /data router) to forward the signal packages all the way back of the main gateway.
Therefore, due to the characteristics of mesh networks, this network is becoming one of the most implemented networks which able to have the flexible architecture for the network, easy self-configuration and robust fault tolerance connectivity [11; 12]. Additionally, the self-configuring characteristic of mesh WSN, bring the ability for the network to connect or disconnect nodes from the network. This brings the ability to grow/decrease the network by adding/removing nodes of a system.
Mesh WSN has reliable self-healing and robust fault tolerance. This means if a node fails or breaks down the signal packages jump from the disconnected node and automatically conducts a new path through the nearest node. However, the new path imposes re-routing and re-organizing to the network , which consumes too much power from the system. Therefore, having a power-aware protocol and algorithm is necessary for mesh network. ZigBee protocol is one of the protocols which provides this ability for WSN.
1.2.2 Protocols in WSN Communication
WSN systems include variety of protocols for communication. Protocols need to program in different architectural layers. One of these architectural standard is OSI (Open System Interconnection) framework. In this session a brief introduction of each protocol and OSI are delineated.
Figure 3â€‘4 shows the graphic overview of all wireless network technologies. This figure illustrated IEEE PAN/LAN/MAN technologies and clearly shows how these standards and protocols can be used in different conditions. For instance, 3G protocol is used to cover a long range of audio information in a wide area network (WAN) while for the same information in a short range and personal area network (PAN), Bluetooth is better.
The standard conceptual rules set for data representation, data communication and error detection across two ends in telecommunication, are called communication protocols. These abstract rules represent in different layers of communication. There are different protocol stacks introducing different architectures for these layers such as AppleTalk, Distributed Systems Architecture (DSA), Internet protocol suite (TCP/IP) and Open Systems Interconnect (ISO/OSI). Figure 3â€‘5 (a) illustrates the different layers of an OSI Model and their functionalities. The OSI model has seven layers and each layer provides services for the upper layer and requests services from the lower layer. Figure 3â€‘5 (b) shows the typical communication protocols layers. Each of these layers has to deal with different issues regarding the communication procedure.
As the typical protocol stack model shows in Figure 3â€‘5 the communication protocols should implement all layers from bottom to top. In addition, a management protocol needs to be applied in each layer to manage power efficiency, robust connectivity and connection reliability (see: Figure 3â€‘5 b). Below, rules and functionality for each layer are described:
* Physical layer: is responsible for signal processing and physical interface connectivity between a device and physical medium and used bit stream in its data unit. It acted as communication channel for sensing and actuation in cost-efficient and reliable manner. Some examples of this layer are: IEEE 802.11b/g Wi-Fi, IEEE 802.15.1 Bluetooth, IEEE 802.15.4 ZigBee, etc. 
* Data link layer: provides functionality toward channel sharing, Medium Access Control (MAC-Layer), timing (e.g. data time arrival), local link and capacity. It is responsible for detecting and correcting the data errors in physical layer and control the locality data comparison. It follows the protocols such as point-to-point protocol (PPP) and IEEE 802 Local Link Control (LLC). 
* Network layer: is responsible for network routing functionality, network security, energy and power efficiency and reliability of the communication. It includes the network topology management and manages the information and detects errors in data transfer from router to router. A number of protocols is address in this layer such as: Internet protocol (IP), Threshold Sensitive Energy Efficient Sensor Network Protocol and etc. .
* Transport layer: provides end-to-end transportation (distributing and gathering) of data between end users. It includes storage and responds for caching and controlling the data to recover them back to the initial message that has been sent. Best-known protocols for this layer are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) .
* Upper layers: The Upper Layers are responsible for application processing, external query processing and etc. Upper layers include presentation layer session layer and application layer .
The summary of these standards and protocols are shown in Figure 3â€‘6
Among all the standard and protocols, IEEE PAN/LAN/MAN technologies are the ones applied in the majority of commercialWSNs to support physical layer and link-data layer signal transmission. As SOHRABY and ZNATI (2007) mentioned, the most common best-known protocols are:” (1) the IEEE 802.15.1 (also known as Bluetooth); (2) the IEEE 802.11a/b/g/n series of wireless LANs; (3) the IEEE 802.15.4 (ZigBee); (4) the MAN-scope IEEE 802.16 (also known as WiMax); and (5) radio-frequency identification (RFID) tagging” . Each of these protocols has their own benefits and constraints. The comparisons between IEEE technologies are mentioned in Table 3â€‘2. As Table 3â€‘2 shows the IEEE 802.15.4 standard provides data rate of 20 to 250 kbps and operates in the 2.4-GHz ISM band. This standard covers signals in range of 10 m and requires the lowest power among other IEEE class. While IEEE 802.11a/b/g/n transmits the data in the rate of 54 Mbps ideal for wireless internet connections and operates in the 2.4-GHz ISM (Industrial, Scientific and Medical) radio band as well as the 5-GHz ISM / 5-GHz U-NII (Unlicensed National Information Infrastructure) radio band. However, it requires much higher power consumption than IEEE 802.15 .
Recently, researchers put much effort to develop “a cost-effective standards-based wireless networking solution that supports low-to medium data rates, has low power consumption, and guarantees security and reliability” . ZigBee Alliance is an association of companies which aims to provide such a standard for WSN consumers. Their mission is to have a simple, reliable, low-cost, low-power and standards-based wireless platform
220.127.116.11 ZigBee standard
The ZigBee standard builds on IEEE 802.15.4 and is suitable for remote monitoring and controlling applications. Although it has lower-data-rates than the other standards, its reliability, security, long life battery with less complexity mechanism make it ideal for building automation in industrial network applications. The architecture of the ZigBee stack is established on the Open System Interconnection (OSI) model. The IEEE 802.15.4 defines the physical layer (PHY) and medium access control (MAC) sub-layer and In addition, ZigBee Alliance defines other functionalities for upper layers . Figure 3â€‘7 is a graphic overview of ZigBee protocol stack and shows the responsibility areas of IEEE 802.15.4, ZigBee Alliance platform and users applications . This picture also shows the basic functionality of each layer.
The data transmission service is provided by PHY layer and the protocol in this layer enables the connection between data units and the physical radio channel. ZigBee provides three different frequency band options for PHY layer. First, the transmission data-rate of 250kbps in 16 channels at 2.45GHz (Global) frequency. Second, with 40Kbps in 10 channels at 915MHz (Americas). And the last one, with 20kbps in 1 channel at 868MHz (Europe). The higher data-rate causes a higher order in modulation design and the lower frequency cause a larger cover area and better sensitivity. Depending on the power output, the transmission distance rate can change from 1 to 100 meters. (For more detail information see: Table 7â€‘1 in Appendix A)
ZigBee WSN has the ability to have static or dynamic network/component with either star or mesh topology and it has three types of nodes: a ZigBee Coordinator (ZC), ZigBee Routers (ZR), and ZigBee End-Devices (ZED).
In order to have a communication protocol and physical connection both PHY layer and MAC sub-layers of the architecture should be defined upon agreement between server and clients. These layers require manual administrative procedures setting for server/client gateway.
The next three levels namely: the network layer, security protocol and transport layer are defined by ZigBee alliance platform automatically. The last layer, application layer, has to interact with the user-interface and other applications; it ought to be programmed with high-level language so that integration with any existing device’s applications becomes more conveniently practical.
The ZigBee stack in gateway is responsible for all the network functionality such as network process management, authentication of the joined nodes, binding nodes and routing the messages throughout the network. ZigBee stack as a standard protocol, has clusters and libraries for improving the implementation process, therefore, using ZigBee compare to other protocols makes the system (including both hardware and software) development process much faster and easier. On the other hand, such standardisation provides easiness of adopt with third party sensors regardless of manufacturer, which might be attached to the network later.
2 Software Aspects
To address the research question regarding the reliability, robustness, and security of any WSN application, it is essential to investigate the software architecture of that network. For convenience in description of the architecture of a WSN application, it is divided into three segments: Physical devices (such as lamps, sensors, nodes), Communication Protocol (terminals and servers, bridge, switch, network topology and standard) and Carried Information (application, functions, etc.).
Any attempts to retain a precise design on software architecture for each part will cause an effective data transmission, which ensures reliability and security of the system . Hence achieving any desired data transmission precision level in a WSN, network management (NM) techniques are applicable. Such techniques assist in network status monitoring, reliability and security amendment, and cooperation supervision between components . NM techniques could also detect and resolve network faults in addition to restoring the system respectively .
In practice, designing WSN application necessitates tailoring NM techniques for each architectural segment. Various NM techniques regarding each segment are summarized as follows [7; 12; 5]:
a) Physical architecture:
Sensing and processing management, operation and administration, fault tolerance, maintenance, energy efficiency management, configuration management, performance management, security management, network element management.
b) Communication architecture:
Network management, networking protocols, network topology, function management, monitoring functions, fault management, performance management, security management, service management and communication, maintenance management, network configuration and organization, network behavior, data delivery model, sensor mobility, naming and localization, sensing coverage area, communication coverage area energy efficiency management
c) Information architecture:
Real-time information management, mapping management, service management, analyze information, control application, business application management report management, sending and receiving commands or response, naming, localization, maintenance, fault tolerance
Aforementioned NM techniques enhance quality of the system. According to ISO 9126-1 software quality model Table 4â€‘1 [13; 14; 15], the quality characteristics of a system could be divided into six fundamental properties: functionality, reliability, usability, efficiency, maintainability, and portability. According to the same documentation, these characteristics are broken to sub-characteristics such as suitability, security, maturity, fault tolerance, adaptability, analyzability, stability, testability and so on . However, focusing on all subcategories collectively exceeds the time horizon of this research, from this stance three dimensions namely reliability, robustness and security are brought into attention.
This section will be divided to two subsections describing the architecture issues and NM techniques for (1) Reliability and Robustness, (2) Security, of WSN and other characteristics is relegated to future studies.
2.1 Reliability and Robustness
In WSNs context, the probability that a network functions properly and aggregates trustworthy data without any interruption continuously, is usually referred to as reliability characteristic of the network [23; 20]. According to ISO 9126-1 software quality documentation, reliability characteristic shows the capability of a network to maintain or re-built (re-start) the service in certain period of time . So, it is important that during long sensing, the network has to service up continuously. Reliable service of a network includes precise and proper sensing, delivering and sending acceptable data to the base station. In other words as Taherkordi et al. (2006) put: “The less loss of interested data, leads us to higher reliability of a system”. Systematic approach perceives reliability as probability of data delivery to the base station rather than point-to-point reliability .
Robustness defined by Sohraby et al. (2007) as: “a combination of reliability, availability, and dependability requirements”, reflects the degree of the protocol insensitivity to errors and misinformation”. Achieving system robustness in WSN, necessitates system capability to detect, tolerate and confine errors as well as reconfigure and restart the network respectively . According to the given definition by Sohraby et al. (2007), it is apprehensible that reliability and robustness share commonalities with each other; this is the main rational behind discussing these two attributes together in this section .
Considering the nature of communication in WSN, a network is unpredictable and prone to fail caused by any physical damages in hardware devices, energy depletion, communication link error, information collapses in packages and etc. [17; 16]. Therefore, one of the critical issues in design phase of WSN is applying fault tolerance techniques to optimize the network so that reliability and robustness attained . These techniques enable the network to withstand and recover any upcoming failure and restart operation .
Liu et al. (2009) categorized fault tolerance techniques into: node placement, topology control, target and event detection, data gathering and aggregation, and sensor surveillance. Reminding from the beginning of this chapter architecture design divided into three segments. Table 4â€‘2 depicted a summary of the plausible related faults and their solutions in each segment. In the following, each aforementioned fault tolerance techniques are being discussed in each design segment.
|a) Reliability and Robustness in Physical Architecture||
Fault: any interruption in sensor surveillance, sensors failure
Solution: Node placement management, signal-effect management, hardware replacement
|b) Reliability and Robustness in Communication Architecture||
Fault: communication link errors, energy depletion
Solution: topology control and event detection , replicated services in communication model, Power consumption management
|c) Reliability and Robustness in Information Architecture||
Fault: Losing the data package
Solution: data gathering and aggregation management
Table 4â€‘2 The most probable fault and their fault tolerance solutions in WSN [17; 7; 18]
2.1.1 Reliability and Robustness of Physical Architecture:
|a) Reliability and Robustness in Physical Architecture||
Fault: any interruption in sensor surveillance
Fault sensors failure
Solution: hardware replacement
– Fault: any physical interruption in sensor surveillance
– Solution: Node placement management and signal-effect management
First item that should be considered in designing physical components architecture for reliability and Robustness is: physical placement and signal-effect management. As it is mentioned in section 3, although the mesh network communication is self-organize topology and does not need any manual configuration to bind the network for mobile sensors, the physical architecture and the location schema of the hardware components, sensors and gateways need to be designed carefully .
As a characteristic of mesh WSN, the sensors in network are free of any installation restrictions, even though, the placement should be far from any physical destruction or hostile locations. Inappropriate physical placement of sensor transmitters and gateway antenna can cause noise or significant lost in signals . In addition, the signal coverage is decayed by surrounding objects and materials such as metal wall and the like. (E.g. exterior wooden, concrete, brick or gypsum frame, block or wall). Especially in the case of vehicles, the main body can impose such problem and henceforth installation of the sensors in this manner would be delicate.
Moreover, the signal waves might be faded and affected during the transmission, due to various physical phenomena such as reflection, diffraction or scattering . These effects would cause significant interruption in sensor surveillance. Therefore, it is important to manage these signal-effects in early stage of WSN physical architecture design.
- Reflection occurs when electromagnetic wave of signals is duplicated due to impinge of the wave on large object or surface such as walls, buildings and the Earth . Therefore, all the reflection of the walls and also the Earth should be acknowledged in physical architecture design.
- Diffraction refers to any defection and obstruction in waves caused by irregular sharp edges during the data transmission between the transmitter and receiver . In this case, designers have to be prudent in sensors’ placements in the proximity of sharp edges and corner angels.
- Scattering refers to any deviation from straight line. Environmental obstacles in the propagation path affect passing waves from their original structure. Even small irregular object such as street signs, and lampposts might encounter and scatter the wave. Hence WSN should be design to face with any irregular scattering during the wave transmission. Above all, the mobility of sensors and surrounding objects might fade the signals and add noises that should be considered in architecture design .
These issues are the basic physical factors, which cause major fault in data aggregation of WSN and cut down reliability and robustness. These destructive signals need to be subtracted from the received signal paths  before sending the data to gateway. Therefore, reflection, diffraction and scattering should be considered not only by designers in the physical components placements, but also by programmers in network development.
– Fault: Sensors failure
– Solution: Hardware replacement
The next issue that needs to be considered in designing the physical architecture of a WSN is hardware failure. Sensor’s energy suppliers or any damages to the sensors and/or their transmitters are the sources of hardware failure. Regardless of source of failure, the WSN must be capable of functioning as well as replacing and switching sensors when necessary. Additionally, any changes in the physical components, on one hand, needs an explicit and well-defied consideration on security issue to prevent any potential threats, and on the other hand, needs an adaptable and configurable communication connection network .
2.1.2 Reliability and Robustness of Communication Architecture
|b) Reliability and Robustness in Communication Architecture||
Fault: communication link errors
Fault: energy depletion
– Fault: communication link errors
– Solution:Topology control and event detection , Replicated services in communication model,
Communication link error is an important concern in dealing with reliability and robustness of a network in communication architecture. The sensors in WSN are prone to fail and make link errors in point-to-point reliability of communication protocol. Therefore, it is the network topology responsibility to detect the errors and guarantee the overall reliability of the syste