# A Survey of Using Swarm Intelligence Algorithms in IoT
## 3 Applications of Swarm Intelligence Algorithms in WSN
### WSN Routing Protocols Based on SI
#### 3.2.2 Wireless Sensor Routing Protocols Based on PSO  
In [19], a WSN routing optimization algorithm based on PSO and TS was proposed, through optimizing the number of clusters formed and the number of nodes that should exist in a single cluster to prolong the network lifetime and energy efficiency with energy-saving and responsive manners. The routing optimization algorithm can effectively reduce the average packet loss rate and average end-to-end delay, by increasing the number of clusters and improving the survival rate of nodes.  
Reference [20] proposed a PSO-based WSN routing algorithm named EMSP, which mainly combined virtual clustering and mobile sink technology in the routing process. The EPMS defines three packet formats: hello packet is used to determine which cluster send data to mobile sink; messages-c is the message directly sent by CH to mobile sink; message-h packet is the message sent by member node to CH. The sink node begins to collect information from the cluster with the highest residual energy. Only when the sink determines the CH, will the member node transmit data to CH. In this case, the member node is very likely to die before the data is transmitted.  
Reference [24] improved the routing mode for energy conservation and energy balance because excessive forwarding near CH can result in the energy hole and unbalanced energy consumption, as well as premature death of nodes. In such a case, a low energy protection mechanism is adopted to avoid the weak node becoming a relay node, and a mobile data collector was introduced to collect data. The PSO is used to search the energy center of the network, and nodes that are nearest to the energy center are selected as CHs. The uncertainty of the moving data collector however may cause data loss.  
Reference [30] proposed a new method to extend the network life cycle for cluster-based WSN. An optimization method was applied for selecting target nodes of interest. The protocol extends the network life cycle by selecting the target node optimization method and the relay node to alleviate the work of CH. In addition, an improved PSO algorithm is proposed to minimize transmission distance by updating cluster nodes and to optimize network energy consumption. The protocol distributes nodes evenly across multiple clusters.  
Reference [31] put forward a kind of bionic PSO fault-tolerant routing algorithm, by extending the existing multi-objective optimization problem optimization method, fast recovery from the path to failure. Based on the determined objective function, the effective value of the objective function calculated by each selected sensor node is optimized to construct k-disjoint multi-path. A multi-path routing algorithm is used to balance fault tolerance and communication overhead. Compared with the canonical PSO, overall energy consumption and average delay are optimized. However, there is a slight disadvantage at the beginning of the iteration because the method needs a large amount of time to stabilize the target function.