# Low-Thrust Transfer to Quasi-Synchronous Martian Elliptic Orbit via Nonlinear Feedback Control
## 4 Numerical Simulations  
The nonlinear orbit control law presented in section III is implemented in MATLAB and numerically tested in order to evaluate its performance and capability to drive the spacecraft toward the desired final conditions. The simulations are performed assuming that the vehicle is equipped with an electric propulsive system, with the following two parameters:  
1. \(c=30\) km/s, effective exhaust velocity
2. \(u_{T}{}^{(max)}=5\cdot 10^{-5}g_{0}\ \ \ (g_{0}=9.8\) m/s\({}^{2})\)  
In the numerical simulations, canonical units are employed. In particular, by definition, the distance unit (DU) equals the Martian equatorial radius, whereas the time unit (TU) is chosen in such a way that \(\mu=1\ \mathrm{DU}^{3}/\mathrm{TU}^{2}\). Moreover, for the solar radiation pressure, the value \(C_{R}A/m_{0}=\)2.430\(\cdot 10^{-2}\) m\({}^{2}\)/kg is assumed. To avoid excessive propellant consumption, tolerances \(\varepsilon_{j}\) are introduced on the three components of \(\psi\) such that  
\[\text{if}\ \ \left|\psi_{j}\right|\leq\varepsilon_{j}\ \ \ \Rightarrow\ \ \ k_{j}=0 \tag{43}\]  
This means that, if all tolerances are met, the thrust is switched off. \[\text{if}\ \ \left|\psi_{j}\right|\leq\varepsilon_{j}\ \ \forall j\ \ \Rightarrow\ \ \mathbf{u}_{T}=\mathbf{0} \tag{44}\]  
Specifically,  
\[\left|\psi_{1}\right|<\varepsilon_{1}=\frac{10\ \text{km}}{\text{DU}}\ \ \ \ \ \ \ \ \ \left|\psi_{2}\right|<\varepsilon_{2}=10^{-5}\ \ \ \ \ \ \left|\psi_{3}\right|<\ \varepsilon_{3}=10^{-5} \tag{45}\]  
The desired orbit is reached at the first occurrence of the three conditions (45), then the control law is used for orbit maintenance while compensating the perturbations. This second phase consists of repeating ignitions and shutdowns of low-thrust propulsion when at least one of the three conditions (45) is violated. Furthermore, the following weighting coefficients are used after extensive trial-and-attempt tuning: \(k_{1}=1\), \(k_{2}=10^{6}\), and \(k_{3}=10^{4}\). Simulations are propagated for one year to investigate orbit transfer and subsequent maintenance. The results of the simulations are reported in Figures 3-6. They show how the orbit control law succeeds in injecting the spacecraft into the desired orbit and manages to maintain it, despite orbit perturbations. Figures 3 and 4 report the time histories of the semimajor axis, eccentricity, inclination, RAAN, and argument of periapse. Two phases, orbit acquisition, and maintenance, can be distinguished in the preceding plots. After a transient of 80 days, the spacecraft reaches the operational orbit, and the five orbit elements converge to their target value. Once the desired condition is achieved, it is kept with very good precision. Figure 5 (right) shows the time evolution of the mass ratio. In the latter plot, the distinction between the two phases is evident: orbital acquisition is more expensive, and the mass ratio decreases more rapidly as a result, whereas mass depletion is slower during orbit maintenance, as the propulsive system must only compensate for orbit perturbations. In this phase, all the orbital elements show oscillations within the prescribed tolerances. Figure 6 depicts the time history of the Lyapunov function, which drops to zero as the space vehicle reaches the target orbit. Figure 7 shows a three-dimensional illustration of the transfer trajectory, whereas Figures 8 and 9 depict the thrust magnitude and angles, respectively, in a repetition period. Several gaps appear in the time histories of the thrust angles, corresponding to the coast arcs, in which the thrust direction is meaningless. Moreover, Figure 10 portrays the thrust magnitude during the maintenance phase, together with the true anomaly \(\theta_{S}\). Inspection of this figure reveals that a rather repeating pattern emerges for the thrust acceleration magnitude in relation to orbital motion. Although this research adopts identical gains during the entire time of flight, it is worth remarking that the feedback gains can be changed during orbital maintenance.