## 2 Background
### Wireless Sensor Network Components and Node Architecture  
A WSN is composed of a large number of sensor nodes distributed over an area. These nodes are small in size and have a low cost, with limited storage capacity, processing capability, and energy. The sensor node architecture can be seen in Figure 3, which consists of the sensing unit that can be either the sensor or actuator, which senses the environment and take measurements of things such as temperature, humidity, sound, or vibration, thereby converting the collected analog signals into digital signals through the analog to digital converter. Then, it sends these signals or measurements to the processing unit to be processed and stored until sent through the communication unit to a relay node or a sink node [7; 8]. All the parts of the sensor node require energy to operate, and the power unit can be either a battery, such as a CR2032, or some type of renewable energy, such as solar energy. This power unit should be stable and stay as long as possible, since the sensor nodes may  
Figure 3: Sensor node architecture. be thrown in hazardous, rough, or harsh areas that cannot be reached for a replacement and where recharging the batteries is not possible. Another part is the communication unit, which is a radio transceiver unit that transmits and receives signals from one node to another through wireless channels. In the processing unit, the central processing unit (CPU) calculates the computational capabilities and energy consumption. The memory stores the required programs and data. Finally, if the sensor node is a mobile node, then it should have a location finding system, in order to get the required position, for example, the global positioning system (GPS). The WSN consists of all, or parts, of the following components [9]:  
1. Sensor node: A small-sized, low-powered node responsible for collecting data, processing it, and sharing it with other required nodes in the network. 2. Relay node: This node is used to communicate with the neighboring node as a midway node. This node is used to improve network reliability. It does not have any sensing or controlling processes. 3. Actor node: A high-end node used to set up and implement a decision based on the application's demands. Usually, these nodes are resource-rich devices that are supplied with higher transmission power, processing capabilities, and battery life. 4. Cluster head: This node is used for gathering data from sensor nodes in WSN. There may be one or more inside the cluster, depending on the application's requirements. This node should have high bandwidth and be reliable and secure. 5. Gateway node: This node is used to provide the connection between the WSN and outside networks
6. Sink node or base station: A control center where users can retrieve data gathered from the sensor network. When deploying a huge number of sensor nodes that work together to monitor a specified target or a physical environment, the networking of these nodes is evenly significant, since the sensor nodes connect with each other, as well as with the base station, through wireless communications. The base station sends the required tasks to the sensor nodes, while the latter gathers the requested information and sends it back to the BS for more processing. The BS sometimes acts as a gateway that sends the necessary data to the end-user through other networks. There are two types of network architectures, i.e., single- and multi-hop. In a single hop, each sensor node has a direct connection to the BS or sink node. Although transmission is possible for long distances, the energy consumption is very high for communication, compared with the processing or data gathering. So, the multi-hop architecture is preferred, since the data can be transmitted over one or more intermediate nodes. Multi-hop architecture or clustering can be implemented in five ways, which are: hierarchal, partition-based, spectral, grid-based, and density-based clustering.