## 2 Unified Modeling of LEO Satellite Constellation
### Model Implementation Based on Modelica
#### 2.3.1 Orbit Model  
The main parameters of the ideal constellation orbit model are: the number of orbits in the constellation \(p\), the number of satellites in each orbit plane \(s\) and orbital factors (semi-major axis \(a\), eccentricity \(e\), inclination \(i\), right ascension of ascending node (RAAN) \(\Omega\), argument of perigee \(\omega\) and true fault \(f\)). The number of orbits and the number of satellites in each orbit plane determine the scale of the constellation. The semi-major axis and eccentricity of the orbit determine the size and shape of the orbit. The inclination, RAAN and argument of perigee determine the orientation and direction of the orbit. The true fault decides the position of the satellite. Based on the above parameters, the coordinates (\(x\),\(y\),\(z\)) of each satellite in the geocentric inertial system can be calculated by Equation (1) [16], so as to simulate the orbital state of the constellation at any time under ideal conditions. \[ \begin{bmatrix}x\\ y\\ z\end{bmatrix} = \frac{a(1-e^{2})}{1+e\cos f}\cdot \tag{1}\] \[ \begin{bmatrix}\cos\Omega\cos\left(\omega+f\right)-\sin\Omega\sin \left(\omega+f\right)\cos i\\ \sin\Omega\cos\left(\omega+f\right)-\cos\Omega\sin\left(\omega+f\right)\cos i \\ \sin\left(\omega+f\right)\sin i\end{bmatrix} \]  
In order to simulate the state of satellite orbits in space more realistically, orbital perturbations [17], including aspheric gravity, atmospheric drag, sun-moon gravity, sunlight pressure and the post-Newton effect, are introduced, as shown in Figure 3.  
* Nonspherical gravitational perturbation. Figure 2: Model architecture of LEO communication satellite constellation system. The Earth's gravitational field model adopts 70 \(\times\) 70 Joint Gravity Model 3 (JCM3). The calculation of nonspherical gravitational perturbation acceleration projected to the spherical coordinate component in the ground-fixed coordinate system is as follows [18]:  
\[ \begin{split} a_{N}=&-\frac{\mu}{r^{2}\cos\varphi} \sum_{n=2}^{\infty}\sum_{m=0}^{n}(\frac{R_{e}}{r})^{n}\{(1+n)\cos\varphi\\ &\overline{\mathbf{P}}_{\mathbf{nm}}(\sin\varphi)(\overline{C}_{ nm}\cos m\lambda+\overline{S}_{nm}\sin m\lambda)e_{r}\\ &[n\sin\varphi\overline{\mathbf{P}}_{\mathbf{nm}}(\sin\varphi)-N _{n}m\overline{\mathbf{P}}_{\mathbf{n-1,m}}(\sin\varphi)]\\ &(\overline{C}_{nm}\cos m\lambda+\overline{S}_{nm}\sin m\lambda) e_{\varphi}+m.\\ &(\overline{C}_{nm}\sin m\lambda-\overline{S}_{nm}\cos m\lambda)e_{ \lambda}\}\end{split}  \tag{2}\]  
where \(e_{r}\), \(e_{\varphi}\) and \(e_{\lambda}\) are the three orthogonal unit vectors of spherical coordinates. \(\lambda\) and \(\varphi\) denote geocentric longitude and geocentric latitude. \(\overline{C}_{nm}\) and \(\overline{S}_{nm}\) are the normalized gravitational coefficients. \(N_{nm}=\sqrt{\frac{2n+1}{2n-1}(n+m)(n-m)}\). \(\overline{\mathbf{P}}_{\mathbf{nm}}(\mathbf{u})\) is the normalized gravitational coefficient. \(n\) represents the truncation order. * Atmospheric drag perturbation. The acceleration of atmospheric drag on a satellite with an area-to-mass ratio is [18]: \[a_{D}=-\frac{1}{2}C_{D}\frac{S}{m}\rho|V|\cdot V\] (3) where \(C_{D}\) is the damping coefficient. \(\rho\) is the atmospheric density at the location of the satellite. \(V\) is the speed of the satellite relative to the atmosphere. * Lunisolar gravitational perturbation. The perturbation acceleration of the sun and the moon to the satellite can be expressed as [18]: \[a_{T}=-\mu_{s}(\frac{r-r_{s}}{||r-r_{s}||^{3}}+\frac{r_{s}}{r_{s}^{3}})\] (4) where \(r\) and \(r_{s}\) are the position vectors of the satellite and the sun or moon in the geocentric inertial system. \(\mu_{s}\) is the gravitational coefficient. Figure 3: Orbit perturbation model. * Solar radiation perturbation. The perturbation acceleration caused by solar radiation on the satellite can be expressed as [18]: \[a_{R}=KC_{R}\frac{S}{R}\frac{L_{s}}{4\pi c}\frac{r-r_{s}}{||r-r_{s}||^{3}}\] (5) where \(C_{R}\) is the solar radiation coefficient. \(c\) is the speed of light.