Designing a Robust Nonlinear Dynamic Inversion Controller for Spacecraft Formation Flying

The robust nonlinear dynamic inversion (RNDI) control technique is proposed to keep the relative position of spacecrafts while formation flying. The proposed RNDI control method is based on nonlinear dynamic inversion (NDI). NDI is nonlinear control method that replaces the original dynamics into the user-selected desired dynamics. Because NDI removes nonlinearities in the model by inverting the original dynamics directly, it also eliminates the need of designing suitable controllers for each equilibrium point; that is, NDI works as self-scheduled controller. Removing the original model also provides advantages of ease to satisfy the specific requirements by simply handling desired dynamics. Therefore, NDI is simple and has many similarities to classical control. In real applications, however, it is difficult to achieve perfect cancellation of the original dynamics due to uncertainties that lead to performance degradation and even make the system unstable. This paper proposes robustness assurance method for NDI. The proposed RNDI is designed by combining NDI and sliding mode control (SMC). SMC is inherently robust using highspeed switching inputs. This paper verifies similarities of NDI and SMC, firstly. And then RNDI control method is proposed. The performance of the proposed method is evaluated by simulations applied to spacecraft formation flying problem.


Introduction
Spacecraft formation flying (SFF) problem is a cooperative control problem that distributes the task of a single spacecraft into a group of spacecrafts to improve the robustness of a space mission by decreasing the possibility of a single failure that can lead to total mission loss [1][2][3].For this reason, SFF has attracted considerable interest owing to its advantages of not only increased mission success probability but also increased feasibility, flexibility, and so forth.According to the distribution strategies, the control methods for SFF can be categorized into two ways: centralized and decentralized [1].In decentralized control, each spacecraft in a formation group can communicate with each other.In particular, by transmitting the condition of each vehicle, they can avoid the faultsensitive problem that can lead to serious problems, such as collision.The main drawbacks of decentralized formation control are the difficulties in analyzing the global SFF stability and the increase of system complexity significantly if formation member is big.In contrast, centralized formation flying such as the leader-follower approach is easy to implement because formation can be achieved by controlling the relative position or velocity.The objective of SFF problem in this paper is to evaluate the formation keeping performance using the proposed controller.Therefore, the leader-follower formation problem of two spacecrafts is considered.This paper considers the full nonlinear dynamics describing the relative position to design a suitable nonlinear controller for SFF.
In this paper, spacecraft formation flying using the robust nonlinear dynamic inversion (RNDI) control method is proposed.The proposed RNDI control method is based on well-known nonlinear dynamic inversion (NDI).NDI is a nonlinear control synthesis technique that steers the system states to track a user-designed desired trajectory [4][5][6].By inverting the original dynamics to remove the system nonlinearities directly, NDI does not require linearizing and designing gain-scheduled controllers for each equilibrium point.Therefore, NDI provides a solution for the difficulties in ensuring stabilities and performances between various operational points in gain-scheduled controllers.The  advantages of NDI control are that it is conceptually simple and has many similarities to classical control methods.In addition, it naturally handles nonlinear systems without gainscheduling because it works as a self-scheduled controller.For this reason, NDI has become a popular flight controller and been applied to various high-performance aircrafts such as X-38 [4,5], F-18 HARV [7,8], and F-16 [8,9].On the other hand, accurate knowledge of the nonlinear system dynamics is needed to obtain a perfect cancellation of the original dynamics.Actually, in real applications, such an assumption of taking all accurate information about system nonlinearities is rarely met due to uncertainties, such as model mismatches, disturbances, and measurement noises [4,[9][10][11][12][13].As these uncertainties lead to the closed-loop system control performance degradation and make the system unstable, robustness issues against uncertainties must be considered when designing NDI controller.
A variety of methods have been proposed to achieve robustness in NDI controller.Many studies have reported that the system controlled by NDI with a proportional-integral-(PI-) type of desired dynamics can improve the robustness [10,13,14].As shown in Figure 1(a), the PI controller is designed as the desired dynamics satisfying the specific requirements that the states track after removing the original dynamics by NDI.The PI controller takes advantages of simple design and similarities with classical control.However, the desired dynamics types are selected by considering the system requirements, so there are some systems where the PItype of desired dynamics is unsuitable.One of the most widely used methods for solving the robustness issue is to employ an additional linear controller, such as the structured singular value (-analysis) and  ∞ synthesis [4,5,8,9,11].
In these methods, NDI works as an inner-loop controller while an additional linear robust controller is employed as an outer-loop controller, as shown in Figure 1(b).Therefore, the linear controller attempts improve the robustness of the overall control system.These methods, however, are based on linearized system equations and lead to an increase of the order of the control system.For example, the controller order increases to 14 while designing the  ∞ controller for the X-38 [5].Recently, Yang et al. proposed a robust dynamic inversion (RDI) control method using sliding mode control (SMC) [15].SMC is a robust nonlinear control method that takes distinct values as control inputs to steer the system states into a userdesigned sliding surface and to maintain the states on it [16,17].By combining dynamic inversion (DI) and SMC, the RDI controller guarantees stability against uncertainties without using any additional outer-loop controller and, moreover, it takes the advantages of both controllers (Figure 2) [15].However, the proposed RDI is designed as a linear controller, so it cannot cover the advantages of self-scheduling of NDI controller.This paper extends the results of [15] for nonlinear systems and verifies the feasibility of the proposed RNDI controller with application to the SFF problem.

Mathematical Model of Spacecraft Formation Flying
This section presents the derivation of a nonlinear SFF model.Formation flying considered in this paper is assumed to be composed of two spacecrafts: leader and follower.The leader spacecraft provides the reference trajectory assumed to be a circular orbit with constant velocity  0 while the follower spacecraft navigates the neighborhood of the leader according to the desired reference trajectory.Figure 3 shows the coordinate reference frames used throughout this paper.Two main coordinate frames are the Earth centered inertia frame {E  , E  , E  } whose origin is located in the center of the Earth and the leader orbit frame {e  , e  , e ℎ } whose origin is attached to the center of mass of the leader spacecraft.The nonlinear dynamics of the leader and follower with respect to the {e  , e  , e ℎ } frame can be represented as follows [1,3]: where u  ∈ R 3 and u  ∈ R 3 are control input vectors of the leader and follower spacecrafts, respectively.And F  ∈ R 3  and F  ∈ R 3 are the disturbance force vectors acting on the leader and follower spacecrafts, respectively.It is assumed that the masses of spacecrafts are small relative to the mass of the Earth; that is,  ≫   ,   , so ( +   ) ≈  and ( +   ) ≈ .Because the relative position of the follower spacecraft p = r  − r  , the second derivative of the relative position can be represented as follows: where In this paper, it is assumed that the leader spacecraft is free flying; that is, u  = 0; then it satisfies that u  = u  .
If the relative position p in the leader orbit frame is given as p = e  + e  + e ℎ for the unit vectors e  , e  , and e ℎ along with the {E  , E  , E  }-frame, then the relative acceleration vector p can be obtained as follows: In the moving leader orbit frame, the position vector r  is constant; that is, r  =   e  .By substituting (4) into (3), the nonlinear dynamics of the follower spacecraft relative to the leader can be obtained as Denote the relative position and velocity vectors as p  = (, , ) and v  = (/, /, /) in the leader orbit frame, respectively.Then ( 5) can be represented as follows: where ,

The Proposed Robust Nonlinear Dynamic Inversion
In this section, the mathematical backgrounds of sliding mode control and nonlinear dynamic inversion are introduced.And then the robust nonlinear dynamic inversion method is proposed.

Sliding Mode Controller.
Sliding mode control (SMC), also called variable structure control (VSC), is a high-speed switching nonlinear control method that forces the system states into a user-designed sliding surface and maintains the states on the surface [17,18].SMC consists of two phases (Figure 4): structuring the sliding surface and constructing the switching feedback gains.Consider the following system: Sliding surface

Sliding phase
Reaching phase x(t 0 ) Figure 4: The behavior of the system states in sliding mode control.
where x() ∈ R  is a state vector, u() ∈ R  is an input vector with  ≥ , and f : R  → R  and g : R  → R × are smooth functions.Let a set Σ  be the regular ( − 1) dimensional submanifold in R  , defined in [16], such as where   : R  → R ( = 1, 2, . . ., ) is a smooth function.Define   (x) = 0 as the individual sliding surface or individual switching surface.Then surface constructed by intersecting  individual sliding surfaces is defined as the sliding surface [16]: where (x) = [ 1 (x),  2 (x), . . .,   (x)]  .If the states x() of the system are in Σ, that is, (x()) = 0, then the behavior of the states is called sliding motion or sliding mode.Moreover, if sliding mode exists, the tangent vectors of the states always are forced to track the sliding surface as shown in Figure 4.
Then each entry   () ( = 1, 2, . . ., ) of the sliding mode control law can be obtained by taking one of the following values [16]: where  +  ̸ =  −  .As shown in (11), designing the sliding surface is crucial because the sliding surface determines the control input and, moreover, the performance of the closed-loop system.For this reason, various designing methods such as Fillipov's method and equivalent control method have been proposed [18,19].In this paper, the equivalent control method is considered to analyze the similar characteristics between SMC and NDI.If the system states intercept the sliding surface at  =  0 and a sliding mode exists for  ≥  0 , then (/)(x()) = 0 and (x()) = 0 for all  ≥  0 .Then the equivalent input u eq that forces the state trajectory to stay on the sliding surface can be analyzed as follows [19]: Substituting ( 12) into (1), the system dynamics on the sliding surface for  ≥  0 is governed by The dynamics represented in ( 13) is defined as the ideal sliding dynamics [16].Consequently, the closed-loop system dynamics in sliding mode are specified by the sliding surface.
One of the widely used designing methods of the sliding mode controller combines switching inputs and the equivalent inputs, as represented in (12); that is, if the sliding surface is determined, then the sliding mode controller can be obtained by adding switching input ( sw, ) of which entry   () yields [18]   =  eq, +  sw, ( = 1, 2, . . ., ) , (14) where  eq, is the th entry of the equivalent input analyzed in (12).And  sw, is the switching input that forces the system states to move towards the sliding surface.In [18], the possible candidates for designing the switching input are introduced: for example, (i) relay with constant gains:  sw, (x) =   sgn(  (x)) with   < 0; (ii) relay with state dependent gains:  sw, (x) =   (x) sgn(  (x)) with   (⋅) < 0; (iii) univector nonlinearity with scale factor: u sw (x)=(x)/‖(x)‖ with  < 0.

Similar Characteristics between Sliding Mode Control and
Nonlinear Dynamic Inversion.Before analyzing the similar characteristics between SMC and NDI, the conventional NDI controller is firstly introduced.NDI controller consists of two blocks (Figure 5): desired dynamic block and dynamic inversion (DI) block [4][5][6].In the desired dynamic block, the control variables are defined and the rate commands of the selected control variables are generated.And in the DI block, proper control inputs are generated by inverting the plant dynamics in order to make the inner closedloop transfer function as an integrator [20].Hence, the system states controlled by the dynamic inversion block will follow the user-selected control variables.For this reason, the desired dynamics are usually designed to satisfy the specific performances/requirements so that the performance of the controlled system can achieve the system requirements.In [4], some forms of desired dynamics are introduced: proportional, proportional integral, flying quality, ride quality, and so forth.For the nonlinear system shown in (8), NDI control input u NDI () can be given by [4] where x des () represents the desired dynamics.
It is worth noting that the requirement for existing NDI control law in (15) is that [g(x)] −1 must exist.However, the matrix g(x) is not generally a full rank for nonflat systems.These systems have a larger number of states than the number of control inputs.Hence, the number of states that can be inverted is less than or equal to the number of inputs.One way of achieving [g(x)] −1 is to formulate the existence problem as a two-time scale problem.A twotime scale problem makes the system states separate into fast and slow dynamics.The fast dynamics comprise a group of states affected directly by the control inputs.On the other hand, the slow dynamics consists of states influenced by the fast dynamics.Separating the system states into two groups reduces the system order enough to provide a chance to exist more number of inputs than the number of the fast dynamic states.Consequently, [g(x)] −1 can be obtained [4][5][6].In contrast, for an overactuated system that adopts a larger number of inputs than the number of states, the inverse can be obtained by reducing the number of inputs to be equal to the number of states using control allocation [8,9].
By substituting ( 15) into ( 8), the inner-loop dynamics in Figure 5 controlled by conventional NDI yields Hence, NDI controller replaces the original dynamics into the user-selected desired dynamics by inverting the original dynamics.Consequently, the control system can guarantee the stability without gain-scheduling.However, it is impossible to achieve perfect cancellation of the original dynamics due to uncertainties such as model mismatches, disturbances, and measurement noises, which leads to poor robustness of NDI controller.Hence, robustness issues against uncertainties must be considered when designing NDI controller.
To achieve the robustness of NDI, the equivalent control method used to design sliding surface is considered.For desired trajectory Select a set of nonlinear smooth functions, (x * ) = [ 1 (x * ),  2 (x * ), . . .,   (x * )]  = 0, as a sliding surface.If the system states intercept the sliding surface at  =  0 and the sliding mode exists for  ≥  0 , then (/)(x()) = 0 and (x()) = 0 for all  ≥  0 .Then the equivalent input u eq that the state trajectory stays on the sliding surface can be analyzed as follows [13][14][15]: If  =  and /x * = I  , then ( 17) can be represented as a form of NDI input shown in ( 15) Hence, if the sliding surface is designed by an identity matrix, then the equivalent input of SMC can be represented as NDI input.
It is worth noting that the ideal sliding dynamics shown in (13) yields the desired dynamics as follows: In (19), the states on the identity sliding surface are governed by the desired dynamics.Moreover, the performances of the control system in sliding mode are determined only by the desired dynamics.This suggests that the difficulties in designing a sliding mode controller to satisfy the specific system performances are converted to the desired dynamics designing problem.

Design of the Robust Nonlinear Dynamic Inversion.
Similar to the design method of SMC, each entry   () ( = 1, 2, . . ., ) of the RNDI control law can be obtained by introducing the following values: where  +  ̸ =  −  satisfies the following: for   (x), the th entry of f(x) and for  , (x), the (, )-entry of g(x) where the superscripts + and − denote the right-and lefthand limit, respectively.The following theorem and corollary propose the method for designing the RNDI controller and provide the stability analytically.
Theorem 2. Consider the following input: where u  is the conventional NDI input and u  is the switching input that satisfies the following: for Then the closed-loop system controlled by ( 22) is globally stable.
NDI surface Since the system controlled by ( 22) is globally stable from Theorem 2, the states are forced to the NDI surface as shown in Figure 6.

Corollary 3. If the switching input denoted as u
for a positive   , then the control system is globally stable.
It is also remarkable that using the sgn function while designing the switching input leads to unfavorable results in control systems such as the chattering problem.The chattering problem makes the system have unmodeled high frequencies or actuator saturation.In sliding mode control theory, several methods have been proposed to overcome this problem by designing a continuous control input instead of a discontinuous switching input.This method forces the controlled system to follow the approximated sliding motion in some boundaries instead of the ideal sliding motion.Following the similar manner, the chattering problem in the RNDI control can be solved using the continuous control input.For example, replace sgn(x des − x) into sat(x des − x) = [sat 1 ( des,1 −  1 ), sat 2 ( des,2 −  2 ), . . ., sat  ( des, −   )]  in order to design a continuous switching input as follows: for a positive   , Then  sw, =   sat  (( des, −  )/  ).In (27), ± is the boundary layer in which the states are governed by the following dynamics: for sat(( By the hypothesis, ‖(, x(), u())‖ 2 <  min (K), the derivative of (x * ()) is always negative.Hence, the system controlled by the proposed RNDI controller is globally stable against disturbances, noises, and model mismatches.

Simulation Results
In this section, numerical simulations are conducted to evaluate the performance of the proposed robust nonlinear dynamic inversion controller.

Simulation Description.
The aim of SFF is to design the feasible control input u  () such that p  → p  as  → ∞ for a given reference relative position trajectory, p  ∈ R 3 , of the follower spacecraft with respect to the leader spacecraft.To evaluate the performance of the proposed RNDI controller, MATLAB Simulink is selected as a simulation tool.Figure 7 shows the block diagram of the overall SFF structure using MATLAB Simulink.In this paper, it is assumed that the reference trajectory is set to p  = [100 sin(4 0 ), 100 cos(4 0 ), 0]  ; that is, the follower spacecraft tracks a circular orbit centered at the leader spacecraft with a radius of 100 meters on a plane generated by e  and e  with an angular velocity 4 0 .The initial relative position and velocity are assumed to be, respectively, as follows:

Simulation Results
. Figure 8 describes the position tracking error results of the no disturbance case and disturbances injected case.The objective of this simulation is to verify the performance degradation of the disturbances injected spacecraft.In both cases, NDI with the proportional type of the desired dynamics is designed as a primary controller for SFF.As shown in Figure 8, if no disturbance is acting on the spacecraft, then the position errors between the referenced position and the follower position are zero in 30 sec.However, the lack of robustness in NDI controller leads a significant performance degradation of the disturbed spacecraft, so it tracks the references with a tracking error of almost 8 m, 1 m, and 4 m in e  , e  , and e ℎ axes, respectively.Figures 9 and 10 show the trajectories of the follower spacecraft controlled by NDI and RNDI controllers.As mentioned in Figure 8, the position errors between the referenced position and follower position controlled by NDI cannot be zero due to the induced uncertainties.However, by combining the switching input into conventional NDI controller, the RNDI control law attempts to reduce the effect of the uncertainties.Consequently, the state can track the reference signal within 1 m error as shown in Figure 9.The control inputs generated by NDI and RNDI controllers are described in Figure 10.To compensate the induced uncertainties, the spacecraft controlled by RNDI generates a large input force in e ℎ axis around 27 sec (Figure 10(b)).Figure 11 shows the trajectory of the spacecraft controlled by the RNDI controller.The spacecraft maneuvers around a circle with a 100-meter radius.Although the spacecraft is vibrated due to the induced uncertainties, the error distance between the reference trajectory and the position of the follower is less than 1 m, as shown in Figure 9. Hence, the follower spacecraft controlled by the proposed RNDI can track the reference trajectory.

Conclusion
In this paper, the robust nonlinear dynamic inversion control strategy that improves the robustness of NDI has been proposed.NDI is a nonlinear control technique that eliminates the need of linearizing and designing gain-scheduled controllers for each equilibrium point by canceling the original dynamics.Because NDI removes the system nonlinearities directly, it provides an opportunity to overcome the difficulties of ensuring stabilities and performances between various operational points while gain-scheduling.However, the main drawback of designing NDI controller is the weak robustness (iii) is easy to achieve the system required performance due to the similar concept to classical control methods; and (iv) is inherently robust.
However, the drawback of SMC such as the chattering problem still remains as a problem of RNDI control.It is expected that various chattering-free methods can be used to reduce the effect of chattering phenomenon, for example, replacing the sign function into the saturation function.
Moreover, the equivalence of NDI input and equivalent input designed by the identity sliding surface is also analyzed in this paper.The reduced order dynamics on the sliding surface can be converted to the user-selected desired dynamics.As a result, the difficulties in designing a sliding mode controller for satisfying the specific system performances are converted to a designing problem of the desired dynamics.Hence, RNDI provides an opportunity to solve the difficulties in selecting the sliding surface of SMC.The effectiveness of the proposed RNDI controller is confirmed by a set of simulations with application to the spacecraft formation flying.

2 Mathematical
Robust linear controller based method

Figure 1 :
Figure 1: Block diagrams that have been proposed to achieve robustness.

Figure 2 :Figure 3 :
Figure 2: Block diagram of the proposed robust nonlinear dynamic inversion.

Figure 6 :
Figure 6: State trajectory on the NDI surface.

Figure 8 :
Figure 8: Relative position errors of no disturbance case and disturbance injected case.The black thin line represents the trajectories of the spacecraft without considering any disturbances.The blue thick line shows the results of the trajectories of the disturbed spacecraft.

Figure 11 :
Figure 11: Trajectory of the follower spacecraft controlled by the proposed RNDI controller.

NomenclatureG:
Universal gravity constant M: Mass of the Earth   : Mass of the follower spacecraft   : Mass of the leader spacecraft r  : Distance from the center of the Earth to the center of the follower spacecraft r  : Distance from the center of the Earth to the center of the leader spacecraft x des : Desired dynamics.

Table 1
(N).And it is also assumed that maximally 20% of random velocity sensor noises in three axes create difficulties in allowing the follower spacecraft to obtain accurate velocity information.Moreover, maximally 20% and 40% of random position sensor noises in e  and e ℎ axes are also considered in this simulation.