1 Introduction

Precise orbit insertion maneuvers represent a crucial issue in several mission scenarios, e.g., for spacecraft orbiting the Earth or for payload release from the upper stage of an ascent vehicle. In fact, the dynamical conditions at injection affect the subsequent phases of spaceflight, because corrective maneuvers may be needed if orbit insertion occurs with unsatisfactory accuracy.

In the scientific literature, only a limited number of works dealt with the joint application of guidance and control (G&C) algorithms to aerospace vehicles. In Ref. [1] proportional-derivative (PD) control is employed for both guidance and control algorithms. Guidance and control based on Nonlinear Dynamic Inversion is studied by Marcos et al. [2], and a comparison between Dynamic Inversion and State Dependent Riccati Equation approaches is presented in Ref. [3]. An integrated G&C method is proposed by Tian et al. [4], while the use of G&C based on sliding-mode is investigated in Ref. [5].

This work considers a recently-introduced guidance and control architecture based on the combined use of (i) the variable-time-domain neighboring optimal guidance technique (VTD-NOG), and (ii) the constrained proportional-derivative (CPD) algorithm for attitude control, with the final aim of achieving precise orbit insertion, in the presence of nonnominal flight conditions.

The Variable-Time-Domain Neighboring Optimal Guidance (VTD-NOG) [6, 7] belongs to the class of implicit guidance approaches [8], relies on the second-order sufficient conditions for optimality, and aims at finding the corrective control actions in the neighborhood of the reference trajectory. This must be an optimal path that satisfies the second-order sufficient conditions for optimality. Adoption of a normalized time scale allows overcoming the main difficulties encountered in former formulations of neighboring optimal guidance [8,9,10], which are the occurrence of singularities for the gain matrices and the challenging implementation of the updating law for the time-to-go.

VTD-NOG identifies the trajectory corrections by assuming a thrust direction always aligned with the longitudinal axis of the space vehicle. As a result, VTD-NOG iteratively generates the desired attitude, which can be eventually discontinuous across subsequent guidance intervals. This circumstance implies that the actual orientation, which is subject to the space vehicle attitude dynamics, does not coincide with the desired orientation. Hence, the attitude control system must be capable of maintaining the actual orientation sufficiently close to the desired one. This work considers a control algorithm inspired by a proportional-derivative law (PD) [11]. However, a proper saturation action might be necessary to avoid excessive rates for the thrust deflection and the roll torque. The Constrained Proportional Derivative (CPD) algorithm introduces such an appropriate saturation, with the final aim of maintaining these rates within acceptable limits. In past researches VTD-NOG & CPD was successfully applied to lunar ascent [12]. Moreover, closely related G&C algorithms were adopted for low-thrust orbit transfers [13, 14].

In this research, VTD-NOG & CPD is applied to two distinct orbit injection maneuvers: (a) Hohmann-like finite-thrust transfer from a low Earth orbit to a geostationary orbit, and (b) orbit injection of the upper stage of a launch vehicle. Nonnominal flight conditions are modeled by assuming errors on the initial position, velocity, attitude, and attitude rates, as well as actuation deviations. All of these perturbations are simulated stochastically, in the context of extensive Monte Carlo (MC) campaigns. The ultimate purpose is in demonstrating that VTD-NOG & CPD indeed represents an effective methodology for spacecraft guidance and control, capable of guaranteeing accurate orbit injection, in the presence of deviations from nominal flight conditions.

2 Spacecraft Dynamics

This paper addresses the problem of accurate orbit injection in two distinct mission scenarios. However, in both cases a maneuvering spacecraft subject to the gravitational attraction of a single body is considered, and the related equations of motion coincide as a result. This section describes the equations that govern both the trajectory and the attitude of the spacecraft of interest.

2.1 Trajectory Equations

The spacecraft motion takes place about the Earth, and the dynamics of its mass center is investigated under the following assumptions:

  • (a) the initial and final trajectories are coplanar,

  • (b) the Earth has spherical mass distribution, and

  • (c) the propulsive thrust is continuous.

Assumption (b) implies that the gravitational attraction is directed radially. In light of assumption (a), an optimal trajectory coplanar with the two terminal paths can be reasonably conjectured to outperform any hypothetical alternative three-dimensional trajectory. In fact, due to symmetry of the gravitational field, out-of-plane thrusting has the only effect of rotating the instantaneous velocity, and would imply a useless waste of propellant. This means that the optimal thrust direction is assumed coplanar with the two terminal paths for the entire time of flight, and the optimal powered arc preceding orbit injection is sought in the same plane as a result. However, the trajectory equations (as well as the necessary conditions for optimality) are three-dimensional, because perturbed paths are no longer planar.

The spacecraft motion can be described in a convenient inertial reference frame, associated with the right-hand sequence of unit vectors \(\left( {\hat{c}_{1} ,\hat{c}_{2} ,\hat{c}_{3} } \right)\), and with origin located at the center of the attracting body. The two terminal trajectories lie on the \(\left( {\hat{c}_{1} ,\hat{c}_{2} } \right)\)-plane (cf. Fig. 1a). The time-varying position can be identified by the following three variables: radius r, right ascension \(\xi\), and declination \(\phi\), portrayed in Fig. 1a. The spacecraft velocity can be projected into the rotating frame \(\left( {\hat{r},\hat{t},\hat{n}} \right)\), where \(\hat{r}\) is aligned with the position vector r and \(\hat{t}\) is parallel to the \(\left( {\hat{c}_{1} ,\hat{c}_{2} } \right)\)-plane (and in the direction of the spacecraft motion, cf. Fig. 1a). The related components are denoted with \(\left( {v_{r} ,v_{t} ,v_{n} } \right)\) and termed, respectively, radial, transverse, and normal velocity component. The state vector x (with components denoted with \(x_{k} \, \left( {k = 1, \ldots ,6} \right)\)) of the spacecraft includes the variables associated with the position and velocity vectors and is given by

$$ {\mathbf{x}}: = \left[ {\begin{array}{*{20}c} {x_{1} } & {x_{2} } & {x_{3} } & {x_{4} } & {x_{5} } & {x_{6} } \\ \end{array} } \right]^{T} = \left[ {\begin{array}{*{20}c} r & \xi & \phi & {v_{r} } & {v_{t} } & {v_{n} } \\ \end{array} } \right]^{T} . $$
(1)
Fig. 1
figure 1

Reference frames (a), thrust angles (b), and thrust deflection angles (c)

The spacecraft is controlled through the thrust direction, defined by the in-plane angle \(\alpha\) and the out-of-plane angle \(\beta\), both illustrated in Fig. 1b (in which \(\hat{T}\) is aligned with the thrust direction). Thus, the control vector u is

$$ {\mathbf{u}}: = \left[ {\begin{array}{*{20}c} {u_{1} } & {u_{2} } \\ \end{array} } \right]^{T} = \left[ {\begin{array}{*{20}c} \alpha & \beta \\ \end{array} } \right]^{T} . $$
(2)

The equations of motion, also termed state equations hence forward, govern the spacecraft trajectory, and involve the state vector x and the control vector u:

$$ \dot{r} = v_{r} \, \dot{\xi } = \frac{{v_{t} }}{r\cos \phi } \, \dot{\phi } = \frac{{v_{n} }}{r} $$
(3)
$$ \dot{v}_{r} = - \frac{\mu }{{r^{2} }} + \frac{{v_{t}^{2} + v_{n}^{2} }}{r} + \frac{T}{{\tilde{m}}}\sin \alpha \cos \beta $$
(4)
$$ \dot{v}_{t} = \frac{{v_{t} }}{r}\left( {v_{n} \tan \phi - v_{r} } \right) + \frac{T}{{\tilde{m}}}\cos \alpha \cos \beta $$
(5)
$$ \dot{v}_{n} = - \frac{{v_{t}^{2} }}{r}\tan \phi - \frac{{v_{r} v_{n} }}{r} + \frac{T}{{\tilde{m}}}\sin \beta , $$
(6)

where \(\left( {{T \mathord{\left/ {\vphantom {T {\tilde{m}}}} \right. \kern-\nulldelimiterspace} {\tilde{m}}}} \right)\) is specified and \(\mu \, \left( { = 398,600.4 \, {{{\text{km}}^{{3}} } \mathord{\left/ {\vphantom {{{\text{km}}^{{3}} } {{\text{s}}^{{2}} }}} \right. \kern-\nulldelimiterspace} {{\text{s}}^{{2}} }}} \right)\) is the Earth gravitational parameter. Equations (3) through (6) can be written in the general compact form:

$$ {\dot{\mathbf{x}}} = {\tilde{\mathbf{f}}}\left( {{\mathbf{x}},{\mathbf{u}},t} \right). $$
(7)

In general, the boundary conditions are problem-dependent, and are written in compact form as

$$ {{\varvec{\uppsi}}}\left( {{\mathbf{x}}_{i} ,{\mathbf{x}}_{f} ,t_{f} ,{\tilde{\mathbf{a}}}} \right) = {0,} $$
(8)

where subscripts i and f are associated with the initial and final value of the state, \(t_{f}\) is the final time, and \({\tilde{\mathbf{a}}}\) is the parameter vector, which contains all the time-independent unknown quantities.

2.2 Attitude equations

