## 4 Simulation and Results  
To evaluate and validate the performance of the animal sensor localization, thorough simulation tests were done. MATLAB Simulink software was used as the tool to build the simulation environment. The simulation parameters are given in Table 1. The simulation results are given as average localization error of 100 experiments.  
In a given population of 2000 animals, 10% of the animals would be hosting the animal bolus sensors. In Figure 3, 200 sensor nodes are placed randomly in a deployment area. The deployment area of the wireless sensor network is considered as 1000 \(\times\) 1000 m with 200 randomly deployed sensor nodes as depicted in Figure 3.  
Figure 4, shows the graphical representation of node placement and the identification of unknown node positions with respect to the anchor nodes. One hundred and eight nine sensor nodes are deployed with 11 anchors, the estimated distance values away from 3 different anchors are sufficient for an unknown node to calculate its location. If the network is continuously working, the animals which are within the range of the network could be tracked by identifying their current position.  
\begin{table}
\begin{tabular}{c c} \hline
**Parameters** & **Default Values** \\ \hline Network Area & 1000 \(\times\) 1000 m \\ Simulation Time & 180 s \\ Mobile target velocity (\(\lambda\)) & 1–10 m/60 s \\ Range Nodes Propagation Range & \(R=300\) m \\ Number of Nodes & 200 (10\% of 2000 animals) \\ Placement of Nodes & Random \\ Number of Gateways & 11 (Very gateways between 5 and 15) \\ Placement of Gateways & Deterministic (but random in this case) \\ Mobility Model Used & Random Walk Mobility Model \\ \hline \end{tabular}
\end{table}
Table 1: Default simulation configurations.  
Figure 3: Node Distribution (Random) at a given time.  
The distribution of the nodes is shown in Figure 4. The anchors and nodes are randomly distributed with some placement error. There are 200 sensor nodes and 11 gateways deployed. The placement of the anchor nodes has a high impact on how effective the localization and identification of the current animal location as the nodes are in motion most of the time. The localization errors, Figure 5, are represented by the ratio of the Euclidean distances between estimated coordinates and actual nodes coordinates, scaled to the communication radius R.  
Localization error as a function of the radio transmission range is given for the random scenarios in Figure 5. Considering a ranging error of 25 m, the nodes are localized to a very good accuracy. The average error is also found to be 8.8 m. the position estimates obtained are exceedingly good. Every additional unknown node will behave like a beacon assisting other unknown nodes. The average error in the position estimate of unknown nodes in Figure 5 is also reduced to 7.51 m.  
It is indicated in [47] that the quantity of beacons and their placement reduce the localization error. The more proportionate placement of beacons lowers the localization error while increasing the number of beacons also reduces the localization error [47]. To reduce  
Figure 4: Node distribution with Beacons, where * represents the anchor node and * represents the unknown node.  
Figure 5: Localization error for the 200 unknown nodes.  
the proposed system could further be enhanced using the Grey Wolf Optimization algorithm which to provides better results in finding the location of unknown nodes [48].