# Energy-Efficient Controller Placement in Software-Defined Satellite-Terrestrial Integrated Network
## 3 System Model and Problem Formulation
### Energy Consumption Model  
Due to the dynamic nature of requests from users, we need to establish a traffic model related to the number of people on the Earth. The number of Internet users and the traffic demands can be calculated based on the statistical data [37]. The Earth's surface is divided into \(12\times 24=288\) areas for simplification. Figure 3 shows the traffic demands over the world, in which for every \(10^{6}\) Internet users in each area, the traffic demand is 1 Mbps [38]. Moreover, if the number of Internet users is less than \(10^{6}\) in an area, the traffic demands are also set as 1 Mbps. We assume each satellite is equipped with a switch processing unit. In each time slot, the area is assigned to the nearest satellite for flow processing. The traffic flows of each satellite are the sum of flows in its managed area. The energy consumption of traffic flows in satellites mainly covers three parts: sending, on-board processing, and receiving. Formally, the energy consumption of sending data by switch \(v_{i}\) is defined as:  
\[P_{out}^{i}=f(R_{out}^{i})P_{out}^{\max} \tag{3}\]  
where \(R_{out}^{i}\) is the sending rate of switch \(v_{i}\), \(P_{out}^{\max}\) is the energy consumption of switch \(v_{i}\) at the maximum sending rate, and \(f(R)=0.00062R+0.38\)[39] is the energy consumption weight function. Similarly, the energy consumption of receiving data by switch \(v_{j}\) is defined as:  
\[P_{in}^{j}=f(R_{in}^{j})P_{in}^{\max} \tag{4}\]  
where \(R_{in}^{j}\) is the receiving rate of switch \(v_{j}\), and \(P_{in}^{\max}\) is the energy consumption of switch \(v_{j}\) at the maximum receiving rate. The energy consumption of on-board processing by switch \(v_{j}\) is defined as:  
\[P_{proc}^{j}=\frac{R_{in}^{j}}{8S_{ij}}\left(\frac{N_{j}}{2}P_{m}^{i}+P_{e}^{ j}\right) \tag{5}\]  
where \(S_{ij}\) is the size of the flow setup request message, \(N_{j}\) is the size of the flow table entry, \(P_{m}^{j}\) is the energy consumption of matching, and \(P_{e}^{j}\) is the energy consumption of executing. Figure 3: The number of Internet users, divided by \(10^{6}\)[38]. If switch \(v_{i}\) is sending flows to switch \(v_{j}\), the corresponding energy consumption is defined as:  
\[P_{ij}=P_{out}^{i}+P_{in}^{j}+P_{proc}^{j} \tag{6}\]  
In this way, the energy consumption of the flow setup request between switch \(s\) and controller \(c\) is defined as:  
\[P_{sc}=\sum_{\left(v_{i},v_{j}\right)\in E}P_{ij}\chi_{\left(v_{i},v_{j}\right)} \tag{7}\]  
where \(\chi_{\left(v_{i},v_{j}\right)}\in\left\{0,1\right\}\) equals \(1\), indicating that the ISL \(\left(v_{i},v_{j}\right)\) belongs to the control path, and it equals \(0\), indicating the ISL does not belong to it. Moreover, the energy consumption among controllers for synchronizing controller information is defined as:  
\[P_{cc}=\sum_{\left(v_{i},v_{j}\right)\in E}P_{ij}\omega_{\left(v_{i},v_{j} \right)} \tag{8}\]  
where \(\omega_{\left(v_{i},v_{j}\right)}\in\left\{0,1\right\}\) equals \(1\), indicating that there exists the shortest path ISL \(\left(v_{i},v_{j}\right)\) connecting controllers, and it equals \(0\) indicating the ISL does not belong to the shortest path. We formulate the EECP problem under the latency constraint in the software-defined STIN, which is expressed as the following optimization problem:  
\[\min\sum_{s\in S}\sum_{c\in\mathbb{C}}P_{sc}x_{sc}+\sum_{g\in S\in S}\sum_{s \in S}P_{gs}y_{gs}+\sum_{c\in\mathbb{C}}P_{cc} \tag{9}\]  
where \(P_{gs}\) is the energy consumption between satellite gateway \(g\) and satellite \(s\); \(x_{sc}\in\left\{0,1\right\}\) equals \(1\) if the satellite \(s\) is assigned to controller \(c\) and equals \(0\) otherwise; \(y_{gs}\in\left\{0,1\right\}\) equals \(1\) if the satellite gateway \(g\) is assigned to satellite \(s\) and equals \(0\) otherwise.