# A Load Balancing Routing Mechanism Based on SDWSN in Smart City
## 5 Performance Evaluation  
In this paper, the SDSNLB algorithm was simulated and tested by Matlab. In the simulation test, the wireless sensor network model consists of one center controller and three controllers, each controller is connected to control 10 sensors. In the subsequent tests, the number of sensor nodes was increased from 10 to 26, and the messages in the topology were fed back. The controller was operating normally and was able to process and process each message. In practical applications, the node layout is more dispersed, the number of hops from the node to the controller is different, and the message that the node interacts with the controller is concentrated at the same time is extremely unlikely, so the controller can efficiently process the incoming message. In order to better demonstrate the effectiveness of the improved algorithm, the SDSNLB algorithm, the LEACH and improved LEACH protocol algorithm were compared and simulated. The LEACH protocol is a classic clustering-based routing protocol proposed in the WSN. Despite the shortcomings, studying the basic clustering protocol LEACH can help to better understand other clustering protocols. In addition, the hierarchical organization of the LEACH protocol is suitable for the dynamic distribution of resources. The cluster head node in the cluster can be regarded as a controller, and the cluster member node can be regarded as a node user, thereby better performing simulation. The improved LEACH algorithm is designed to extend network lifetime and improve efficient data transmission through balanced elections. The main analysis and comparison of the three algorithms on the network node link bandwidth utilization, network throughput, and network jitter. Figure 4 shows the experimental results of the data flow under three different algorithms. As can be seen from the figure, when the conventional LEACH protocol algorithm is used, in a period of 0 to 10 s, the data flow in the network is relatively simple. Therefore, the effective throughput of the data stream is close to the uplink rate. And after 10 s, as the data traffic increases, the effective throughput of the data stream is significantly reduced. For the improved LEACH algorithm, the effective throughput of the data stream is close to the uplink rate from 0 to 20 s, and after 20 s, the effective throughput decreases. When using the SDSNLB algorithm, the effective throughput of the data stream approaches the uplink rate in 0 to 100 s.  
In Figure 5, it can be seen that when there are multiple data streams in the network, the load balancing algorithm proposed in this paper can reasonably schedule the data flow according to the load of the actual gateway egress node, and the final traffic does not exceed the uplink rate of the link. The average bandwidth utilization is maintained at around 1. Figure 6 shows the performance of the link load jitter. When running LEACH protocol, the link load jitter is the highest. Compared with LEACH protocol, the standard deviation of link load in improved LEACH is smaller, but the link load jitter is still obvious. When the load balancing algorithm SDSNLB is running, the load standard deviation of all links in the network is minimum, the traffic load is more evenly distributed in the network link. Due to the load balancing algorithm proposed in this paper, it is possible to perform reasonable scheduling in real time according to the current distribution of traffic load in the network, so as to avoid premature traffic overload of individual transmission links in the network, thereby improving network performance. From the above experimental results and analysis, the load balancing mechanism proposed in this paper can be verified. Comprehensive calculations were performed by an Elman neural network using software-defined features.