Adaptive Neural Network-Based Satellite Attitude Control by Using the Dynamic Inversion Technique and a VSCMG Pyramidal Cluster

The paper presents an adaptive system for the control of small satellites’ attitude by using a pyramidal cluster of four variable-speed control moment gyros as actuators. Starting from the dynamic model of the pyramidal cluster, an adaptive control law is designed by means of the dynamic inversion method and a feed-forward neural network-based nonlinear subsystem; the control law has a proportional-integrator component (for the control of the reduced-order linear subsystem) and an adaptive component (for the compensation of the approximation error associated with the function describing the dynamics of the nonlinear system). The software implementation and validation of the new control architecture are achieved by using the Matlab/Simulink environment.


Introduction
Small satellites (mass < 500 kg) are becoming popular due to their low cost of development and shorter realization time; as a result, there has been a lot of effort to push satellite technology to smaller sizes/mass which would enable the small satellites to accomplish different missions as larger satellites; therefore, the modern control architectures' design for small satellites is a continuing challenge.The two major components of a satellite's attitude control system (ACS) are the actuator and the control algorithm.
Various types of actuators include the reaction wheels, magnetic rods, torque coils, thrusters, and Control Moment Gyroscopes (CMGs).A CMG acts as a torque amplifier, being suitable for three-axis slew maneuvering by providing the necessary torques via gambling a spinning flywheel [1].Their main components are the flywheel (the spinning rotor) and the gimbal (the pivot about which the flywheel assembly is rotated); the produced torque's magnitude is directly proportional to the inertia of the flywheel, the angular speed of the flywheel, and the rate of gimbal's rotation.The three main advantages of CMGs are the large torque amplification, the momentum storage capacity, and the light weight; these advantages make the control moment gyros better for agility maneuvers than the other widely used actuators, the reaction and the momentum wheels.Depending on the gimbal axes, a CMG can be distinguished to a Single Gimbal CMG (SGCMG), Variable-Speed CMG (VSCMG), and Double Gimbal CMG (DGCMG).SGCMG is a CMG with a constant speed momentum wheel, gimbaled in one axis only; from the torque point of view, the most powerful CMGs are the VSCMGs since these can generate significant control couples (up to 3000 Nm); this kind of actuators can generate much greater torque with less energy when compared to ordinary reaction wheels, normally used on small satellites.
A VSCMG is a hybrid actuator combining a reaction wheel with a SGCMG; in contrast to a classical CMG, the wheel speed of a VSCMG is allowed to vary continuously.A reaction wheel or a conventional SGCMG can only generate a torque along a single direction, while a VSCMG can generate a torque that lies anywhere on a plane perpendicular to the gimbal axis [2,3].Thus, the second advantage of VSCMGs with respect to classical CMGs is an additional degree of freedom due to the available rotor torque; this is a useful for continuous CMG singularity avoidance and VSCMG cluster reorientation.DGCMGs offer two control axes compared 2 Complexity to SGCMGs but they are mechanically more complex and expensive and have not the same capability in one axis because the total torque output on one axis is dependent on two gimbal axes for the DGCMG while for the SGCMG it is only dependent on one [2].Thirdly, research has shown that the practical benefits of VSCMGs are readily available using conventional CMGs with alterations to CMG cluster steering and CMG rotor motor control laws.Another advantage of the VSCMGs is their possibility of storing the energy in the same time with the control of the satellite's attitude.Moreover, the extra degree of freedom of a VSCMG can be used for additional purposes, for instance, for combined attitude and power tracking control and/or singularity avoidance.
A minimum of three VSCMGs is needed to practically demonstrate the 3-axis control for a small satellite (S), but, in many cases, a performing ACS utilizes four of these actuators (positioned in the form of a pyramidal cluster [2,3]) to avoid performance inefficiencies known as internal singularities (no torque can be produced for certain sets of gimbal angles) [1]; if a pyramidal cluster of four CMGs is not used, to solve the problem of internal singularities, some avoidance techniques (null motion, singular value decomposition, differential geometry, topology, etc.) have been developed [2,4,5].
In most works, only one pyramidal configuration [6] is used, each pyramid face being inclined at an angle of =54.73deg from the horizontal; a first innovative element of this paper is related to the fact that the pyramidal cluster presented in the next section has been never used to small satellites' attitude control.For the pyramidal cluster used here, the following will be achieved: (1) the determination of the rotations for the CMGs' gyroscopic frames, directions of the kinetic moments, angular rates, and gyroscopic torques (vector diagram); (2) the determination of the projection for CMGs' gyroscopic torques on the axes of the satellite tied frame, as well as the obtaining of the expressions for the equivalent kinetic moment and resultant gyroscopic torque of the cluster; (3) the determination of the expression of cluster's cosine matrix for the angles made by the CMGs' spin axes, transversal axes, and gyroscopic frames' axes with the minisatellite tied frame's axes.
The tasks of an ACS are to make the spacecraft (satellite) achieve fine pointing, rapid maneuvering, accurate tracking, and other desired performances.The control problem of small satellites' attitude in the presence of uncertainties has been investigated in many research papers [7][8][9][10][11][12][13][14].One possible solution to the problem of attitude control with limited communication is to utilize signal quantization with recently proposed quantizer [7].Using this idea, a new control architecture for spacecraft attitude stabilization with control torque was quantized by a logarithmic quantizer, and a guideline to choose the quantizer parameters has been proposed in [15].In [8], an output feedback structured model reference adaptive controller is developed for spacecraft rendezvous and docking problems, but no frictional effects were assumed to be present in the actuator model.The aim of the paper [9] was the design of an attitude tracking controller for CMGactuated satellites, which is shown to achieve accurate attitude tracking in the presence of unmodeled external disturbance torques, parametric uncertainty, and nonlinear CMG disturbances.To handle the disturbances and the nonlinearities that do not obey the linear-in-the-parameters assumption, fuzzy control or neural network-based control methods have been used [16,17]; in [16], an approximation-based adaptive fuzzy control architecture is designed for the compensation of nonlinear strict-feedback systems' unmodeled dynamics; here, the fuzzy logic technique is employed to approximate the unknown nonlinearities, while the compensation of the timedelays is achieved via a Lyapunov-Krasovskii functional.A steering law is designed in [6] to perform the multifunction of satellites' attitude control and energy storage at the same time, the singularity avoidance being achieved by using the method of the inner product.Reference [18] proposes an effective method to determine the desired spacecraft attitude command through the proper choice of the reference frame for the small satellites, while the papers [11][12][13] are concentrated on the attitude tracking problem in the Earth staring work mode by means of iterative learning control [11], adaptive fault tolerant control [12], and robust adaptive control with unknown actuator nonlinearity [13].A modelerror control synthesis approach was used in [19] to cancel the effects of modeling errors and external disturbances on the system, but the designed control law requires a model-error term to cancel the effects of a time delay.An adaptive control law is designed in [20], but the controller assumes no dynamic uncertainty in the control torque.Thus, it can be concluded that the development of robust attitude controllers, using different pyramidal clusters of VSCMGs, is still an open issue.Bearing in mind this, and, taking into account the fact that, till now, there is no report on the design of an adaptive ACS using a pyramidal cluster of variable-speed control moment gyros, a feed-forward neural network (NN), a reference model, a linear dynamic compensator, and the dynamic inversion approach, another key goal and innovative element of this paper is the design of such an adaptive ACS, with good tracking performances and robust stability with respect to disturbances.The adaptive control law of the new ACS will consist of four components: (1) a signal provided by the reference model; (2) a signal provided by the linear dynamic compensator (useful for stabilization); (3) an adaptive command (modeled by a feed-forward neural network) which should compensate the inversion error (approximation error of the dynamic model's nonlinear functions); (4) a signal depending on the NN's weights, on the Frobenius norm of the neural network's ideal matrix, and on the observer's estimation error.
Concluding, the two main goals of our work are as follows: (i) the use for satellites' stabilization/control of a new pyramidal configuration of four VSCMGs, configuration that has been never used till now in any satellite's ACS; (ii) the design of a neural network-based ACS using the dynamic inversion control technique.This work has the following innovative elements: (a) the usage for the first time of the pyramidal cluster from Figure 1(b); (b) for the chosen VSCMG cluster, the matrix expressing the dependence between the variation velocity of the cluster's resultant kinetic moment and the vector of the gyroscopic frames' angular rates, as well as the satellite's matrix of the inertia moments have been calculated; (c) the obtaining of the control law consisting of the vector of the gyroscopic frames' angular rates and the vector of gyros' angular accelerations, as well as the structure of the adaptive architecture which uses a pyramidal cluster of VSCMGs, a feed-forward neural network, a reference model, a dynamic compensator, and the dynamic inversion approach.
The rest of the paper is organized as follows: the dynamic model of a VSCMG-based pyramidal cluster is presented in Section 2; in Section 3 the dynamics of the ensemble satellitepyramidal cluster is deduced, having as input the command vector of the gyroscopic frames' angular rates and as output, the attitude of S described by means of the quaternion vector and Euler angles.In the next section, the adaptive control law of the new ACS consisting of a proportional-integrator signal and an adaptive component for the compensation of the nonlinear functions' inversion error is obtained.The software validation of the new ACS is achieved in Section 5 for the case of a small satellite; finally, some conclusions are shared in Section 6.

