# Energy-Efficient Controller Placement in Software-Defined Satellite-Terrestrial Integrated Network
## 5 Simulation Results
### Comparison with Different Algorithms  
In order to evaluate the performance of the MSAP algorithm, we adopt the Random, K-means [44], Greedy [19], and SAP [45] algorithms as benchmarks:  
* Random algorithm means randomly choosing nodes as controllers. To eliminate the effect of randomness, we run the algorithm 10 times and take the average result as the final output. * K-means [44] belongs to the clustering algorithm. By calculating the energy consumption between nodes and the selected controllers, the nodes are divided into multiple clusters in STIN. * Greedy algorithm [19] provides locally optimal results that approximate globally optimal solutions. The controllers are selected one by one, and it assures that the energy consumption of STIN achieves the optimal results at this stage. * SA algorithm [45] approximates the global optimum solution through a random search technique. The nodes are selected as controllers once the energy consumption of STIN reaches a thermal equilibrium point. We measure the performance of these algorithms from the following aspects. (1) Energy Consumption: Energy consumption can be calculated by the definition in Equation (9). Figure 6 shows the energy consumption with the different number of controllers in STIN. The number of controllers is assigned from one to seven. It can be noted that energy consumption calculated by the five algorithms decreases first and then increases as there are more controllers in the STIN. This is due to the increased number of controllers, which places an unsupportable burden on the network. Consequently, we need to strike a balance between the control mechanism and economic concerns. Moreover, the proposed MSAP outperforms other algorithms in energy consumption. MSAP adopts the advantages of Greedy and SA, which finds the initial optimal results by the Greedy algorithm and then achieves the global optimal solutions by the SA algorithm. Figure 5: Energy consumption and average latency when controllers on different locations. Especially when the number of controllers is set as \(1\), MSAP has the same results as the Greedy algorithm. In addition, the initial step of controller placement for SA and K-means impacts the final results. We run the Random, K-means, and SA algorithms multiple times, and their results fluctuate within a range. Due to the stochastic property, the Random algorithm can hardly achieve approximate results and shows the largest fluctuation in energy consumption of all the tested algorithms. Overall, the performance of the MSAP algorithm is better than other algorithms in energy consumption. To further evaluate the performance of the five algorithms, we compare the energy consumption for controllers. That means we only consider the energy consumption for synchronizing control information. The results of energy consumption are shown in Figure 7. It is worth noting that the more controllers in STIN, the more energy will be consumed for synchronizing information. The energy consumption for controllers is similar in different algorithms. The proposed MSAP algorithm consumes the least energy out of the algorithms tested when the number of controllers is set as seven. That mainly results from the consideration of the global and local optimal strategies for the locations of controllers. Moreover, affected by the number of controllers, the energy consumption calculated by the SAP algorithm and K-means algorithm fluctuates greatly. (2) Latency with Minimum Energy Consumption: We also consider the network latency of the controller placement solution with the minimum energy consumption. It is defined as the ratio of distance and propagation speed. The distance represents the sum of distance in the shortest path between controllers and other nodes (switches and gateways), and the propagation speed is regarded as the speed of light (\(3\times 10^{8}\) km/s). Figure 8 shows the average latency with different numbers of controllers in STIN. It can be found that the average latency decreased first, then increased with the number of controllers.