Let \(\left( {\hat{a}_{1} ,\hat{a}_{2} ,\hat{a}_{3} } \right)\) denote an auxiliary inertial frame defined as \(\hat{a}_{1} = \hat{c}_{2} {, }\hat{a}_{2} = - \hat{c}_{3} {, }\hat{a}_{3} = - \hat{c}_{1}\). The rotation matrix \({\varvec{R}}_{A}\) relates the two inertial frames, i.e., \(\left[ {\begin{array}{*{20}c} {\hat{a}_{1} } & {\hat{a}_{2} } & {\hat{a}_{3} } \\ \end{array} } \right]^{T} = {\varvec{R}}_{A} \left[ {\begin{array}{*{20}c} {\hat{c}_{1} } & {\hat{c}_{2} } & {\hat{c}_{3} } \\ \end{array} } \right]^{T}\). The spacecraft instantaneous orientation is associated with the body frame \(\left( {\hat{x}_{b} ,\hat{y}_{b} ,\hat{z}_{b} } \right)\), whose origin is in the instantaneous center of mass of the vehicle, its axes coincide with the principal axes of inertia, and \(\hat{x}_{b}\) is aligned with the longitudinal axis. The body frame is obtained from the inertial frame \(\left( {\hat{a}_{1} ,\hat{a}_{2} ,\hat{a}_{3} } \right)\) through three elementary counterclockwise rotations, about axes 3, 2, and 1:

$$ \left[ {\begin{array}{*{20}c} {\hat{x}_{b} } & {\hat{y}_{b} } & {\hat{z}_{b} } \\ \end{array} } \right]^{T} = {\varvec{R}}_{1} \left( \Phi \right){\varvec{R}}_{2} \left( \Theta \right){\varvec{R}}_{3} \left( \Psi \right)\left[ {\begin{array}{*{20}c} {\hat{a}_{1} } & {\hat{a}_{2} } & {\hat{a}_{3} } \\ \end{array} } \right]^{T} . $$
(9)

The angles \(\Psi {, }\Theta ,{\text{ and }}\Phi\) are the yaw, pitch, and roll angle, respectively. Thrust vector control (TVC) is used to control pitch and yaw motion of the spacecraft, and side jet system (SJS) is used to control roll motion. The attitude kinematics equations are given by [15]

$$ \dot{\Phi } = P + Q\sin \Phi \text{tan}\Theta + R\cos \Phi \tan \Theta $$
(10)
$$ \dot{\Theta } = Q\cos \Phi - R\sin \Phi $$
(11)
$$ \dot{\Psi } = \frac{1}{\cos \Theta }\left( {Q\sin \Phi + R\cos \Phi } \right), $$
(12)

where P, Q, R are the body coordinates of the spacecraft angular velocity. The attitude dynamics equations are given by [15]

$$ \dot{P} = \frac{{I_{y} - I_{z} }}{{I_{x} }}QR + \frac{{M_{x} }}{{I_{x} }} $$
(13)
$$ \dot{Q} = \frac{{I_{z} - I_{x} }}{{I_{y} }}PR + \frac{{Tl\cos \Delta_{z} \sin \Delta_{y} }}{{I_{y} }} $$
(14)
$$ \dot{R} = \frac{{I_{x} - I_{y} }}{{I_{z} }}PQ - \frac{{Tl\sin \Delta_{z} }}{{I_{z} }}, $$
(15)

where \(I_{x}\), \(I_{y}\), and \(I_{z}\) are the principal moments of inertia, \(M_{x}\) is the torque generated by the side jet system, T is the thrust magnitude, and l is the distance between the center of mass and the swivel point of the TVC, which lies on the longitudinal axis. Variables \(\Delta_{y}\) and \(\Delta_{z}\) denote the thrust deflection angles portrayed in Fig. 1c.

The electro-hydraulic servoactuator that controls the engine deflection angles is modeled by the following two first-order systems: [11]

$$ \dot{\tilde{\Delta }}_{y} = - \frac{1}{{\tau_{y} }}\tilde{\Delta }_{y} + \frac{1}{{\tau_{y} }}\Delta_{yc} {\text{ and }}\dot{\tilde{\Delta }}_{z} = - \frac{1}{{\tau_{z} }}\tilde{\Delta }_{z} + \frac{1}{{\tau_{z} }}\Delta_{zc} . $$
(16)

In Eq. (16) \(\Delta_{yc}\) is the commanded \(\Delta_{y}\) and represents one of the three control inputs for the attitude control system, while the actual angle \(\Delta_{y}\) (appearing in Eq. (14)) is obtained by saturating \(\tilde{\Delta }_{y}\) to its maximum value \(\overline{\Delta }_{y}\):