Model of the Pyramidal Cluster with Variable-Speed Control Moment Gyros
As one already stated above, only one type of pyramidal configuration [6,21] (Figure 1(a)) has been used for the design of ACSs; for this configuration, the gyros' rotation axes (the kinetic moments  →   ,  = 1, 4) are initially oriented parallel to the sides of the pyramid's base; the axes of the gyroscopic gimbals (the gimbals' angular rates  → γ  ,  = 1, 4) are perpendicular to the planes of the pyramid's side faces, while the VSCMGs' transversal axes are perpendicular to the axes of gyros and gimbals.
In this paper, the pyramidal cluster from Figure 1(b) is used for the control of satellite's attitude.        is the satellite tied frame (trihedral) while the initial trihedrals tied to the gyroscopic frames are         ,  = 1, 4. The gyros' rotation axes (the kinetic moments  →   ,  = 1, 4) are initially oriented parallel to the sides of the pyramid base (three of them,  = 1, 3), while  →  4 ⊥   (  →  4 ‖  ); the axes of the gyroscopic frames (the angular rates associated with the frames' rotations  → γ  ,  = 1, 4) are situated in the side faces of the pyramid, while the transversal axes of the frames ( 1  1 ,  2  2 ,  3  3 ,  4  4 ) are perpendicular to the side faces of the pyramid.
In Figure 2, the rotations of the gyroscopic frames, the angular variables   and γ  , the kinetic moments   and their orientations with consequence of the gyroscopic frames' rotation with the angle   , and the generated gyroscopic couples (  ) are presented.For the beginning, let us consider that the pyramid base is fixed (  →  = 0) and, by rotation of the gyroscopic frames with the angular rates  → γ  ,  = 1, 4, the gyros react by the gyroscopic torques (couples) [21,22]: Indeed, because   →   / = 0, one gets (equation describing one of the most important gyroscopic phenomenon, i.e., the gyroscopic torque).
According to Figure 2 and (1), the following four gyroscopic moments are obtained:

󳨀 → 𝑀
For the first VSCMG, the component  →  1 1 acts upon the gyroscopic frame without rotating it and, thus, it acts on the base (satellite), while the component  →  1 1 acts upon the gyro-frame ensemble and, thus, on the base.For the second VSCMG, the component  →  2 2 acts on the gyroscopic frame, while  →  2 2 acts on the gyro-frame ensemble and, thus, both Figure 1: Two pyramidal configurations with four variable-speed control moment gyros.
We denote with   and   the resultant kinetic and gyroscopic moments, respectively; these are expressed as vectors having the components upon the three axes of the satellite tied frame, i.e., and verify the equation where Replacing ( 7)-( 10) in ( 13), (12) becomes with [21,23] γ = [ γ and with   Ω being the module of each gyro's kinetic moment   ,   being the inertia moment of each gyro with respect to its own rotation axis, and Ω being the angular velocity of each of the four control moment gyros.Furthermore, taking into account the base's rotation with the angular velocity  → , the equation of the pyramidal cluster (containing 4 VSCMGs; with   and   of forms (11) and [2]: where  1 ,  2 ,  3 are the components of the satellite's angular rate upon its axes (axes of the frame         ).By means of the above notations and equations, the following can be expressed: (1) matrix   is the cosine rotation matrix of the angles formed by the spin axes (gyros' proper rotations axes: For any vector having the form T , let us consider the diagonal matrix: (23), one gets by time derivation of the matrices (24), we have

Dynamics of the Satellite by Using Pyramidal Clusters with N VSCMGs
The general form of the control law is where γ is the vector of the gyroscopic frames' angular rates, while Ω is the vector of gyros' angular accelerations.
To describe the dynamics of the satellite having a cluster consisting of  VSCMGs, the following vectors and matrices are defined: is the diagonal matrix of the inertia moments associated with the gyroscopic frames, ⌋ is the diagonal matrix of the inertia moments associated with the gyros' rotors,   * =   * +   * is the diagonal matrix of the inertia moments associated with the ensembles formed by gyroscopic frames and gyros' rotors; the sign " * " is , , or  and it signifies the axes in relation to which the moment of inertia is expressed ( is the axis of the gyroscopic frame,  is the axis of gyro's proper rotation, and  is the axis normal to the axes  and ); the (3 × ) matrix  * has on each column three elements representing the directional cosines of the angles formed by the axis * of the VSCMG no. and the axes of the satellite tied frame.It should be mentioned that matrices   and   depend on the vector ; i.e.,   =   (),   =   ().With these, the satellite's matrix of the inertia moments has the form [24]: , where the constant matrix   is the matrix of the inertia moments associated with satellite except the clusters;   =   +   ,   =   +   ,   =   +   .The resultant kinetic moment vector of the cluster consisting of  VSCMGs (  ) relative to the platform of the satellite is expressed with respect to kinetic moment vectors of each VSCMG relative to the proper rotation axes of the gyroscopic rotors (  Ω) and to the axes of the gyroscopic frames (  γ ) by means of the transformation matrices   and   ; i.e., Thus, the modification of the resultant kinetic moment vector of the cluster consisting of  VSCMGs is achieved by modifying the angular rates γ and Ω.
The absolute kinetic moment of the satellite () is the resultant of the kinetic moment of the satellite's platform () and the relative kinetic moment (  ) as follows: where T is the vector of the satellite's absolute angular rates with respect to its axes.The dynamics of the satellite a described by the equations, where  has form (26), K = /,  is the satellite's vector of external applied moments,   is the vector of command Complexity 7 moments, and   is the vector of disturbing moments.  is the gravity-gradient torque since any nonsymmetrical object of finite dimensions in orbit is affected by a gravitational torque because of the variation in the Earth's gravitational force over that object; this gravity-gradient torque is a result of the inverse square gravitational force field [25]; there would be no gravitational torque in a uniform gravitational field.Moreover, the general expressions for the gravity-gradient torque on a satellite of arbitrary shape have been calculated for both spherical and nonspherical Earth models [25].By time derivation of ( 26) and taking into consideration that  depends on a small extent on , i.e., J = J () γ ≅ 0, we have K ≅  ω + K and ( 27) becomes the component   is expressed as a sum of the gyroscopic moments; i.e.,   = K +  ×   ; as a consequence,  ω = , by time derivation of ( 25), the next one is obtained: where  =     [Ω]  ,  =     ; one has taken into account that   ≅ ct.,   ≅ const.,     γ − neglijible, and With (29), by omitting   and   , the equation associated with the satellite's dynamics (28) gets the form  ω +  ×  +  γ +  Ω = 0 ⇐⇒  ω +  ×  =   , (30) with   =   being the command couple (moment) applied to the cluster T or and  are (3 × ) and (3 × 2) matrices, respectively.By means of the first equation in (31), the command vector of the cluster is obtained: with  + being the pseudo-inverse of the matrix , calculated with the formula [21-24] where E = [ ];   = 0.01 sin((/2) + Φ  ),  = 1, 3; In the absence of the external moments and the moment applied to the satellite by the cluster, the dynamics of the satellite are described by the equation The satellite's attitude (the Euler attitude angles -, , and ) may be defined by means of two quaternion vectors ( = [ 1  2  3 ] T and q = [ 1  2  3  4 ] T ); the significance of the three attitude angles is as follows:  is the rotation angle of S around the axis normal to the orbit's plane;  is the rotation angle of S around the axis normal to the plane formed by 2 axes, the one normal to the orbit's plane and the one oriented towards the Earth's centre;  is the rotation angle of S around the axis oriented towards the Earth's centre.The differential equations of the quaternion vectors are [21,26] where T is the vector containing the threedirectional cosines of the angles formed by the Euler axis (the axis around which the satellite rotates) and the inertial frame; The correlation formulas between the components of the quaternion vector q and the satellite's attitude angles are [21,27] The dynamics of S and the model of the cluster are two subsystems of the automatic control system from Figure 4; for the pyramidal cluster presented in Figure 1(b), the number of VSCMGs is =4.To limit the angular rates vector γ and the angular accelerations vector Ω, the components of the command (calculated) vector   are limited by means of nonlinear elements with saturation zone.To avoid the fast variations of the gyroscopic frames' angular rates, the command signals applied to the engines that act the gyroscopic frames using mechanical reducers are applied firstly to some lowpass filters (filtering networks) having the transfer matrix: with  0 being the undamped natural frequency,  0 the damping ratio, and  4 the (4x4) identity matrix.

Adaptive Control of Satellite's Attitude by Using the Dynamic Inversion Method and Neural Networks
The dynamics of ensemble satellite-pyramidal cluster (the system (30)) can be described by the general equation: The simplified block diagram of the new ACS.
with  being the state vector (particularized in this work as the quaternion vector ),   = [ γ Ω] T the input vector,  and ℎ nonlinear unknown functions or linear functions obtained through linearization, and  =  = ( −   ) the output vector.The dynamics of the system (39) satisfy the hypothesis from [27]  () = ℎ  (,   ) , i.e., all the derivatives  () , 0 ≤  < , do not depend on   , while  () = ℎ  depend on   ;  ≤  represents the relative degree of system (39) with respect to the output .
In this paper, to control the attitude of S, one designs a pseudo-control law v = M (with the significance of a moment applied to the pyramidal cluster) which express the best approximation of the function ℎ  ; M represents the best approximation of the couple (moment)   .The control architecture to be obtained includes a neural network   which models a function depending on the pseudo-control law v and the output  at different time moments such that () tracks the bounded and desired signal   (); this pseudocontrol law should also be time derivable  times; therefore, where ĥ (û  , ) represents the best approximation of the function ℎ  (  , ) = ℎ  (  , ()) = ℎ  (  , ).As a consequence, If ĥ = ℎ  , according to (40) and (42), otherwise, where  = (  , ) = ℎ  (  , ) − ĥ (û  , ) is the approximation error (inversion error) of the function ℎ  which acts as a disturbance.Now, using the Taylor series expansion of the function   = ℎ −1  (, ), we have Thus, By identification of (30), where   becomes M , with (44), we have the relative degree =1 and the inverse function û = ĥ−1  ( M , ) = − + M , replaced in (46), leads to the equation, the disturbances   and   have been included in (47), but omitted in calculations.
In Figure 3 the simplified block diagram of the adaptive system for the control of the satellite's attitude is presented, while, in Figure 4, the complete form of the control system Complexity 9 (based on the usage of the dynamic inversion method, neural networks, and using a pyramidal cluster with VSCMGs) is given.In Figures 3 and 4, the signal   is an adaptive component (output of the neural network) for the compensation of the approximation error  associated with the function ℎ  (  , ) which describes the nonlinear subsystem of the dynamics associated with the ensemble satellite-pyramidal cluster (actuators) in series with the linear system having the relative degree  with respect to the output of the system.Also,   is the output vector of the linear dynamic compensator (for the stabilization of the linear dynamics) and   the component provided by the reference model, while  is a robustness signal.
Because =1, the reference model of the adaptive control system has been chosen as first-order type with the transfer matrix   (s) = (  /(s +   )) 3×3 .In steady regime, the adaptive control system (Figure 4) should assure the convergence  →   (  is the desired value of the output vector , being also provided by a reference model) and the convergence ẏ → ẏ  when   =  and  = v (the approximation error is compensated by the adaptive component); also, the presence of the ideal compensator leads to the conclusion that   = 0 in steady regime.Furthermore, if the robustness signal  tends to zero, according to (47), Thus, the role of the component   is to assure the convergence ẏ → ẏ  .
Taking into account the approximation error , on the direct way of the loop having unitary negative feedback after , ĥ−1  compensates ℎ  and, as a consequence, the transfer matrix of the direct way is   (s) = (  +   /s)(1/s), with   and   being (3 × 3) diagonal matrices.According to Figure 3, the convergence error ỹ and its derivative ẏ are expressed as ỹ =   − ; (50) where  is a robustness signal.

Denoting with 𝑒
T , the error state vector of the system with the input [  − ( + )], the state equations are or with the matrices  = [ The characteristic equation associated with the matrix  is  2 +    +   = 0, with  being the vector of eigenvalues;   and   are chosen, for example, as ), with   ∈ (0, 1),  = 1, 3. The state vector  is estimated by a linear state observer which provides the signal ê; the observer uses the error of the system The equation of the observer is ė = ê + (ỹ − ỹ ), ỹ = ê or where  =  − ; the gain matrix  will be calculated such that the matrix  is asymptotically stable.The feed-forward neural networks are the quintessential deep learning models, their main purpose being to approximate some function.There are no feedback connections in which the outputs of the model are fed back into itself.The leftmost layer in this network is called the input layer, and the neurons within the layer are called input neurons; the rightmost or output layer contains the output neurons.The middle layer is called a hidden layer, since the neurons in this layer are neither inputs nor outputs.A feed-forward network with a linear output layer and at least one hidden layer with any activation function (such as the sigmoid activation function) can approximate any measurable function from one finite-dimensional space to another with any desired nonzero amount of error, provided that the network is given enough hidden units.
The training of the neural network   is achieved by the state vector  = ê  with (r × r) being solution of the Lyapunov equation: T  +  = −, (r × r) is a positive defined matrix.The adaptive control law has the form [28]   =  T  ( T ) where  and  are the weights of a   neural network, their dimensions being ( 2 + 1) ×  3 and ( 1 + 1) ×  2 , respectively; the elements of  are the weights of the links between the  2 neurons of the hidden layer and the  3 neurons of the output layer;  has as elements the weights of the links between the  1 neurons of the input layer and the  2 neurons of the hidden layer.  is chosen as feed-forward neural network having three layers: an input layer, a hidden layer, and an output one.The vector  is the input vector of the neural network, its equation being [29]  = [1 vT with d being the sample time; () = ( T ) is a sigmoid function having the form: with   being the activation potentials whose values are different for each neuron.The matrices  and  are the solutions of the differential equations' system [30] with   = d/d| = 0 and   ,   ,  being positive constants.
To calculate the robustness component of the control law, the following formula is used [31,32]: with   and   being positive gains,  = [  0 0  ], ‖‖ 2  = trace{ T } ≤ ; ‖‖  is the Frobenius norm of the matrix , while  is the ideal matrix of the neural network.The role of this robustness component is to limit the values of the neural network's matrices  and .Equation (59) has been deduced by Calise et al. [29,30,33] for applications involving adaptive control laws based on dynamic inversion technique and neural networks.
Regarding the stability of the inner loop (the system having the input   =   and the output  = ), the adaptive control law   and the robustness component  compensate the approximation error  (signal which can include parametric uncertainties and/or unmodeled external disturbances); the form of the adaptive control law resulted from the condition that the system is global asymptotically stable; i.e., V  < 0, where the chosen Lyapunov function has the form   =    + (, ).The system having the input [  − ( + )] and the state  is described by (53), with the function (, ) borrowed from [34] imposing that ḟ (, ) = 0; thus, (56) and V  = −   < 0 have been obtained.By composing the function ℎ  with ĥ−1  and by introducing the approximation error , the inner loop system (having the input [  − ( + )] and unitary negative feedback after  = ) become linear.Imposing negative roots for the afferent characteristic equation  2 +    +   = 0, one obtains the coefficients of the linear dynamic compensator; therefore, the synthesis (design) of the adaptive system for the control of satellite's attitude involves the calculation of the dynamic compensator's coefficients in conditions of stability.

Numerical Simulation Results
In this section, the satellite's attitude control system (Figure 4) using a cluster consisting of four VSCMGs (Figure 1(b)) is software implemented and validated in Matlab/Simulink environment, for the case of a small satellite.For the control system from Figure 4, the following matrices, vectors, or coefficients are considered: Figure 5: Matlab/Simulink model associated with the architecture from Figure 4.The new obtained ACS has been software implemented and validated in Matlab/Simulink environment through numerical simulation for two kinds of VSCMG clusters, the traditional cluster presented in Figure 1(a) and the pyramidal cluster from Figure 1(b) being interesting to see if the new configuration of VSCMG cluster provide better results for the same type of attitude control system; the Matlab/Simulink model associated with the architecture from Figure 4 is given in Figure 5.We choose a desired attitude of the satellite by means of   = [0.44 0.51 −0.48], the desired (imposed) value of the quaternion .By using ( 35) and (37) there are obtained the desired values of the satellite's attitude angles ( = 60.24deg, = 80.35deg,  = −29.6deg),as well as the desired values of the angular rates' components ( 1 =  2 =  3 = 0deg/).The matrix expressing the dependence between the variation velocity of the cluster's resultant kinetic moment and the vector of the gyroscopic frames' angular rates, as well as the satellite's matrix of the inertia moments have been borrowed from [21].In Figure 6(a) one presents the time histories of the satellite's attitude angles (, , ), the components of the angular rates ( 1 ,  2 ,  3 ), the components of the absolute kinetic moment of the satellite ( 1 ,  2 ,  3 ), and the components of the signal ; in Figure 6(b) the time histories associated with the components of the quaternion q( 1 ,  2 ,  3 ,  4 ), the components of the vector , and the components of the gyros' angular accelerations Ω are given, while in Figure 6(c) the time histories associated with the control signals   , ,   , v , and  are provided; the time characteristics associated with the cluster from Figure 1(a) are presented with solid line, while the time characteristics associated with the cluster from Figure 1(b) are plotted using dashed line.
The attitude of the satellite (described by the Euler angles , , and ) is controlled by means of the quaternion vectors T and q = [ 1  2  3  4 ] T ) and of the gyroscopic moment   (the output signal of the adaptive controller, Figures 3 and 4);   (the command couple applied to the pyramidal cluster) modifies the general control law   and, as a consequence, the vector of the gyroscopic frames' angular rates γ , as well as the vector of gyros' angular accelerations Ω.According to ( 25) and ( 29), the modification of the angular rate vectors γ and Ω is equivalent with the modification of the resultant kinetic moment vector (  ) of the cluster consisting of four VSCMGs; because the absolute kinetic moment of the satellite () depends on the relative kinetic moment (  ) and the kinetic moment of the satellite's platform () (26), taking into account the equation associated with the dynamics of the satellite (see (34)), one obtains a new value for the satellite's angular rate vector .The modification of the vector  leads to new expressions of the quaternion vectors ( and q) (35); the modification of the quaternions is equivalent to the change of the satellite's attitude (see (37)).According to Figure 6, the control of the satellite's attitude is achieved by modifying the angular rate vector () and the quaternion q; the closed-loop adaptive control system is characterized by good convergence, global asymptotically stability, and () → 0, this being equivalent to the cancel of the difference (deviation) between the desired vector of angular rates   (provided by the reference model) and its real value, i.e., with the convergence  →   .On the other hand, as it resulted from Figure 4 and was confirmed by the graphics from Figure 6, the cancel of the error   −  = (  − ) leads to the cancel of other vectors and variables: the vector of the gyroscopic frames' angular rates γ , the vector of gyros' angular accelerations Ω, the vectors ,   , ,   , v , and .Bearing in mind that the ACS from Figure 4 has been software implemented and validated for both clusters given in Figure 1 we can also make a brief comparison between the two simulation cases; thus, from Figure 6 one remarks that the ACS using the cluster from Figure 1(b) is characterized by better convergence to the imposed values of different variables (see the time histories of the attitude angles and of the quaternion's components) and by smaller overshoots.The design of ACSs for satellites is complicated because of external disturbances, parametric uncertainty, and nonlinearities, which can inevitably appear in the dynamics of satellites and actuators.To control the attitude of satellites in the presence of parametric uncertainties and unmodeled external disturbances, the adaptive control techniques are the best solutions.Since the external disturbances are assumed to be unknown, standard adaptive control techniques cannot be applied to compensate their effects.Therefore, another advantage of the NN-based control method used in this paper was the compensation of unknown or partially known nonlinearities from the dynamics of satellites and actuators, this bringing advantage over classical and fuzzy control techniques; one can conclude that the adaptive control method based on neural networks and the dynamic inversion technique has applicability to problems involving multivariate systems with cross-coupling between channels.The advantage of the method presented in this work is related to the introduction of an adaptive component in the control law for the compensation of the dynamic inversion error  (associated with the function ℎ  ), error that can be interpreted as an external disturbance of the system.
The obtained results can be compared with the ones from [35] where a Lyapunov function-based attitude controller has been designed, the overall stability of the attitude control being always guaranteed; however, the closed-loop control performance is not discussed in detail.In [21], a cascade PD attitude controller was developed for spacecraft eigenaxis rotation with consideration of angular velocity and control torque constraints, but the computation of the controller gains and the rigorous proof of the closed-loop system's stability are very difficult tasks.Other major difficulties of the ACSs using CMGs are related to the inherent geometric singularities where there is no available torque due to the coplanar state of the output torque of each CMG unit; it is not the case of our paper since four VSCMGs have been used in a pyramidal configuration.In [22] one presents an architecture for minisatellites' attitude control using a cluster consisting of four control moment gyros, in pyramidal configuration (the one given in Figure 1(a)), and feedback from the quaternion and angular velocity vectors; comparing the dynamic characteristics from Figure 6 and the ones obtained in [22] but without NNs and, thus, without adaptive components in the control laws, one remarks that the adaptive components of the control laws lead to smaller overshoot and transient regime periods.Thus, the adaptive control laws bring advantages in terms of the dynamic regimes' quality compared to traditional ones.The adaptive control laws provide great flexibility in real-time reconfiguring of the control architectures under uncertainty in modeling of the aerodynamic phenomena or in the event of faults.Another advantage of the architecture designed in the present paper is related to the usage of dynamic inversion; it relies on the philosophy of feedback linearization; the plant nonlinearities are canceled and the closed-loop plant behaves like a stable linear system.The method is characterized by simplicity in the control structure, ease of implementation, global exponential stability of the tracking error, etc.
The feed-forward neural network   used in this paper was designed to adapt online, without the requirement of an offline training phase.The main advantage of the online neural network's use in the control law is its adaptation  as opposed to offline training.The complexity of the feedforward neural network, as described in terms of the number of hidden-layer neurons, was selected based on the desire to achieve the best possible performance in the control task; the   ' s structure was not optimized to minimize its complexity in the proposed attitude control method; this issue will be formally addressed in future research.

Conclusions
The purpose of this study was to design a new adaptive architecture for satellites' attitude control using a cluster consisting of four variable-speed control moment gyros, the dynamic inversion technique, and a feed-forward neural network.Firstly, for the chosen pyramidal cluster, the matrix expressing the dependence between the variation velocity of the cluster's resultant kinetic moment and the vector of the gyroscopic frames' angular rates, as well as the satellite's matrix of the inertia moments has been calculated.Using these, there has been obtained the control law consisting of the vector of the gyroscopic frames' angular rates and the vector of gyros' angular accelerations under two forms ((32) and ( 48)) where the signal   =  (the vector of command moments) is the pseudo-control of the adaptive system for the control satellite's attitude (Figures 3 and 4) using the dynamic inversion technique, a proportional-integrator signal provided by a linear dynamic compensator, and an adaptive component modeled by a feed-forward neural network in order to compensate the approximation error of the nonlinear function ℎ  ; the used reference model is a first-order one, since the relative degree of the ACS from Figure 4 is one.The ACS from Figure 4, using a cluster consisting of four VSCMGs (Figure 1(b)), has been software implemented and validated in Matlab/Simulink environment, for the case of a small satellite; the closed-loop adaptive control system is characterized by good convergence and global asymptotically stability, this being equivalent with the cancel of the deviation between the desired vector of angular rates, provided by the reference model and its real value.Also, a brief comparison has been made between the ACS using the cluster from Figure 1(b) and the same adaptive architecture involving the pyramidal cluster (Figure 1(a)) used till now in all works dealing with the control of the satellite's attitude by means of a pyramidal cluster as actuators' system.

Figure 4 :
Figure 4: Block diagram of the ACS using the dynamics inversion, neural networks, and a cluster of four VSCMGs.

Figure 6 :
Figure 6: Time histories of the main variables associated with the satellite's ACS for two kinds of VSCMG pyramidal clusters.
4 on the axes of the satellite tied frame         are Figure 2: The rotations of the gyroscopic frames, angular variables, kinetic moments, and gyroscopic couples.componentsact on the base (satellite).
3   3 ,  4   4 ); (2) matrix   is the cosine rotation matrix of the angles formed by the transversal axes (normal to the proper rotation axes of the gyros and to the axes of the gyroscopic frames:  1   1 ,  2   2 ,  3   3 ,  4   4 ); (3) matrix   is the cosine rotation matrix of the angles formed by the axes of the gyroscopic frames ( 1  1 ,  2  2 ,  3  3 , − 4  4 ) with the satellite tied frame         ; these matrices are