# DRL-Based Dynamic SFC Orchestration Algorithm for LEO Satellite Networks
## 3 System Model
### Delay Modeling  
For network data provided as SFC services, the end-to-end delay is determined by both the transmission delays on different physical links along the traffic routing path and the processing delays at physical nodes executing network functions [34]. In this paper, we assume that VNF processing time for input data traffic depends on the physical resources actually allocated to each VNF. The SFC orchestrator allocates sufficient physical resources to each VNF request to prevent significant processing delays, reflected in the underlying resource consumption coefficient \(coeff\) per unit traffic. Therefore, the processing delay of user data at VNFs can be neglected. However, when the load ratio of computing resources on a physical node reaches a certain level, the impact of high load on processing delay becomes significant. At this point, the processing delay will increase proportionally with the occupancy rate of the node's physical resources and affect all virtual network functions deployed on the physical node. The processing delay at this time is  
\[d_{proc_{e}}=\frac{R^{c}_{n}}{C^{c}_{n}}\cdot d_{switch} \tag{4}\]  
where \(R^{c}_{n}\) and \(C^{c}_{n}\) represent the actual computing resources occupied by the node and the upper limit of the node's computing resources, respectively, and \(d_{switch}\) represents the inherent processing delay of data packets in satellite node switching equipment. The transmission delay \(d_{i,j}(t)\) of data on link \(l_{i,j}(t)\) at time \(t\) is divided into two components: propagation delay \(dp_{i,j}(t)\) and queuing delay \(dq_{i,j}(t)\). The end-to-end delay for data transmission on link \(l_{i,j}(t)\) equals the sum of these components:  
\[d_{i,j}(t)=dp_{i,j}(t)+dq_{i,j}(t) \tag{5}\]  
The propagation delay \(dp_{i,j}(t)\) is determined by the distance between the nodes at both ends of the link and the signal propagation speed on the link while also considering the impact of the Doppler effect caused by satellite mobility. The additional delay due to the Doppler effect is related to the relative motion between satellites; in this study, since the relative motion speed is small, a first-order approximation method is used for calculation. Considering uniform laser link communication across the entire LEO satellite network, the propagation delay on link \(l_{i,j}(t)\) is calculated as follows:  
\[dp_{i,j}(t)=\frac{distance_{i,j}(t)}{c}+\varphi(t) \tag{6}\]  
where \(distance_{i,j}(t)\) represents the distance between nodes \(n_{i}\) and \(n_{j}\) at time \(t\), and \(c\) represents the signal propagation speed on satellite links. \(\varphi(t)\) represents the additional time delay caused by the Doppler effect, which is influenced by the relative velocity of satellites at both ends. However, in the scenario mentioned in this paper, considering the distance of inter-satellite links and the maximum relative motion distance, the impact of the Doppler effect on propagation delay is relatively small and can be almost ignored. \(dq_{i,j}(t)\) represents the queuing delay on link \(l_{i,j}(t)\) at time \(t\). To simplify the model, we assume the following:  
1. Uniform data packet lengths across the entire LEO satellite network;
2. Identical transmission and reception buffer sizes at both ends of each physical link;
3. Random packet arrivals following Poisson distribution. According to queuing theory, the packet queuing model can be described as M/D/1. In this model, the average queuing delay for each packet on the link can be calculated as follows:  
\[\frac{\lambda}{2\mu(\mu-\lambda)}+\frac{1}{\mu} \tag{7}\]  
where \(\lambda\) represents the Poisson-distributed packet arrival rate related to actual link traffic, and \(\mu\) is the constant link service rate due to the fixed packet length assumption.