## 3 ESCB Routing Scheme  
An energy sensitive and load balance (ESCB) routing scheme algorithm is proposed in this chapter. Some key performance indicators (KPI), such as latency, congestion and residual energy are considered in the algorithm. The adjusted parameters about satellite design are also considered in it, such as charging power and relative attitude between the satellite and sunlight. In order to increase the system efficiency, each traffic service is equipped with an on-orbit buffer space, respectively. A congestion function (_CF_) can be described as:  
\[CF=\beta\cdot\frac{queue_{ACC}}{buffer_{ACC}}+\chi\cdot\frac{queue_{BER}}{ buffer_{BER}} \tag{5}\]  
where \(queue_{ACC}\) is the number of packets waiting in the buffer for access services; \(queue_{BER}\) is the number of packets waiting in the buffer for bearer services. \(buffer_{ACC}\) and \(buffer_{BER}\) are the buffer space for two traffic services. \(\beta\) and \(\chi\) are adjustment factors, and \(\beta+\chi=1\). In addition to _CF_, congestion is also an important constraint to routing policies. The congestion state (_CS_) can be described as:  
\[CS_{ACC}=\left\{ \begin{array}{ll}idle&:C_{ACC}\leq 0.3\\ busy&:0.3<C_{ACC}<0.7\\occupy&:C_{ACC}\geq 0.7\end{array} \right. \tag{6}\]  
\[CS_{BER}=\left\{ \begin{array}{ll}idle&:C_{BER}\leq 0.3\\ busy&:0.3<C_{BER}<0.7\\occupy&:C_{BER}\geq 0.7\end{array} \right. \tag{7}\]  
\[C_{ACC}=\frac{queue_{ACC}}{buffer_{ACC}} \tag{8}\]  
\[C_{BER}=\frac{queue_{BER}}{buffer_{BER}} \tag{9}\]  
If a satellite is in the idle state, all data packets can be received arbitrarily. If in the busy state, the number of received packets will be decreased. If in the occupy state, satellite will forbid receiving packets. In addition to congestion avoidance, energy balance is another important optimization objective. Energy factor (_EF_) is an important indicator to measure energy balance, which can be described as:  
\[ET(t)=\delta\cdot ET(t-\Delta t)+\varepsilon\cdot RE(t)+\gamma\cdot CE_{pre}(t) \tag{10}\]  
where \(RE(t)\) is the residual energy of the satellite at the current moment, \(CE_{pre}(t)\) is the predictive charging power in the current. \(\delta\), \(\varepsilon\) and \(\gamma\) are adjustment factors, and \(\delta+\varepsilon+\gamma=1\). \(CE_{pre}(t)\) can also be predicted by the TSTW model. When the tube rotates \(\Omega\) degrees clockwise, the charging duration can also be calculated. \[\Omega=\frac{\pi}{24}\cdot n\cdot\triangle t \tag{11}\]  
where \(\Delta t\) is the basic time slot, and \(n\) is the number of time slots for the prediction. A latency can be described as:  
\[Delay=delay_{pro-br}+delay_{queue-ber} \tag{12}\]  
\[delay_{pro-br}=\left\{ \begin{array}{ll}\frac{\xi}{l_{c}}&:same-orbit\\ \frac{l_{c}}{l_{h}\cdot\sin(lat)}&:hetero-orbit\end{array} \right. \tag{13}\]  
\[delay_{queue-ber}=\frac{queue_{ACC}\cdot D}{BW} \tag{14}\]where \(delay_{pm-ber}\) is the propagation delay, \(delay_{queue-ber}\) is the queue delay, \(c\) is the speed of light, \(l_{v}\) is the distance between adjacent satellites in the same orbit, \(l_{h}\) is the distance between neighbor satellites in the adjacent orbits, \(queue_{ACC}\) is the number of packets waiting in the buffer for ISL transmission, \(D\) is the size of the packet, and \(BW\) is the bandwidth of the ISL channel. For a link between (\(O_{1}\), \(S_{1}\)) and (\(O_{2}\), \(S_{2}\)) in NTSN, an objective function can be defined as:  
\[OF_{link}=\eta\cdot CF_{2}+\kappa\cdot ET_{2}+\
u\cdot Delay_{(1,2)} \tag{15}\]  
where \(\eta\), \(\kappa\) and \(\
u\) are adjustment factors for different services, and \(\eta+\kappa+\
u=1\). The objective function of a path can be described as:  
\[OF_{path}=\sum_{i}OF_{link(i)}\;i\in path(k) \tag{16}\]  
where \(path(k)\) is one of the multiple candidate paths.