4.2 Implementing the New Optimised Cluster Head Model in NS2
4.2.2 Modelling and Simulation of WSN traffic
Network traffic was generated using a constant bit rate (CBR) and message settings for all the cluster head nodes. For all of the simulations the packet sizes were set as follows: sensor data packet, 1000 bytes (including a preamble of 72 bytes); RTS, 44 bytes; CTS: 38 bytes; and acknowledgment, 38 bytes. Each cluster head in the grid has to transmit its own aggregated data as well as to forward the data it receives from cluster head notes further from the base station. The COTS and Equal grids networks have equally spaced grids, therefore the additional data that each cluster head in turn has to forward is increased by a constant factor only. For example, Table II shows the CBR setting for the cluster heads, the amount of traffic generated by each grid, and the traffic to be forwarded by the cluster head in each grid. To explain it further, the grid length in COTS and Equal
107
grids network is uniform. That is 600/19 = 31.57m. As the node density is 0.143 and each node produces 0.003 Erlang of data. Therefore the traffic produced at each grid is 31.57*0.143*0.003 = 0.013544 Erlang.
As the data rate is set to 1Mbits/s, hence the total traffic produced is 0.013544 * 1e6 = 13453.53 bits/s. Now to achieve data in bytes, divide 13453.53bits/s by 8 to get the new value of 1693 bytes/s. Because each transmitted packet is 1 kBytes, therefore to convert to kBytes, I divide 1693 bytes by 1000 to get the value of packets sent by each grid per second. This equates to approximately 1.69 packets per second. Hence each grid in the COTS network will generate 1.69 packets of its own data, as well as forward the packets of the previous grid.
Table 4-2 COTS & Equal Grids Network
Grid (i) Packets to Grids own T otal CBR
Forward Packets Packets Timer
T ransmitted Settings
(packets/s) (packets/s) (packets/s) (s)
Base (0) 0 0 0.0000 0.00 1 30.49 1.69 32.1800 0.59 2 28.79 1.69 30.4800 0.59 3 27.1 1.69 28.7900 0.59 4 25.4 1.69 27.1000 0.59 5 23.71 1.69 25.4000 0.59 6 22.02 1.69 23.7100 0.59 7 20.32 1.69 22.0200 0.59 8 18.63 1.69 20.3200 0.59 9 16.94 1.69 18.6300 0.59 10 15.24 1.69 16.9400 0.59 11 13.55 1.69 15.2400 0.59 12 11.86 1.69 13.5500 0.59 13 10.16 1.69 11.8600 0.59 14 8.47 1.69 10.1600 0.59 15 6.78 1.69 8.4700 0.59 16 5.08 1.69 6.7800 0.59 17 3.39 1.69 5.0800 0.59 18 1.69 1.69 3.3800 0.59 19 0 1.69 1.6900 0.59
As it can be seen from Table 4-2, column 2, grid 19 generates 1.69 packets/s of its own data and has no packets to forward from any previous grid. Grid 18 generates 1.69 packets per second of it own aggregated grid data, but also has to forward 1.69 packets/sec received from grid 19. Hence grid 18’s cluster head transmits 3.38 packets per second. As
108
I move up the table, it can be seen that the cluster header of grid 1 has to transmit 30.49 extra packets to the base station in addition to its own grid 1.69 packets per second. The CBR packet size is set to 1 kByte per second. Hence if I want to send only one packet per second, then I will set the CBR timer to 1 (please not this is not the unit of time but percentage, 1 means 100 percent of the unit time). Hence if I want to sent 1.69 packets per second. We inverse 1.69 to get the value of 0.59, so when 59% time approaching to 1 second has passed, it will transmit a 1 kByte message packet.
For the Optimised grids network, the size of grid i will be smaller than i+1, therefore the sensor data generated in this grid is less than that generated in grid i+1. However, it still has to forward the messages received from grid i+1 and all more remote grids. The total number of packets that will be transmitted by the cluster head in each grid was calculated using equation (4.16) and is shown in table 4-3.
Each node was given an initial energy of 500 joules for simulation purposes. The total simulation time was set to 1000 seconds so that the network operated in a steady state condition.
Table 4-3 Optimised Grids Network
Grid (i) Packets to Grids own T otal CBR
Forward Packets Packets Timer
T ransmitted Settings
(packets/s) (packets/s) (packets/s) (s)
Base (0) 0 0 0.0000 0.00 1 31 1.18 32.1800 0.85 2 29.79 1.21 31.0000 0.83 3 28.56 1.23 29.7900 0.81 4 27.31 1.25 28.5600 0.8 5 26.02 1.28 27.3100 0.78 6 24.71 1.31 26.0200 0.76 7 23.36 1.35 24.7100 0.74 8 21.98 1.39 23.3600 0.72 9 20.54 1.43 21.9800 0.7 10 19.06 1.48 20.5400 0.68 11 17.53 1.53 19.0600 0.65 12 15.93 1.6 17.5300 0.63 13 14.25 1.68 15.9300 0.6 14 12.47 1.77 14.2500 0.56 15 10.57 1.9 12.4700 0.53 16 8.52 2.06 10.5700 0.49 17 6.22 2.3 8.5200 0.43 18 3.53 2.69 6.2200 0.37
109
All the cluster head nodes transmit messages towards the base station via a multi-hop route as mentioned earlier. The total message transmit time for each node was 985 seconds as all the CBR’s were started 10 seconds after the start of simulation and stopped 5 seconds before the end of the simulation. Figure 4.8 and 4.9 show the network simulation animation as captured by the NS Network Animator (NS-NAM). The theoretical throughput at the base station is calculated as follows using (10), where d is 600m, the base station is at x = 0, the node density nd is 0.143, the traffic generated by each node is 0.003 Erlang, and the bandwidth of the system is 1Mbits/s. The corresponding theoretical traffic (throughput) received by the sink node is 0.257 Mbit/s.
Figure 4.8 Equal grids and COTS network animation screen as shown in NS-NAM
Figure 4.9 Optimised grids network’s unEqual grids spacing captured on NS-NAM
Note that the COTS and Equal grids networks are symmetric: based on the mean cluster header node positions, a message sent by grid (i) in these networks is received not only by the cluster head in the intended grid (i-1) but also by cluster heads in grids (i-2), (i+1) and (i+2), thus consuming reception energy that could be saved. This is caused by overhearing and the fixed equal grid size that cannot be reduced for these networks. This also adds to network congestion and can generate unwanted collisions at grid (i+2) if the cluster head node in grid (i+3) is simultaneously forwarding a message to the cluster head node in grid
110
asymmetric: messages originated from grid (i) can be received by grid (i-1), (i-2) and (i+1) but not by grid (i+2) which is outside the grid-specific range of the cluster head node in grid (i). This improved spatial use reduces unnecessary reception energy and reduces collisions. It is shown through packet level simulation that this reduces the collisions by a third; it also improves the throughput and saves nearly a third of reception energy consumed by the grid.
111