$$ \Delta_{y} = {\text{sat}}_{{\overline{\Delta }_{y} }} \left( {\tilde{\Delta }_{y} } \right) = \left\{ \begin{gathered} - \overline{\Delta }_{y} {\text{ if }}\tilde{\Delta }_{y} < - \overline{\Delta }_{y} \hfill \\ \Delta_{y} {\text{ if }} - \overline{\Delta }_{y} \le \tilde{\Delta }_{y} \le \overline{\Delta }_{y} \hfill \\ \overline{\Delta }_{y} {\text{ if }}\tilde{\Delta }_{y} > \overline{\Delta }_{y} \hfill \\ \end{gathered} \right.. $$
(17)

Similar considerations apply to \(\Delta_{zc}\), \(\overline{\Delta }_{z}\), and \(\tilde{\Delta }_{z}\). The actuator of the side jet system is model by the following first order system:

$$ \dot{\tilde{M}}_{x} = - \frac{1}{{\tau_{x} }}\tilde{M}_{x} + \frac{1}{{\tau_{x} }}M_{xc} $$
(18)

for which similar considerations apply. In particular, \(M_{xc}\) is the commanded \(M_{x}\), and represents the third control input. Moreover, the saturation value for \(\tilde{M}_{x}\) is denoted with \(\overline{M}_{x}\).

3 Nominal Trajectory

This study addresses real-time closed-loop guidance and attitude control of a space vehicle during the last powered arc preceding orbit injection. The state components related to the motion of the mass center are collected in x (cf. Eq. (1)), whereas the control vector u includes the thrust direction angles (cf. Eq. (2)).

The formal and numerical methodology for the derivation of the nominal trajectory is identical for the two orbit injection maneuvers that are being addressed, and is described in the following.

3.1 Formulation of the problem

With regard to the applications of interest, the nominal initial conditions on some state variables are specified \(\left( {\xi = 0, \, \phi = 0,{\text{ and }}v_{n} = 0} \right)\), whereas the initial values of the remaining components of x are either all specified (A) or expressed in terms of true anomaly at ignition, \(f_{0}\) (B):

$$ \begin{gathered} {\text{(A) }}r_{i} - r_{0} = 0\quad v_{r,i} - v_{r0} = 0 \quad v_{t,i} - v_{t0} = 0{ ,} \hfill \\ {\text{(B) }}r_{i} - \frac{{\tilde{p}}}{{1 + e\cos f_{0} }} = 0 \quad v_{r,i} - \sqrt {\frac{\mu }{{\tilde{p}}}} e\sin f_{0} = 0 \quad v_{t,i} - \sqrt {\frac{\mu }{{\tilde{p}}}} \left( {1 + e\cos f_{0} } \right) = 0 \hfill \\ \end{gathered} $$
(19)

where subscript 0 denotes a specified value, whereas \(\tilde{p}\) and e are, respectively, the semilatus rectum and eccentricity of the Keplerian path prior to ignition. The desired final conditions are associated with orbit injection into a circular orbit of specified radius \(R_{f}\) and coplanar with the initial trajectory, thus

$$ \begin{aligned} & r_{f} - R_{f} = 0 \quad \phi_{f} = 0 \quad v_{r,f} = 0 \\& v_{t,f} - \sqrt {\frac{\mu_{E}}{R_{f}}} = 0 \quad v_{n,f} = 0. \end{aligned} $$
(20)

As continuous thrust is employed in the powered arc, propellant consumption is minimized through minimization of the time of flight. Therefore, if the ignition time \(t_{0}\) is set to 0, the objective function is \(J = t_{f}\).

The problem at hand can be reformulated using the dimensionless normalized time \(\tau\) defined as

$$ \tau : = {t \mathord{\left/ {\vphantom {t {t_{f} }}} \right. \kern-\nulldelimiterspace} {t_{f} }} \, \Rightarrow \, \tau_{0} \equiv 0 \le \tau \le 1 \equiv \tau_{f} . $$
(21)

Let the dot denote the derivative with respect to \(\tau\) hence forward. Equation (7) is rewritten as

$$ {\dot{\mathbf{x}}} = t_{f} {\tilde{\mathbf{f}}}\left( {{\mathbf{x}},{\mathbf{u}},t_{f} \tau } \right) = :{\mathbf{f}}\left( {{\mathbf{x}},{\mathbf{u}},{\mathbf{a}},\tau } \right){\text{ where }}{\mathbf{a}}: = \left[ {\begin{array}{*{20}c} {{\tilde{\mathbf{a}}}^{T} } & {t_{f} } \\ \end{array} } \right]^{T} . $$
(22)

In the last relation, the p-dimensional vector a contains the unknown time-independent parameters of the problem. In summary, the optimal control problem consists of identifying a feasible solution that minimizes the objective functional J, through selection of the optimal control law \({\mathbf{u}}^{*} \left( \tau \right)\) and the optimal parameter vector \({\mathbf{a}}^{*}\).

3.2 Necessary conditions for optimality

To state the necessary conditions for optimality, which are extensively employed in this research, a Hamiltonian H and a function of the boundary conditions \(\tilde{\Phi }\) are introduced as [16]

$$ H\left( {{\mathbf{x}},{\mathbf{u}},{\mathbf{a}},{{\varvec{\uplambda}}},\tau } \right): = {{\varvec{\uplambda}}}^{T} {\mathbf{f}}\left( {{\mathbf{x}},{\mathbf{u}},{\mathbf{a}},\tau } \right)\quad {\text{and}}\quad \tilde{\Phi }\left( {{\mathbf{x}}_{0} ,{\mathbf{x}}_{f} ,{\mathbf{a}},{{\varvec{\upupsilon}}}} \right): = t_{f} + {{\varvec{\upupsilon}}}^{T} {{\varvec{\uppsi}}}\left( {{\mathbf{x}}_{0} ,{\mathbf{x}}_{f} ,{\mathbf{a}}} \right), $$
(23)

where the time-varying, n-dimensional costate vector \({{\varvec{\uplambda}}}\left( \tau \right)\) and the time-independent, q-dimensional vector \({{\varvec{\upupsilon}}}\) are the adjoint variables conjugate to the state Eqs. (22) and to the conditions (8), respectively.

In the presence of an optimal (locally minimizing) solution, the following conditions hold:

$$ {\mathbf{u}}^{*} = \arg \mathop {\min }\limits_{{\mathbf{u}}} H $$
(24)
$$ {\dot{\mathbf{\lambda }}} = - \left[ {\frac{\partial H}{{\partial {\mathbf{x}}}}} \right]^{T} {\text{, with }}{{\varvec{\uplambda}}}_{0} = - \left[ {\frac{\partial \Phi }{{\partial {\mathbf{x}}_{0} }}} \right]^{T} {\text{ and }}{{\varvec{\uplambda}}}_{f} = \left[ {\frac{\partial \Phi }{{\partial {\mathbf{x}}_{f} }}} \right]^{T} $$
(25)
$$ \left[ {\frac{\partial \Phi }{{\partial {\mathbf{a}}}}} \right]^{T} + \int\limits_{0}^{1} {\left[ {\frac{\partial H}{{\partial {\mathbf{a}}}}} \right]^{T} d\tau = {\varvec{0}}} . $$
(26)

For the Hamiltonian of Eq. (23) the Pontryagin minimum principle (Eq. (24)) yields the control variables as functions of the adjoint variables and the state variables:

$$ \beta^{*} = - \arcsin \frac{{\lambda_{6}^{*} }}{{\sqrt {\lambda_{4}^{*2} + \lambda_{5}^{*2} + \lambda_{6}^{*2} } }} \quad \sin \alpha^{*} = - \frac{{\lambda_{4}^{*} }}{{\sqrt {\lambda_{4}^{*2} + \lambda_{5}^{*2} } }} \quad \cos \alpha^{*} = - \frac{{\lambda_{5}^{*} }}{{\sqrt {\lambda_{4}^{*2} + \lambda_{5}^{*2} } }}, $$
(27)

where the superscript * denotes the optimal value of the respective variable. Equations (25) are the adjoint (or costate) equations, together with the related boundary conditions; Eq. (26) is equivalent to p algebraic scalar equations. If the control u is unconstrained, then Eq. (24) implies that H is stationary with respect to u along the optimal path, i.e., \(H_{{\mathbf{u}}}^{*} = {\varvec{0}}^{T}\). Equations (24) through (26) are well established in optimal control theory (and are proven, for instance, in Ref. [16]), and allow translating the optimal control problem into a two-point boundary-value problem. It is straightforward to demonstrate that the condition (26) is equivalent to

$$ {{\varvec{\upmu}}}_{f} - \left[ {\frac{\partial \Phi }{{\partial {\mathbf{a}}}}} \right]^{T} = {\varvec{0}}{\text{ and }}{\dot{\mathbf{\mu }}}{ = } - \left[ {\frac{\partial H}{{\partial {\mathbf{a}}}}} \right]^{T} \, \left( {{\text{with }}{{\varvec{\upmu}}}_{0} = {\varvec{0}}} \right). $$
(28)

As previously remarked, planar trajectories leading to injection can be reasonably assumed to outperform any alternative three-dimensional path. As a result, the problem of determining the minimum-fuel path can be simplified by assuming that at any time the out-of-plane variables equal 0, i.e., \(\phi = 0{ , }v_{n}^{{}} = 0\), \(\lambda_{3}^{*} = 0,{\text{ and }}\lambda_{6}^{*} = 0\), leading to \(\beta^{*} = 0\).

3.3 Indirect heuristic method

Unlike alternative heuristic approaches, the indirect heuristic method (IHM) does not assume any functional structure for the control variables. Instead, the analytical necessary conditions for optimality are derived and employed, for the primary purpose of expressing the control variables as functions of the adjoint variables. These are in turn subject to the costate equations (and the related boundary conditions), which are to be integrated together with the dynamics equations. As a result, a reduced parameter set (mainly composed of the unknown initial values of the adjoint variables) suffices to transcribe the optimal control problem into a parameter optimization problem. This is solved using a heuristic technique (PSO [17] in this work), which employs a population of individuals that evolve toward the optimal solution. Each individual is associated with a particular choice of the parameter set. The optimal control variables are determined without any restriction, because no particular representation is assumed. Furthermore, satisfaction of all the necessary conditions guarantees (at least the local) optimality of the solution. The methodology at hand is thus capable of circumventing some disadvantages of using heuristic techniques, while retaining the main advantage, which is the absence of any starting guess. On the other hand, considerable analytical developments are needed for the application of this technique, and the size of the problem doubles as the adjoint equations must also be integrated for each individual. IHM has already been successfully applied to several space trajectory optimization problems. [18, 19].

For minimum-time orbit injection maneuvers the parameter set, associated with each individual, includes the initial values of the adjoint variables, the final time, and the remaining time-independent parameters collected in a. The state Eqs. (22) are integrated together with the adjoint Eqs. (25), while the Pontryagin minimum principle is employed with the intent of supplying the optimal control as a function of the adjoint variables. For each individual, the final condition violations are evaluated. Further details on the specific implementation of IHM are provided in Refs. [18] and [19].

4 Variable-Time-Domain Neighboring Optimal Guidance

The Variable-Time-Domain Neighboring optimal guidance (VTD-NOG) uses the optimal trajectory as the reference path, with the final intent of determining the control correction at each sampling time \(\left\{ {t_{k} } \right\}_{{k = 0, \ldots ,n_{S} }} ,{\text{ with }}t_{0} = 0\). These are the times at which the displacement between the actual trajectory, associated with \({\mathbf{x}}\), and the nominal trajectory, corresponding to \({\mathbf{x}}^{*}\), is evaluated, to yield

$$ d{\mathbf{x}}_{k} \equiv \delta {\mathbf{x}}_{k} = {\mathbf{x}}\left( {t_{k} } \right) - {\mathbf{x}}^{*} \left( {t_{k} } \right). $$
(29)

The total number of sampling times, \(n_{S}\), is unspecified, whereas the actual time interval between two successive sampling times is given and denoted with \(\Delta t_{S}\), \(\Delta t_{S} = t_{k + 1} - t_{k}\) \(\left( {k = 0, \ldots ,n_{S} - 1} \right)\). It is apparent that a fundamental ingredient needed to implement VTD-NOG is the formula for determining \(t_{f}^{\left( k \right)}\) at \(t_{k}\), where \(t_{f}^{\left( k \right)}\) denotes the overall time of flight calculated at time \(t_{k}\).

4.1 Time-to-Go Updating Law and Termination Criterion

The fundamental principle that underlies the VTD-NOG scheme consists in finding the control correction \(\delta {\mathbf{u}}\left( \tau \right)\) in the generic interval \(\left[ {\tau_{k} ,\tau_{k + 1} } \right]\) such that the second differential of J is minimized [6, 7], while holding the first-order expansions of the state equations, the related final conditions, and the parameter condition. Minimizing the second differential of J is equivalent to solving the accessory optimization problem, defined in the interval \(\left[ {\tau_{k} ,1} \right]\). The solution of the same problem in the overall interval \(\left[ {0,1} \right]\) leads to deriving all the relations reported in Ref. [16]. This means that the latter relations need to be extended to the generic interval \(\left[ {\tau_{k} ,1} \right]\).

For the sake of brevity, only a few fundamental equations that form VTD-NOG are reported. Full details are contained in Refs. [6] and [7]. The following equation yields the control correction in \(\left[ {\tau_{k} ,\tau_{k + 1} } \right]\):

$$ \delta {\mathbf{u}} = - H_{uu}^{ - 1} \left( {H_{ux} \delta {\mathbf{x}} + H_{ua} d{\mathbf{a}} + H_{u\lambda } \delta {{\varvec{\uplambda}}}} \right) \, \tau_{k} \le \tau \le \tau_{k + 1} , $$
(30)

where the vectors reported as subscripts denote partial derivatives. Moreover, the iterative correction of the flight time, \(dt_{f}^{\left( k \right)}\), derives again from generalization of the accessory optimization problem, defined and solved in each interval \(\left[ {\tau_{k} ,\tau_{k + 1} } \right]\). Once \(dt_{f}^{\left( k \right)}\) is evaluated at \(\tau_{k}\), the updated time of flight is simply \(t_{f}^{\left( k \right)} = t_{f}^{*} + dt_{f}^{\left( k \right)}\). Because the actual sampling interval \(\Delta t_{S}\) is specified, the general formula for \(\tau_{k}\) is

$$ \tau_{k + 1} = \sum\limits_{j = 0}^{k} {\frac{{\Delta t_{S} }}{{t_{f}^{\left( j \right)} }}} \, \left( {k = 0, \ldots ,n_{S} - 1; \, t_{f}^{\left( 0 \right)} = t_{f}^{*} } \right) $$
(31)

The overall number of intervals \(n_{S}\) is found at the first occurrence of the following condition:

$$ \sum\limits_{j = 0}^{{n_{S} - 1}} {\frac{{\Delta t_{S} }}{{t_{f}^{\left( j \right)} }}} \, \ge {1 } \Rightarrow \, \tau_{{n_{S} }} = 1. $$
(32)

The introduction of the normalized time \(\tau\) is extremely useful, because all the gain matrices are defined in the normalized interval [0,1] and cannot become singular. Moreover, the limiting values \(\left\{ {\tau_{k} } \right\}\) are dynamically calculated at each sampling time using Eq. (31). Also the termination criterion has a consistent definition, and corresponds to the upper bound of the interval [0,1], to which \(\tau\) is constrained.

4.2 Gain Matrices

The definition of a neighboring optimal path requires the numerical backward integration of the sweep Eqs.  [6, 7, 16], for the purpose of obtaining several time-varying gain matrices, which are essential for real-time neighboring optimal guidance. These matrices are evaluated along the optimal trajectory, which represents the reference solution. For the sake of brevity, only an outline of the steps needed to get the gain matrices is presented in the following. Full details can be found again in Refs. [6] and [7].

As a first step, matrices A, B, C, D, E, and F are derived analytically [7], and evaluated along the optimal path. Then, the following sweep equations for \(\hat{{\varvec{S}}}\), R, Q, n, and \({\varvec{\alpha}}\) are integrated backward in time:

$$ {\dot{\hat{\textbf S}}} = - \hat{{\textbf S}}{\textbf A} + {\hat{\textbf S}{\text B}\hat{\textbf S}} + \left[ {{\hat{\textbf S}{\textbf D\alpha} }^{ - 1} + {\textbf {WF}\alpha}^{ - 1} + {\textbf {E}\alpha }^{ - 1} } \right]{\textbf{m}}^{T} - {\textbf{WE}}^{T} - {\textbf{WD}}^{T} \hat{{S}} - {\textbf{C}} - {\textbf{A}}^{T} \hat{{\textbf S}} $$
(33)
$$ \dot{{\textbf R}}^{T} = {\textbf{R}}^{T} {\textbf B\hat{\textbf S}} - {\textbf{R}}^{T} {\textbf{A}} - {\textbf{R}}^{T} {\textbf{BWm}}^{T} \quad \dot{{\textbf Q}} = - {\textbf{R}}^{T} {\textbf{BWn}}^{T} \quad \dot{{\textbf n}} = - {\textbf{R}}^{T} \left( {{\textbf D + {\textbf {BW}} {\varvec \alpha} }} \right) $$
(34)
$$ \varvec{\dot\alpha } = \mathbf{D}^{{T}} {\mathbf W} {\mathbf \alpha} - \mathbf{F} - \mathbf{m}^{{T}} {\textbf{BW} {\mathbf \alpha} } - \mathbf{m}^{{T}} \mathbf{D}, $$
(35)

where \({\varvec{\varTheta}}\) represents a constant, auxiliary matrix [6, 7], and

$$ {\mathbf{U}}: = \left[ {\begin{array}{*{20}c} {\mathbf{R}} & {\mathbf{m}} \\ \end{array} } \right] \quad {\mathbf{V}}: = \left[ {\begin{array}{*{20}c} {\mathbf{Q}} & {\mathbf{n}} \\ {\mathbf{n}}^{T} & {\mathbf{\alpha}} \\ \end{array} } \right] \quad {\mathbf{W}}: = {\mathbf{UV}}^{ - 1}{\mathbf{\Theta}}{.} $$
(36)

The displacement \(\delta {{\varvec{\uplambda}}}\) can be written in terms of the preceding matrices, as

$$ \delta {{\varvec{\uplambda}}} = \left( {\hat{{\textbf S}} - {\mathbf{Wm}}^{T} } \right)\delta {\mathbf{x}} - {\mathbf{Wn}}^{T} d{{\varvec{\upupsilon}}} - {\mathbf{W \alpha }}d{\mathbf{a}}. $$
(37)

4.3 Preliminary Offline Computations and VTD-NOG & CPD Structure

The implementation of VTD-NOG requires several preliminary computations that can be completed offline, and yield several nominal quantities, stored in the onboard computer.

First of all, the optimal trajectory is to be determined, together with the related state, costate, and control variables, which are assumed as the nominal ones. These are obtained in the time domain \(\tau\) and are represented as sequences of equally-spaced values, e.g., \({\mathbf{u}}_{i}^{*} = {\mathbf{u}}^{*} \left( {\tau_{i} } \right)\). The successive step is the analytical derivation of the matrices \(\left\{ {{\mathbf{f}}_{{\mathbf{x}}} ,{\mathbf{f}}_{{\mathbf{u}}} ,{\mathbf{f}}_{{\mathbf{a}}} ,H_{{{\mathbf{xx}}}} ,H_{{{\mathbf{xu}}}} ,H_{{{\mathbf{x\lambda }}}} ,H_{{{\mathbf{xa}}}} ,H_{{{\mathbf{ux}}}} ,H_{{{\mathbf{uu}}}} ,H_{{{\mathbf{ua}}}} ,H_{{{\mathbf{u\lambda }}}} ,H_{{{\mathbf{ax}}}} ,H_{{{\mathbf{au}}}} ,H_{{{\mathbf{aa}}}} ,H_{{{\mathbf{a\lambda }}}} } \right.,{{\varvec{\uppsi}}}_{{{\mathbf{x}}_{f} }} ,{{\varvec{\uppsi}}}_{{{\mathbf{x}}_{0} }} ,{{\varvec{\uppsi}}}_{{\mathbf{a}}} ,\Phi_{{{\mathbf{x}}_{0} {\mathbf{x}}_{0} }} ,\Phi_{{{\mathbf{x}}_{0} {\mathbf{a}}}} ,\Phi_{{{\mathbf{x}}_{f} {\mathbf{x}}_{f} }}\)\(\Phi_{{{\mathbf{x}}_{f} {\mathbf{a}}}} ,\Phi_{{{\mathbf{ax}}_{f} }} ,\left. {\Phi_{{{\mathbf{aa}}}} } \right\}\), which are evaluated along the optimal path. Then, also the matrices A, B, C, D, E, and F are introduced and evaluated. All of these quantities are interpolated, to be available at arbitrary values of \(\tau\) in the interval \(\left[ {0,1} \right]\). Subsequently, the two-step backward integration of the sweep equations is performed, and yields the gain matrices \(\hat{{S}}\), R, m, Q, n, and \({\varvec{\alpha}}\), using also the analytic expressions of W, U, and V (written in terms of R, m, Q, n, and \({\varvec{\alpha}}\)). Finally, all the remaining nominal quantities are interpolated, to be available again at arbitrary values of \(\tau\).

Using the nominal quantities computed offline, at each time \(\tau_{k}\) the VTD-NOG algorithm determines the time of flight \(t_{f}^{\left( k \right)}\), the value \(\tau_{k + 1}\), and the control correction \(\delta {\mathbf{u}}\left( \tau \right)\). VTD-NOG ends when Eq. (31) is satisfied. Figure 2 portrays a block diagram that illustrates the sampled-data feedback structure of the VTD-NOG algorithm, in which the control and flight time corrections definitely depend on the state displacement \(\delta {\mathbf{x}}\) (evaluated at specified discrete times) through the time-varying gain matrices, which are computed offline and stored onboard. The attitude control loop (encircled by the dotted line) is being described in detail in the following.

Fig. 2
figure 2

Block diagram of VTD-NOG & CPD

5 Constrained Proportional-Derivative Attitude Control

The attitude control system is designed for the purpose of guaranteeing the correct spacecraft orientation, on the basis of the corrected control u yielded iteratively by VTD-NOG. The output of the attitude control system is represented by the actual control \({\mathbf{u}}_{a}\) (cf. Fig. 2).

5.1 Commanded Attitude

With reference to Fig. 2, VTD-NOG yields the corrected control u, i.e., the thrust direction identified by the angles \(\alpha\) and \(\beta\), under the approximating assumption that this direction is always aligned with the longitudinal axis of the spacecraft. This means that these two corrected angles represent the commanded values, denoted with \(\alpha_{c}\) and \(\beta_{c}\), that the attitude control system must pursue through the use of thrust vectoring.

The commanded yaw, pitch, and roll angles are denoted with \(\Psi_{c} {, }\Theta_{c} ,\) and \(\Phi_{c}\), and correspond to a thrust direction \(\hat{T}_{c}\) that points toward \(\hat{x}_{b}\). This alignment condition leads to

$$ \hat{T}_{c} = \left[ {\begin{array}{*{20}c} {\cos \Theta_{c} \cos \Psi_{c} } & {\cos \Theta_{c} \sin \Psi_{c} } & { - \sin \Theta_{c} } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {\hat{a}_{1} } & {\hat{a}_{2} } & {\hat{a}_{3} } \\ \end{array} } \right]^{T} . $$
(38)

On the other hand, the commanded thrust direction is identified through the \(\alpha_{c}\) and \(\beta_{c}\):

$$ \begin{gathered} \hat{T}_{c} = \left[ {\begin{array}{*{20}c} {\cos \beta_{c} \sin \alpha_{c} } & {\cos \beta_{c} \cos \alpha_{c} } & {\sin \beta_{c} } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {\hat{r}} & {\hat{t}} & {\hat{n}} \\ \end{array} } \right]^{T} = \left[ {\begin{array}{*{20}c} {\cos \beta_{c} \sin \alpha_{c} } & {\cos \beta_{c} \cos \alpha_{c} } & {\sin \beta_{c} } \\ \end{array} } \right] \cdot \hfill \\ \, {\varvec{R}}_{2} \left( { - \phi } \right){\varvec{R}}_{3} \left( \xi \right){\varvec{R}}_{A}^{T} \left[ {\begin{array}{*{20}c} {\hat{a}_{1} } & {\hat{a}_{2} } & {\hat{a}_{3} } \\ \end{array} } \right]^{T} . \hfill \\ \end{gathered} $$
(39)

Identification of Eqs. (38) and (39) leads to obtaining \(\Psi_{c} {\text{ and }}\Theta_{c}\) as functions of \(\alpha_{c} , \, \beta_{c}\), \(\phi\), and \(\xi\). The commanded roll angle \(\Phi_{c}\) is independent of \(\hat{T}_{c}\), and can be selected on the basis of practical requirements.

5.2 Control Algorithm

A baseline attitude control action for such spacecraft is given by the following PD control:

$$ M_{xc} = k_{px} \left( {\Phi_{c} - \Phi } \right) - k_{dx} P $$
(40)
$$ \Delta_{yc} = k_{py} \left( {\Theta_{c} - \Theta } \right) - k_{dy} Q \, \Delta_{zc} = - k_{pz} \left( {\Psi_{c} - \Psi } \right) + k_{dz} R. $$
(41)

To analyze convergence properties achieved by the considered controller, first it is worth noticing that most of times the commanded angles \(\Phi_{c}\), \(\Theta_{c}\), and \(\Psi_{c}\) can be modeled as constant, since the guidance command usually changes slowly compared to attitude maneuvers. Next, it will be shown that if \(\Phi_{c}\), \(\Theta_{c}\), and \(\Psi_{c}\) are constant, then the proposed PD control guarantees local convergence to the desired attitude. In fact, linearizing Eqs. (10) through (15) about \(\Phi = \Theta = \Psi = 0\), \(P = Q = R = 0\), \(M_{x} = 0, \, \Delta_{y} = \Delta_{z} = 0\), the following relations are obtained:

$$ \dot{\Phi } = P \, \dot{\Theta } = Q \, \dot{\Psi } = R $$
(42)
$$ \dot{P} = \frac{1}{{I_{x} }}M_{x} \, \dot{Q} = \frac{Tl}{{I_{y} }}\Delta_{y} \, \dot{R} = - \frac{Tl}{{I_{z} }}\Delta_{z} . $$
(43)

Linearization of the actuator’s Eqs. (16) and (18) about \(\tilde{\Delta }_{y} = 0\), \(\tilde{\Delta }_{z} = 0\), \(\tilde{M}_{x} = 0\) leads to

$$ \dot{\Delta }_{y} = - \frac{1}{{\tau_{y} }}\Delta_{y} + \frac{1}{{\tau_{y} }}\Delta_{yc} \, \dot{\Delta }_{z} = - \frac{1}{{\tau_{z} }}\Delta_{z} + \frac{1}{{\tau_{z} }}\Delta_{zc} \, \dot{M}_{x} = - \frac{1}{{\tau_{x} }}M_{x} + \frac{1}{{\tau_{x} }}M_{xc} . $$
(44)

Note that equations relative to each single axis are decoupled from the others. Then, it is easy to obtain that the linearized closed-loop system given by Eqs. (40)–(44) possesses the following property. If \(\Phi_{c}\), \(\Theta_{c}\), and \(\Psi_{c}\) are constant and \(k_{dx} > k_{px} \tau_{x} > 0\), \(k_{dy} > k_{py} \tau_{y} > 0\), \(k_{dz} > k_{pz} \tau_{z} > 0\), then \(\left( {\Phi ,\Theta ,\Psi } \right)\) converges to \(\left( {\Phi_{c} ,\Theta_{c} ,\Psi_{c} } \right)\).

The considered PD control can lead to excessive rates for the thrust deflection angles \(\Delta_{y}\) and \(\Delta_{z}\), and roll control torque \(M_{x}\). In fact, high values for the gains \(k_{px}\), \(k_{dx}\), \(k_{py}\), \(k_{dy}\), \(k_{pz}\), and \(k_{dz}\) might be required to obtain a fast response of the attitude control system in comparison with the guidance command. Then, high gains can in turn lead to high amplitudes for the rates of \(M_{x}\), \(\Delta_{y}\), and \(\Delta_{z}\). If the rates are too high, then clearly they become physically infeasible. The latter issue is here tackled using Constrained Proportional and Derivative (CPD) control, which is described by the following equations:

$$ M_{xc} = {\text{sat}}_{{\overline{M}_{xc} }} \left\{ {k_{px} \left( {\Phi_{c} - \Phi } \right) - k_{dx} P} \right\} $$
(45)
$$ \Delta_{yc} = {\text{sat}}_{{\overline{\Delta }_{yc} }} \left\{ {k_{py} \left( {\Theta_{c} - \Theta } \right) - k_{dy} Q} \right\} \, \Delta_{zc} = {\text{sat}}_{{\overline{\Delta }_{zc} }} \left\{ { - k_{pz} \left( {\Psi_{c} - \Psi } \right) + k_{dz} R} \right\}, $$
(46)

which replace Eqs. (40) and (41). In Eqs. (45)–(46) \(\overline{M}_{xc} > 0\), \(\overline{\Delta }_{yc} > 0\), and \(\overline{\Delta }_{zc} > 0\) are additional design parameters. Even though the formal proof is omitted for the sake of conciseness [12], the use of CPD control in Eqs. (45)-(46) ensures that

$$ \left| {\dot{M}_{x} } \right| \le \frac{2}{{\tau_{x} }}\overline{M}_{xc} \, \left| {\dot{\Delta }_{y} } \right| \le \frac{2}{{\tau_{y} }}\overline{\Delta }_{yc} \, \left| {\dot{\Delta }_{z} } \right| \le \frac{2}{{\tau_{z} }}\overline{\Delta }_{zc} . $$
(47)

It is thus apparent that the introduction of limiting values for the commanded torque and deflection angles constrains the time derivatives of the corresponding actual variables.

It is worth noticing that if \(\left| {k_{px} \Phi_{c} } \right| \le \overline{M}_{xc}\), \(\left| {k_{py} \Theta_{c} } \right| \le \overline{\Delta }_{yc}\), \(\left| {k_{pz} \Psi_{c} } \right| \le \overline{\Delta }_{zc}\), then linearization of CPD control in Eqs. (45)–(46) about \(\Phi = \Theta = \Psi = 0\) and \(P = Q = R = 0\), clearly reduces CPD to the standard PD control in Eqs. (40)–(41). Thus, under those conditions also CPD control achieves local convergence to the desired attitude.

5.3 Determination of Control Gains

The goal of the current subsection is presenting a method for determining at least first guess values for the gains \(k_{px}\), \(k_{dx}\), \(k_{py}\), \(k_{dy}\), \(k_{pz}\), and \(k_{dz}\). The method is here illustrated only for gains \(k_{py}\) and \(k_{dy}\), because it can be easily extended to the other gains. Neglect dynamics of the actuator in the first relation of Eq. (44) and consider the linearized closed-loop system in Eqs. (41) and (42), (43), obtaining

$$ \ddot{\Theta } = \frac{Tl}{{I_{y} }}\left[ {k_{py} \left( {\Theta_{c} - \Theta } \right) - k_{dy} \dot{\Theta }} \right] \, \Rightarrow \, \frac{{\hat{\Theta }\left( s \right)}}{{\hat{\Theta }_{c} \left( s \right)}} = \frac{{G_{y} }}{{s^{2} + G_{y} k_{dy} s + k_{py} }}, $$
(48)

whereas the last expression represents the transfer function in the Laplace domain, and \(G_{y} = {{Tl} \mathord{\left/ {\vphantom {{Tl} {I_{y} }}} \right. \kern-\nulldelimiterspace} {I_{y} }}\). Note that the value of \(G_{y}\) varies during the flight, since so do the values of T, l, and \(I_{y}\). Let \(\underline{{G_{y} }}\) and \(\overline{{G_{y} }}\) be the minimum and maximum values of \(G_{y}\) along the trajectory. Then, the gains \(k_{py}\) and \(k_{dy}\) are chosen so that for all \(\underline{{G_{y} }} \le G_{y} \le \overline{{G_{y} }}\) it occurs that the transfer function in Eq. (48) possesses poles with dam** ratio \(\zeta_{y} \ge \underline{{\zeta_{y} }}\) and natural angular frequency \(\omega_{ny} \ge \underline{{\omega_{ny} }}\). Magnitudes \(\underline{{\zeta_{y} }}\) and \(\underline{{\omega_{ny} }}\) are chosen based on experience and proceeding by trial-and-error. Because \(G_{y} k_{py} = \omega_{ny}^{2}\) and \(G_{y} k_{dy} = 2\zeta_{y} \omega_{ny}\), it is easy to verify that the specifications \(\zeta_{y} \ge \underline{{\zeta_{y} }}\) and \(\omega_{ny} \ge \underline{{\omega_{ny} }}\) are fulfilled for all \(\underline{{G_{y} }} \le G_{y} \le \overline{{G_{y} }}\) by setting \(k_{py} = {{\underline{{\omega_{ny} }}^{2} } \mathord{\left/ {\vphantom {{\underline{{\omega_{ny} }}^{2} } {\underline{{G_{y} }} }}} \right. \kern-\nulldelimiterspace} {\underline{{G_{y} }} }}\) and \(k_{dy} = 2{{\underline{{\zeta_{y} }} \underline{{\omega_{ny} }} } \mathord{\left/ {\vphantom {{\underline{{\zeta_{y} }} \underline{{\omega_{ny} }} } {\underline{{G_{y} }} }}} \right. \kern-\nulldelimiterspace} {\underline{{G_{y} }} }}\).

5.4 Actual Attitude and Thrust Angles

Using the relation \(\left[ {\begin{array}{*{20}c} {\hat{a}_{1} } & {\hat{a}_{2} } & {\hat{a}_{3} } \\ \end{array} } \right]^{T} = {\varvec{R}}_{A} {\varvec{R}}_{3} \left( { - \xi } \right){\varvec{R}}_{2} \left( \phi \right)\left[ {\begin{array}{*{20}c} {\hat{r}} & {\hat{t}} & {\hat{n}} \\ \end{array} } \right]^{T}\), the actual spacecraft orientation is identified through the following equation:

$$ \left[ {\begin{array}{*{20}c} {\hat{x}_{b} } & {\hat{y}_{b} } & {\hat{z}_{b} } \\ \end{array} } \right]^{T} = {\varvec{R}}_{1} \left( \Phi \right){\varvec{R}}_{2} \left( \Theta \right){\varvec{R}}_{3} \left( \Psi \right){\varvec{R}}_{A} {\varvec{R}}_{3} \left( { - \xi } \right){\varvec{R}}_{2} \left( \phi \right)\left[ {\begin{array}{*{20}c} {\hat{r}} & {\hat{t}} & {\hat{n}} \\ \end{array} } \right]^{T} . $$
(49)

Moreover, the actual thrust direction \(\hat{T}_{a}\) depends on the two angles \(\Delta_{y}\) and \(\Delta_{z}\):

$$ \hat{T}_{a} = \left[ {\begin{array}{*{20}c} {\cos \Delta_{z} \cos \Delta_{y} } & {\sin \Delta_{z} } & {\cos \Delta_{z} \sin \Delta_{y} } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {\hat{x}_{b} } & {\hat{y}_{b} } & {\hat{z}_{b} } \\ \end{array} } \right]^{T} . $$
(50)

Due to Eq. (49), the last relation can be rewritten as

$$ \hat{T}_{a} = \left[ {\begin{array}{*{20}c} {\cos \Delta_{z} \cos \Delta_{y} } & {\sin \Delta_{z} } & {\cos \Delta_{z} \sin \Delta_{y} } \\ \end{array} } \right]{\varvec{R}}_{1} \left( \Phi \right){\varvec{R}}_{2} \left( \Theta \right){\varvec{R}}_{3} \left( \Psi \right){\varvec{R}}_{A} {\varvec{R}}_{3} \left( { - \xi } \right){\varvec{R}}_{2} \left( \phi \right)\left[ {\begin{array}{*{20}c} {\hat{r}} & {\hat{t}} & {\hat{n}} \\ \end{array} } \right]^{T} . $$
(51)

However, in the \(\left( {\hat{r},\hat{t},\hat{n}} \right)\)-frame the actual thrust direction can be written also as

$$ \hat{T}_{a} = \left[ {\begin{array}{*{20}c} {\cos \beta_{a} sin\alpha_{a} } & {\cos \beta_{a} \cos \alpha_{a} } & {\sin \beta_{a} } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {\hat{r}} & {\hat{t}} & {\hat{n}} \\ \end{array} } \right]^{T} . $$
(52)

Identification of Eqs. (51) and (52) leads to obtaining \(\alpha_{a}\) and \(\beta_{a}\) as functions of \(\Phi , \, \Theta , \, \Psi , \, \phi , \, \xi , \, \Delta_{y} ,{\text{ and }}\Delta_{z}\).

6 Leo-to-Geo Orbit Transfer

As a first application, this research considers the injection maneuver that concludes a high-thrust orbit transfer, from a low Earth orbit (LEO) to a geostationary orbit (GEO), in the presence of nonnominal flight conditions. As continuous, constant thrust is employed, the nominal thrust acceleration is \({T \mathord{\left/ {\vphantom {T {\tilde{m}}}} \right. \kern-\nulldelimiterspace} {\tilde{m}}} = {{n_{0} c} \mathord{\left/ {\vphantom {{n_{0} c} {\left( {c - n_{0} t} \right)}}} \right. \kern-\nulldelimiterspace} {\left( {c - n_{0} t} \right)}}\), where c is the (constant) effective exhaust velocity of the propulsive system, \(n_{0}\) is the initial thrust acceleration (at \(t_{0} = 0\)), and t is the actual time (\(c = 3 \, {{{\text{km}}} \mathord{\left/ {\vphantom {{{\text{km}}} {\sec }}} \right. \kern-\nulldelimiterspace} {\sec }}\) and \(n_{0} = 1.112{\text{ g}}\)).

The initial LEO is assumed to be circular, at altitude of 400 km, and coplanar with the final geostationary orbit. The optimal transfer is composed of three arcs: (a) a short-duration powered phase, (b) a coast (ballistic) arc, and (c) a final thrust arc, which concludes at orbit injection.

This work considers the problem of minimizing the time of flight of the last powered phase, through selection of the ignition time (along the coast arc) and determination of the optimal thrust direction time history. The Keplerian ellipse preceding the last ignition is the one that follows the first velocity change of the LEO-to-GEO Hohmann transfer. This means that \(\tilde{p} = 24471{\text{ km}}\) and \(e = 0.723\). The initial conditions at ignition are written in terms of \(f_{0}\) (cf. Equation (19) case (B)), whose optimal value, found through IHM, is 179.9 deg. The final conditions are given by Eqs. (20), where \(R_{f} = 42164{\text{ km}}\). The minimum time needed for orbit injection is 105.9 s, and is obtained together with the optimal control time history, through the use of IHM.

The initial spacecraft mass \(m_{0}\) equals 2400 kg. Further characteristics are the maximal deflection angles \(\overline{\Delta }_{y}\) and \(\overline{\Delta }_{z}\) (both set to 3 deg), the maximal torque generated by the side jet system \(\overline{M}_{x}\) (set to 60 Nm), the time-varying distance \(l\), and inertia moments \(I_{x}\), \(I_{y}\), and \(I_{z}\):

$$ l = l_{0} + \dot{l}t \quad I_{x} = I_{x0} + \dot{I}_{x} t \quad I_{y} = I_{y0} + \dot{I}_{y} t \quad I_{z} = I_{z0} + \dot{I}_{z} t, $$
(53)

where \(l_{0} = 0.25{\text{ m}}\), \(\dot{l} = 2.4 \cdot 10^{ - 3} {{\text{m}} \mathord{\left/ {\vphantom {{\text{m}} {\sec }}} \right. \kern-\nulldelimiterspace} {\sec }}\), \(I_{x0} = 1200{\text{ kg m}}^{2}\), \(\dot{I}_{x} = - 4.36{\text{ kg }}{{{\text{m}}^{2} } \mathord{\left/ {\vphantom {{{\text{m}}^{2} } {\sec }}} \right. \kern-\nulldelimiterspace} {\sec }}\), \(I_{y0} = I_{z0} = 800{\text{ kg m}}^{2}\), and \(\dot{I}_{y} = \dot{I}_{z} = - 2.91{\text{ kg }}{{{\text{m}}^{2} } \mathord{\left/ {\vphantom {{{\text{m}}^{2} } {\sec }}} \right. \kern-\nulldelimiterspace} {\sec }}\). The values \(\tau_{x} = \tau_{y} = \tau_{z} = 0.1{\text{ sec}}\) are assumed for the time constants of the actuators. These data are also listed in Tables 1 and 2.

Table 1 LEO-to-GEO transfer: data related to the mass distribution
Table 2 LEO-to-GEO transfer: data related to the actuation devices

Moreover, the following values are selected for VTD-NOG & CPD. The sampling interval \(\Delta t_{S}\) is set to 2 s, and the CPD gains are determined as follows. First, note that the constant thrust equals \(T = n_{0} m_{0}\), the minimum value for \(l\) is \(l_{0}\), whereas the maximum values for \(I_{x}\), \(I_{y}\), and \(I_{z}\) are, respectively, \(I_{x0}\), \(I_{y0}\), and \(I_{z0}\). Thus

$$ \underline{{G_{x} }} =\, {1 \mathord{\left/ {\vphantom {1 {I_{x0} }}} \right. \kern-\nulldelimiterspace} {I_{x0} }} = 8.33 \cdot 10^{ - 4} {\text{ kg}}^{ - 1} {\text{m}}^{ - 2} {\text{ and }}\underline{{G_{y} }} =\, \underline{{G_{z} }} = {{Tl_{0} } \mathord{\left/ {\vphantom {{Tl_{0} } {I_{y0} }}} \right. \kern-\nulldelimiterspace} {I_{y0} }} = 0.83{\text{ sec}}^{ - 2} . $$
(54)

By inspection of the time behaviors of \(\Phi_{c}\), \(\Theta_{c}\), and \(\Psi_{c}\) in nominal conditions, it seems appropriate picking \(\underline{{\omega_{nx} }} = \underline{{\omega_{ny} }} = \underline{{\omega_{nz} }} = 4.24{\text{ rad sec}}^{ - 1}\), so to obtain an attitude control loop fast enough with respect to the speed of variation of nominal \(\Theta_{c}\), \(\Psi_{c}\), and \(\Phi_{c}\), which is identically set to 0. Moreover, proceeding by trial and error \(\underline{{\zeta_{x} }}\), \(\underline{{\zeta_{y} }}\), and \(\underline{{\zeta_{z} }}\) are set to 0.707. Thus, through the preceding equations, one obtains \(k_{px} = 21.6 \cdot 10^{3}\), \(k_{dx} = 7.2 \cdot 10^{3}\), \(k_{py} = k_{pz} = 21.6\), \(k_{dy} = k_{dz} = 7.20\). In addition, the value 30 Nm is selected for \(\overline{M}_{xc}\), whereas the value 0.65 deg is selected for \(\overline{\Delta }_{yc}\) and \(\overline{\Delta }_{zc}\), so that the inequalities \(\left| {\dot{M}_{x} } \right| \le 600 \, {{{\text{Nm}}} \mathord{\left/ {\vphantom {{{\text{Nm}}} {\sec }}} \right. \kern-\nulldelimiterspace} {\sec }}\), \(\left| {\dot{\Delta }_{y} } \right| \le 13 \, {{{\text{deg}}} \mathord{\left/ {\vphantom {{{\text{deg}}} {\sec }}} \right. \kern-\nulldelimiterspace} {\sec }}\), and \(\left| {\dot{\Delta }_{z} } \right| \le 13 \, {{{\text{deg}}} \mathord{\left/ {\vphantom {{{\text{deg}}} {\sec }}} \right. \kern-\nulldelimiterspace} {\sec }}\) are guaranteed (cf. Eq. (47)). Note that Eq. (46) implies that \(\left| {\tilde{\Delta }_{y} } \right|\) is constrained to 0.65 deg. Thus, since \(\overline{\Delta }_{y} = 3{\text{ deg}}\), the same happens to the amplitude of \(\Delta_{y}\) (cf. Eq. (17)). The same argument applies to \(M_{x}\) and \(\Delta_{z}\), and the inequalities \(\left| {M_{x} } \right| \le 30{\text{ Nm}}\) and \(\left| {\Delta_{z} } \right| \le 0.65{\text{ deg}}\) hold as well.

The first reason for the existence of deviations from nominal flight conditions resides in the assumption that the thrust direction points toward the spacecraft longitudinal axis. This alignment condition was assumed for the derivation of the optimal ascent path. However, the actual spacecraft dynamics is driven by a thrust direction not exactly aligned with the longitudinal axis, due to the use of thrust vectoring for attitude control. This circumstance is apparent also by inspection of Fig. 2, which illustrates clearly that the corrected control u does not coincide with the actual control \({\mathbf{u}}_{a}\), which affects the real dynamics of the center of mass. As a first step, VTD-NOG & CPD has been tested to evaluate these deviations, exclusively related to the alignment assumption. Table 6 reports the related results (obtained in a single simulation), i.e., the final displacements from the nominal final altitude, declination, and velocity components, and testifies to the excellent accuracy of VTD-NOG & CPD in this context.

However, perturbations can exist that affect the overall spacecraft dynamics. Monte Carlo (MC) campaigns are usually run, with the intent of obtaining some useful statistical information on the accuracy of the guidance and control algorithm of interest, in the presence of the existing perturbations, which are simulated stochastically.

More specifically, for the initial conditions an error on the initial radius and on the initial declination are assumed, with Gaussian distribution, zero mean value and standard deviation \(r_{0}^{\left( \sigma \right)} = 5{\text{ km}}\) (for \(r_{0}^{{}}\)) and \(\phi_{0}^{\left( \sigma \right)} = 6.8 \cdot 10^{ - 3} {\text{ deg}}\) (for \(\phi_{0}^{{}}\)) corresponding to 5 km in direction normal to the plane of the nominal trajectory. Errors on the initial velocity with Gaussian distribution, zero mean and standard deviation of 30 m/s are introduced as well. These errors are consistent with some values found in the scientific literature [13, 14, 20]. Moreover, errors on the initial attitude angles and rates are introduced. All these displacements have Gaussian distribution and zero mean. Their standard deviation equals 10 deg for the initial attitude angles and 10 deg/sec for the initial attitude rates.

Moreover, propulsive perturbations are included in simulations. In fact, usually the thrust magnitude (and the related acceleration, as a result) exhibits small fluctuations. This time-varying behavior is modeled through a trigonometric series with random coefficients:

$$ n_{0}^{\left( p \right)} = n_{0} \left[ {1 + \sum\limits_{k = 1}^{5} {\tilde{a}_{k} \sin \left( {\frac{2k\pi t}{{t_{f}^{*} }}} \right)} + \sum\limits_{k = 1}^{5} {\tilde{a}_{k + 5} \cos \left( {\frac{2k\pi t}{{t_{f}^{*} }}} \right)} } \right], $$
(55)

where \(n_{0}^{\left( p \right)}\) denotes the perturbed value of \(n_{0}\), whereas the coefficients \(\left\{ {\tilde{a}_{k} } \right\}_{k = 1, \ldots ,10}\) have a random Gaussian distribution centered around the zero and a standard deviation equal to 0.02.

Furthermore, actuation errors may affect the spacecraft performance. They are modeled through Gaussian noise terms, with zero mean. A term with standard deviation 0.06 Nm is added to the roll control torque \(\tilde{M}_{x}\). Terms with standard deviation of 0.05 deg are added to the thrust angles \(\tilde{\Delta }_{y}\) and \(\tilde{\Delta }_{z}\) in Eq. (16). All the variables subject to uncertainties are reported in Tables 3, 4, 5, 6.

Table 3 LEO-to-GEO transfer: standard deviations on the initial position and velocity variables
Table 4 LEO-to-GEO transfer: standard deviations on the initial attitude and angular rates
Table 5 LEO-to-GEO transfer: standard deviations on the actuation errors
Table 6 LEO-to-GEO transfer: outputs using VTD-NOG & CPD (single run, with alignment errors only)

A single MC campaign is performed, including 100 numerical simulations, which assume all the previously described perturbations. Figures 3, 4 through 5 portray the time histories of the relevant trajectory variables, \(M_{x}\), the engine deflection angles, as well as the commanded and actual attitude angles. Moreover, two statistical quantities are evaluated, i.e., the mean value and the standard deviation for all of the outputs of interest. The symbols \(\mathop {\Delta \chi }\limits^{\_\_\_\_}\) and \(\chi^{\left( \sigma \right)}\) will denote the mean error (with respect to the nominal value) and standard deviation of \(\chi\) henceforth. Table 7 reports the statistics on the errors at injection and the time of flight. Inspection of this table reveals that VTD-NOG & CPD guarantees orbit injection with excellent accuracy. Furthermore, the average time of flight is very close to the nominal value, and the corresponding standard deviation is modest.

Fig. 3
figure 3

Injection at GEO: time histories of the state variables and the roll torque in the MC campaign

Fig. 4
figure 4

Injection at GEO: time histories of the thrust deflection angles in the MC campaign

Fig. 5
figure 5

Injection at GEO: time histories of commanded and actual attitude angles (single MC simulation)

Table 7 LEO-to-GEO transfer: outputs using VTD-NOG & CPD (Monte Carlo campaign: 100 runs, with alignment errors and all the other nonnominal flight conditions)

7 Upper Stage Orbit Injection

As a second application, the terminal ascent path of the upper stage of the Scout launch vehicle is considered. The actual time histories of the rocket thrust magnitude and mass are employed [21], and this implies that the thrust acceleration time history is specified as well.

The overall ascent trajectory that ends with circular orbit injection at 800 km of altitude is addressed in Ref. [22]. In this, research, only the minimum-time path of the upper stage is needed as the reference trajectory, and is found by means of IHM, starting from the following nominal initial conditions (cf. Equation (19), case (A)):

$$r_{i} = R_{E} + 799.984{\text{ km }}\quad v_{r,i}=0.096 {\text{ km/sec }}\quad v_{t,i}=5.291 {\text{ km/sec }} $$
(56)

where \(R_{E}\) is the Earth radius. The final conditions at orbit injection are given by Eqs. (20), where \(R_{f} = R_{E} + 800{\text{ km}}\). The minimum time needed for orbit injection is 25.8 s.

Further characteristics of the upper stage are the maximal deflection angles \(\overline{\Delta }_{y}\) and \(\overline{\Delta }_{z}\) (both set to 3 deg), the maximal torque generated by the side jet system \(\overline{M}_{x}\) (set to 200 Nm), the time-varying distance \(l\), and inertia moments \(I_{x}\), \(I_{y}\), and \(I_{z}\), whose time evolution is given by Eq. (53), with \(l_{0} = 0.47{\text{ m}}\), \(\dot{l} = 3.7 \cdot 10^{ - 3} {{\text{m}} \mathord{\left/ {\vphantom {{\text{m}} {\sec }}} \right. \kern-\nulldelimiterspace} {\sec }}\), \(I_{x0} = 9.65{\text{ kg m}}^{2}\), \(\dot{I}_{x} = - 0.33{\text{ kg }}{{{\text{m}}^{2} } \mathord{\left/ {\vphantom {{{\text{m}}^{2} } {\sec }}} \right. \kern-\nulldelimiterspace} {\sec }}\), \(I_{y0} = I_{z0} = 30.64{\text{ kg m}}^{2}\), and \(\dot{I}_{y} = \dot{I}_{z} = - 0.97{\text{ kg }}{{{\text{m}}^{2} } \mathord{\left/ {\vphantom {{{\text{m}}^{2} } {\sec }}} \right. \kern-\nulldelimiterspace} {\sec }}\). The values \(\tau_{x} = \tau_{y} = \tau_{z} = 0.1{\text{ sec}}\) are assumed for the time constants of the actuators. These data are also listed in Tables 8 and 9.

Table 8 Upper stage injection: data related to the mass distribution
Table 9 Upper stage injection: data related to the actuation devices

Moreover, the following values are selected for VTD-NOG & CPD. The sampling interval \(\Delta t_{S}\) is set to 0.2 s, and the CPD gains are determined using the same steps adopted in the preceding section. Because \(T_{min} = 23.7{\text{ N}}\) is the minimum thrust [20], the lower bounds are

$$ \underline{{G_{x} }} = {1 \mathord{\left/ {\vphantom {1 {I_{x0} }}} \right. \kern-\nulldelimiterspace} {I_{x0} }} = 0.10{\text{ kg}}^{ - 1} {\text{m}}^{ - 2} {\text{ and }}\underline{{G_{y} }} = \underline{{G_{z} }} = {{T_{min} l_{0} } \mathord{\left/ {\vphantom {{T_{min} l_{0} } {I_{y0} }}} \right. \kern-\nulldelimiterspace} {I_{y0} }} = 361.05{\text{ sec}}^{ - 2} . $$
(57)

By inspection of the time behaviors of \(\Phi_{c}\), \(\Theta_{c}\), and \(\Psi_{c}\) in nominal conditions, it seems appropriate picking \(\underline{{\omega_{nx} }} = \underline{{\omega_{ny} }} = \underline{{\omega_{nz} }} = 4.24{\text{ rad sec}}^{ - 1}\), so to obtain an attitude control loop fast enough with respect to the speed of variation of nominal \(\Theta_{c}\), \(\Psi_{c}\), and \(\Phi_{c}\), which is identically set to 0. Moreover, proceeding by trial and error \(\underline{{\zeta_{x} }}\), \(\underline{{\zeta_{y} }}\), and \(\underline{{\zeta_{z} }}\) are set to 1. Thus, through the preceding equations, one obtains \(k_{px} = 173.76\), \(k_{dx} = 81.09\), \(k_{py} = k_{pz} = 0.050\), \(k_{dy} = k_{dz} = 0.023\). In addition, the value 1 Nm is selected for \(\overline{M}_{xc}\), whereas the value 0.65 deg is selected for \(\overline{\Delta }_{yc}\) and \(\overline{\Delta }_{zc}\), so that the inequalities \(\left| {\dot{M}_{x} } \right| \le 20 \, {{{\text{Nm}}} \mathord{\left/ {\vphantom {{{\text{Nm}}} {\sec }}} \right. \kern-\nulldelimiterspace} {\sec }}\), \(\left| {\dot{\Delta }_{y} } \right| \le 13 \, {{{\text{deg}}} \mathord{\left/ {\vphantom {{{\text{deg}}} {\sec }}} \right. \kern-\nulldelimiterspace} {\sec }}\), and \(\left| {\dot{\Delta }_{z} } \right| \le 13 \, {{{\text{deg}}} \mathord{\left/ {\vphantom {{{\text{deg}}} {\sec }}} \right. \kern-\nulldelimiterspace} {\sec }}\) are guaranteed (cf. Eq. (47)). Note that Eq. (46) implies that \(\left| {\tilde{\Delta }_{y} } \right|\) is constrained to 0.65 deg. Thus, since \(\overline{\Delta }_{y} = 3{\text{ deg}}\), the same happens to the amplitude of \(\Delta_{y}\) (cf. Eq. (17)). The same argument applies to \(M_{x}\) and \(\Delta_{z}\), and the inequalities \(\left| {M_{x} } \right| \le 1{\text{ Nm}}\) and \(\left| {\Delta_{z} } \right| \le 0.65{\text{ deg}}\) hold as well.

As a first step, VTD-NOG & CPD has been tested to evaluate the deviations exclusively related to the alignment assumption. The first row of Table 13 reports the final displacements (in a single simulation) from the nominal final altitude, declination, and velocity components, and testifies to the excellent accuracy of VTD-NOG & CPD in this context.

However, further perturbations have been considered. For the initial conditions an error on the initial radius and on the initial declination are assumed, with Gaussian distribution, zero mean value and standard deviation \(r_{0}^{\left( \sigma \right)} = 2{\text{ km}}\) (for \(r_{0}^{{}}\)) and \(\phi_{0}^{\left( \sigma \right)} = 0.018{\text{ deg}}\) (for \(\phi_{0}^{{}}\)) corresponding to 2 km in direction normal to the plane of the nominal trajectory. Errors on the initial velocity with Gaussian distribution, zero mean and standard deviation of 10 m/sec are introduced as well. Moreover, errors on the initial attitude angles and rates are introduced, as well as actuation errors. These are all modeled as in the previous section, except for the error on \(\tilde{M}_{x}\), whose standard deviation is set to 0.2 Nm. All the variables subject to uncertainties are reported in Tables 10, 11, 12.

Table 10 Upper stage injection: standard deviations on the initial position and velocity variables
Table 11 Upper stage injection: standard deviations on the initial attitude and angular rates
Table 12 Upper stage injection: standard deviations on the actuation errors
Table 13 Upper stage injection: outputs using VTD-NOG & CPD (single run, with alignment errors only)

A single MC campaign is performed, including 100 numerical simulations, which assume all the previously described perturbations. Figure 6 portrays the relevant state variables, i.e., altitude, declination, and the three velocity components, together with the roll torque \(M_{x}\). It is remarkable that both the radial and normal velocity components exhibit remarkable deviations from the respective nominal values. Nevertheless, the final convergence to the desired conditions is achieved to a great accuracy. Torque \(M_{x}\) reaches the maximal value only in the first part of the injection arc (Table 13). Figure 7 depicts the nozzle deflection angles, which assume modest values and never saturate, unlike what occurs for the preceding case, focused on orbit injection at GEO. Finally, Fig. 8 illustrates the time histories of the commanded and actual attitude angles, showing the correct tracking of the former by the latter ones. At the end of the MC campaign, two statistical quantities are evaluated, i.e., the mean value and the standard deviation for all of the outputs of interest. Table 14 reports the statistics on the errors at injection and the time of flight. Inspection of this table reveals that VTD-NOG & CPD guarantees orbit injection with excellent accuracy. Furthermore, the average time of flight is very close to the nominal value, and the corresponding standard deviation is modest.

Fig. 6
figure 6

Upper stage orbit injection: time histories of the state variables and the roll torque in the MC campaign

Fig. 7
figure 7

Upper stage orbit injection: time histories of the thrust deflection angles obtained in the MC campaign

Fig. 8
figure 8

Upper stage orbit injection: time histories of commanded and actual attitude angles (single MC simulation)

Table 14 Upper stage injection: outputs using VTD-NOG & CPD (Monte Carlo campaign: 100 runs, with alignment errors and all the other nonnominal flight conditions)

8 Conclusion

This work considers a new guidance and control architecture based on the combined use of (i) the variable-time-domain neighboring optimal guidance technique (VTD-NOG), and (ii) the constrained proportional-derivative (CPD) algorithm for attitude control, with the final aim of achieving precise orbit insertion, in the presence of nonnominal flight conditions. VTD-NOG relies on the second-order sufficient conditions for optimality, and finds the corrective control actions in the neighborhood of the reference trajectory. This must be an optimal path that satisfies the second-order sufficient conditions for optimality. A fundamental original feature of VTD-NOG is the use of a normalized time scale as the domain in which the nominal trajectory and the related vectors and matrices are defined. The attitude control system employs thrust vectoring and a side jet system. The CPD attitude control law is proportional-derivative-like, and guarantees local convergence of the actual attitude toward the desired attitude prescribed by VTD-NOG. Moreover, a proper saturation action is introduced, to avoid excessive rates for the thrust deflection and the roll torque. VTD-NOG & CPD is applied to two distinct orbit injection maneuvers: (a) Hohmann-like finite-thrust transfer from a low Earth orbit to a geostationary orbit and (b) orbit injection of the upper stage of a launch vehicle. Nonnominal flight conditions are modeled by assuming errors on the initial position, velocity, and attitude, as well as actuation deviations. Extensive Monte Carlo campaigns prove effectiveness and accuracy of the guidance and control methodology at hand, in the presence of realistic deviations from nominal flight conditions.