1. Introduction
Control Moment Gyroscopes (CMGs) are widely used in spacecraft control for maneuvering and they have been successfully employed for a wide range of space missions [
1,
2,
3]. Since they are momentum-exchange actuators, the shape and the size of the momentum envelope depends on their configuration. The size of the envelope is proportional to the maximum available torque that can be generated in a certain direction. From all the possible configurations, the conceptual pyramid configuration is commonly studied in the literature due to the nearly 3-axis symmetric and spherical momentum envelope it produces [
4]. Despite the extreme torque magnification property and the rapid response, the singularity problem poses a barrier to make CMGs popular in attitude control [
5,
6]. In general, singular states are divided in two main categories. If a singular state can be escaped by null motion, it is classified as passable or hyperbolic [
7], otherwise, the singularity is referred as elliptic. In both cases, the manipulability index can be used as a performance measure to indicate the approach to singularity, as proposed in [
8]. An extensive study in singularities topology has been made in [
9,
10,
11]. Dealing with singular states is commonly classified in two different categories: the singularity avoidance and the singularity escape logics [
12]. The steering logics that avoid a singular state without creating torque error, usually being more precise, are included in the first category, whereas the steering logics that induce torque error to escape a singularity, commonly trying to minimize it, belong to the second one. Both approaches make use of some local information in the vicinity of the current gimbal configuration [
13,
14].
Path planing techniques that take into consideration the whole maneuver are usually focused on choosing the initial gimbal configuration that optimizes the performance of the system during the trajectory [
15,
16,
17]. A global steering path planing approach is discussed in [
18,
19], where an A* search algorithm is used to steer the gimbals of a CMG cluster in the null space. An enhanced global steering approach is also presented in [
20], which does not use a node visit histogram and offers the possibility for near-real time implementation. Such approaches are capable of dealing with singularities before encountering them, but a new optimization problem has to be solved for every maneuver commanded. A path-planning technique that blends the pseudo-spectral and direct-shooting methods upon gimbal saturation and singularity constraints is presented in [
21]. Another trajectory-planning approach to reduce the possibility of CMG saturation is described in [
22], while a global singularity-avoidance steering law that aims to minimize the time integral of the quadratic sum of the gimbal rates is presented in [
23]. Path planning techniques based on energy consumption have also been studied in [
24] for double gimbal CMGs.
The advances in computer science and Machine Learning (ML) are establishing a new era for a variety of science fields, even though models of artificial neural networks have been used since about the 1950s [
25]. The developed algorithms are employed in pattern recognition, object detection, and numerous aerospace-related applications [
26,
27,
28]. The availability of a great amount of information and data is encouraging the substitution of the heuristic approaches, which are widely used so far, by machine learning techniques. Combining data-sets with the computational efficiency of modern computers, it is possible to create a system able to learn and come into conclusions as well as humans do. However, in the field of CMGs no extended research has been conducted from the perspective of ML. An adaptive control approach using neural networks for spacecraft systems with uncertainty under external disturbances is proposed in [
29,
30], whilst an estimation of gimbal angles through a similar network is discussed in [
31]. Another adaptive neural network is designed in [
32] to add robustness with respect to model uncertainties for an under-actuated double gimbal CMG, while a similar network in combination with the dynamic inversion technique is presented in [
33] for a variable speed CMG cluster. The use of a recurrent neural network both for moments of inertia estimation and for attitude control without the knowledge of the satellite dynamics is studied in [
34]. In [
35], a neural network-based fault diagnosis scheme is proposed to address the problem of fault isolation and estimation for CMGs. A Q-learning controller for a 3-CMG cluster is described in [
36], which aims to provide attitude control about the yaw axis. A comparison among the Q-learning and a PID controller shows that the Q-learning controller is not only harder to be implemented but also presents a worse performance in terms of stabilization time and overshooting. Besides CMG-related control, an iterative learning control [
37] and a robust adaptive control with unknown actuator non-linearity [
38] have also been presented.
It is evident that no research has been done in relating the null space motion with the initial gimbal configuration and the desired maneuver through a data-set, even though the redundancy of the system offers such possibilities.
In this paper, a method of improving the performance of a spacecraft employed with CMGs by investigating an optimal path in the gimbals’ null space is presented. It takes into consideration the whole desired/commanded maneuver (global search), in contrast to the most conventional gradient methods that exploit some information only in the region near the low performance configurations. Two different ML techniques—Deep Neural Network (DNN) and Random Forest Classifier (RFC)—are implemented to deal with the global steering problem, without the need of creating and searching a new graph every time a new maneuver has to be executed. A data-set that relates the initial gimbal angles and the commanded quaternion with the desired null motion is developed, using a heuristic algorithm. The desired null motion is selected to maximize a singularity related Objective Function (OF) and the data-set is used to train the two ML systems. The OF is defined as the minimum value of the manipulability index across the maneuver. A part of the data-set, i.e the test data-set, is used to evaluate the ability of the ML systems to efficiently predict and generalize the results for unknown input data. The method proposed in this paper allows the null motion path to be derived offline before commanding the satellite to execute the maneuver, and as a result it can be used for inspection. Moreover, a comparison is held among the ML techniques and the Null Space Projection (NSP). The results indicate that for the same maneuver, the execution time required is significantly lower in the case of DNNs and RFC, compared to the NSP, and the minimum manipulability value is higher when RFC is used. The method proposed combines high scalability, as long as the dynamic model of the satellite can be calculated, with reduced complexity once the ML model has been trained.
The paper is structured as follows. In
Section 2 and
Section 3, the rigid spacecraft equations of motion and the control law used are described.
Section 4 and
Section 5 present the data derivation and simulation results of DNN and RFC compared to the NSP. Finally, the ML systems and the results are briefly summarized in the conclusion section.
2. Mathematical Modeling
The equation of motion of a rigid spacecraft is described by:
where
is the vector that represents the external torques applied to the spacecraft and
denotes the angular velocity of the spacecraft with respect to the body frame. The control torque,
, can be selected as [
39]:
where
is the angular momentum of the CMG cluster:
and
s,
c are the abbreviations for sin and cos, respectively. The parameter
denotes the skew angle of the 4-CMG cluster in pyramid configuration and it is chosen properly in order for the momentum envelope to be nearly tree-axis symmetric and spherical.
is the magnitude of the momentum of each flywheel which can be considered equal to one. In general, the momentum derived from the CMG cluster is a function of the gimbal angles
for a spacecraft employed with 4 CMGs. Assuming that the control torque is known, the relation between the total CMG momentum rate and the gimbal angles rates can be derived by the equation:
where
is the Jacobian matrix of the system and it is a function of the gimbal angles and the skew angle. For the 4-CMG cluster, the Jacobian matrix is calculated by:
and the gimbal angle rate vector
is given by:
Since the Jacobian matrix is not rectangular, several definitions have been discussed for the inverse of the Jacobian matrix
[
14].
The satellite’s kinematics equations of motion expressed in quaternion form are given by:
where ⊙ denotes the quaternion multiplication and
represents the attitude quaternion.
is the angular velocity
of the spacecraft given in quaternion form. For two quaternions
and
the quaternion multiplication is defined as:
For the implementation of the attitude control, the control torque
applied on the satellite’s body is a function of the vector part of the error quaternion
and
as described by the following equation:
The error quaternion between the current attitude quaternion and the commanded quaternion
is:
where
and
are the scalar and the vector part, respectively, and
expresses the conjugate quaternion of
. The normalization of the quaternions is required before evaluating the
. The “3-2-1” sequence is used to convert the quaternion error to the corresponding Euler angles error.
Since the simulation describes a discrete time system, it is required to integrate the quaternion rate
at the
ith iteration as given by Equation (
7) using the equation:
where
is the time-step between two consecutive iterations. The CMG gimbal angle rates become saturated when they exceed the specific threshold
, using the following formula:
It is preferred to saturate the gimbal angle rates using Equation (
12) than applying a boundary value to every gimbal angle rate that exceeds the required threshold since the characteristics of the motion are conserved. The Moore–Penrose steering law is used, given by:
The null motion term is added in Equation (
6) and is composed of the term
and the null gimbal rates
as
where
and
represents the output torque of the
nth CMG of the cluster, i.e., the
nth column of
. Let the value of
change in each time-step result in a different null motion.
3. Data Derivation
An optimization problem is discussed in this section in order to create the data-set that relates the initial gimbal angles and the commanded quaternion to the null space motion. The desired maneuver is divided in
D discrete steps and the
, (
) value is determined for the
i corresponding step. There are three different values of
:
and
where
is a constant value which represents the maximum null motion that can be added to the system in each time-step. The optimization problem is expressed as:
where
,
s is the maneuver duration and
is the manipulability index at time
t determined by:
Since the Jacobian matrix is a function of the gimbal angles that change over time, it can also be considered as a function of time for representation purposes. A heuristic algorithm is implemented that optimizes the OF of Equation (
16) value subject to the
set. The manipulability index is selected because it is a metric of distance from a singularity, since it equals to the product of the Jacobian singular values. The OF is related to the minimum value of the manipulability index in order to improve the worst performance configuration through the maneuver. This algorithm is based on a tree structure in which each branch corresponds to a different
value. As long as the value of the OF remains higher than the best so-far OF value, the tree continues to expand the same branch. Otherwise, the expansion is terminated and the exploration begins in the next branch.
In order to generate the desired data-set, multiple initial gimbal angles vectors and commanded quaternion vectors are used. When these inputs are selected randomly, the derived data-set can not be used due to the high standard deviation of the outputs and the amount of outliers existed. Instead, it is preferable to divide the initial gimbal angles into different families. The Binet–Cauchy theorem, as implemented for singularity analysis in [
40], relates the square of
w to the sum of the Jacobian minors as
where
and
is the matrix
with the
nth column removed. The order 3 Jacobian minors
are calculated by
Following this definition, the gimbal angles are classified in families by the sign combinations of the Jacobian minors. That means that every time a minor changes sign, there is a family change. In total, there are
possible minor sign combinations, each one corresponding to one family. The sign of
is the same in all Jacobian minors so the first term in Equations (
19)–(
22) can be ignored. In this paper, the families with respect to the minors sign are presented in
Table 1.
To achieve a null motion per simulation time-step
, for a 20 s simulation, a length of
is required. Such a length is not practical for optimization and near real time applications in terms of execution time and numerical computations. To select a proper depth value, 26 different initial gimbal angles in the range of
and 60 different commanded quaternions that belong in the two first families are selected and the OF value are calculated for each combination of them. It is observed that increasing the depth further than 8 does not significantly improve the mean value of the OF as depicted in
Figure 1, so
is the preferable depth value.
To match the simulation time-steps, the
set is interpolated through the simulation time. In
Figure 2, two different approaches for interpolation are presented, as example for a total simulation time equal to 0.15 s and
. The first approach (
Figure 2a) is similar to a Zero-Order-Hold (ZOH) filter, whilst the second (
Figure 2b) is a linear interpolation. In this paper, the linear interpolation is used for simplicity.
For each gimbal set in a class, the optimization algorithm runs for a set of commanded quaternions in order to obtain the data-set. The commanded quaternions are converted from Euler angles to quaternions because it is easier to describe and comprehend a maneuver as a rotation about roll, pitch, and yaw. The maneuvers given are: independent rotation about roll, pitch, yaw for /6, /2, 2/3, , and all the possible permutations of two of those independent rotations.
The structure of the data-set and the histogram of the different
values for each element of
set are presented in
Figure 3 and
Figure 4, respectively.
It is observed that there is an unequal distribution between the values. The value 1 is observed the least in all elements, except for the first. The value −1 is the dominant value for the first four elements and the value 0 is dominant only for the the fifth element.
In a higher capability hardware, it would be feasible to use a larger set of commanded quaternions and more than three individual values to describe the motion in the null space. Moreover, including more values in the set could better match the simulation time-steps, improving the interpolation results.
The exact simulation parameters used to produce the data-set are shown in
Table 2.
5. Simulation Results
After defining and training the ML systems, an initial gimbal angle set and a commanded quaternion are selected to predict the null space motion of the system and evaluate the performance of DNNs and RFC. The selected angle set is deg because it is easy to verify that it belongs to family 0. Without any loss of generality, the commanded maneuver is selected to be a rotation about one axis for simplicity, and the value of the commanded quaternion is selected randomly as which corresponds to a −103.69 deg rotation about the roll axis. A 2.7 GHz Inter Core i5 with 8 GB of RAM computer was used and all the simulations were run on the operating system macOS Big Sur in Matlab® R2016b.
For these inputs, the DNNs prediction is
. The RFC prediction in the first approach is
, whilst in the second approach it is
. All three predictions have in common that the last five elements are zero. This is expected because the low performance configuration is encountered near the beginning of the simulation where the ML systems predict a non zero null space motion. After this state, there is no need for null motion, since every gimbal configuration after the singularity corresponds to a better performance index. As a result, the rest of the elements are zero. The gimbal rates and the manipulability index for each prediction are presented in
Figure 8,
Figure 9,
Figure 10 and
Figure 11 and the results of the null space projection (NSP) upon the Moore-Penrose pseudo-inverse are also shown for comparison. This NSP steering law is given by
where
is a constant gain equal to 2,
is the 4 by 4 identity matrix, and
indicates the gradient of the manipulability index with respect to the gimbal angles.
Similarly to most ML techniques, the derivation of the data-set and the training of the model can be done offline without being involved in the operation of the system. Thus, a total time comparison between the NSP and the ML techniques would be unfair. In order to measure the execution time difference, i.e the time it takes for all the calculations needed until the end of the simulation, the training and data-set derivation time are excluded.
Table 5 shows the percentage difference in the execution time with respect to the NSP. It is observed that there is a 50.9%, 51.1%, and 48.4% improvement in the execution time when the ML techniques are utilized compared to the NSP. This is expected because there is no need to calculate the gradient of the performance index of the Equation (
28), which is the most time consuming part. The proposed ML methods offer the advantage of directly executing the null motion through commanding the
set to the CMG cluster. No need for additional computational power is required, since the model generation, the training, and the predictions of
values are executed a priori.
The gimbal angles and the manipulability index when the NSP is used are shown in
Figure 8a,b respectively. At t = 1.1 s, the gimbal angles are
deg and the minimum value of the manipulability index equals to 0.935 is obtained. In
Figure 9a,b, the results for the null motion predicted by the DNNs are presented. The minimum value of the index equals to 0.7144 and is observed at t = 5.8 s when the gimbal angles configuration is
deg.
Figure 10a,b illustrate the results for the null motion predicted by the first approach of the RFC. Similarly to the NSP, the minimum index value is obtained at t=1.1 s, but the configuration at this time is
deg. This leads to a higher minimum index value, equal to 0.9978. The results for the second approach of the RFC can be seen in
Figure 10b and
Figure 11a. The minimum index value and the time it is obtained are the same as previously. However, significantly different gimbal angle profiles are presented that result in a higher manipulability maximum. In addition, constantly higher values are obtained after t = 3 s compared to the first approach of the RFC. It is expected that the NSP will present a higher performance index after the low performance configuration because it aims to improve the value of the manipulability index locally. In contrast, the ML techniques are implemented to exclusively maximize the minimum index value across the desired maneuver, not the performance index in each time-step. The main drawback of NSP is that it drives the system to higher performance configurations, exploring the possible movements in the gimbal space locally. Hence, it is possible to ignore a path in gimbal space that results in a higher minimum index value because the path locally decreases the manipulability index. Such problems are avoided with global steering approaches, as the techniques described in this paper. It is expected that the RFC approaches will present a lower manipulability index value after t = 1.1 s compared to NSP, when the system has overpassed the singularity. In contrast, the prediction made by DNNs results in a lower minimum manipulability value than this obtained by the NSP, indicating that the DNNs are unable to make useful predictions for the specific application. In terms of attitude error, all the maneuvers are executed with zero attitude error because the null space motion does not affect the attitude of the system.
It has been proven that the first approach of the RFC provides a gimbal angle trajectory, in the null space, which results in the highest minimum manipulability value while it has been shown that this RFC model results in the highest accuracy among the examined models. Even though NSP can be implemented on board, it has been shown that when the set is commanded directly to the satellite, there is a significant improvement in the execution time required, as measured in the simulation.
The main downside of the proposed ML models is that they are limited by the physical characteristics of the system used to derive the training and the test data. In this paper, the identity matrix is selected as the inertia matrix of the satellite for simplicity, even though it is unrealistic. However, the complexity of the problem remains the same whether the inertia matrix is the identity matrix or a more complex matrix that depicts the characteristics of a satellite in a real-life application scenario. Moreover, selecting a higher value of
D would allow to decide the null space motion in shorter time intervals, even though it would require more time to derive the data-set and train the ML model. Nonetheless,
Figure 1 illustrates that increasing the depth values does not drastically improve the the mean OF value, which indicates the existence of a upper bound in the useful depth value. The various hyper-parameters associated with the ML implementation have to be selected according to the specific data, i.e., their number and reliability, because no universal tuning exists to fit every ML problem. The selection of these variables constitutes a research field, which is beyond the scope of this paper.
Despite the limited capabilities of the presented ML systems, due to hardware and time constraints, the described methodology provides significantly high scalability. It is possible to potentially provide a generalized predictive system by enriching the current data-set with more maneuvers, initial gimbal configurations, and different satellite inertias that can be used as data inputs. Thus, this methodology describes a way of developing both a training data-set and a predictive system for null motion path planning for a wide range of satellites. The OF can easily be adjusted to include more terms like the mean value of a manipulability index and/or the time the gimbal rates exceed a specific threshold. Such an approach would further increase the utility of the system in more realistic applications. In contrast to local gradient methods as NSP, global steering techniques provide the advantage of overcoming local extrema and it has been proved, as expected, that the presented method demands lower execution time since there is no need of calculating the gradient of the performance index in each iteration. Moreover, the interpolation of the L set through the simulation time provides a way of handling long maneuvers without the demand of producing a different null motion value for each step. Through the implementation of the gimbal families, it has been proved that a depth value of no more than eight is efficient for predicting the null motion path.
6. Conclusions
This paper constitutes a framework for approaching the Control Moment Gyroscope (CMG) cluster singularity problem using Machine Learning (ML) techniques. Two ML techniques for global steering the pyramid-type 4-CMG cluster have been investigated. A novel heuristic algorithm has been developed that calculates the optimal null space motion path, taking into consideration a manipulability-based Objective Function (OF) through the whole maneuvers, given the initial gimbal angles of each CMG and the commanded quaternion. The generated data-set that relates the initial gimbal angles and the commanded quaternion to the null space motion is used to train two ML systems. Among the two ML techniques, the Random Forest Classifier (RFC) presents the best performance, predicting with efficient accuracy the desired null space motion, even for maneuvers that are not included in the training set. A task is selected to evaluate the performance of the system following the predicted null motion derived by each ML technique, and the results verify that the RFC presents a higher minimum manipulability index compared to the Null Space Projection. Overall, this study is encouraging the determination of a singularity-free maneuver that can be known a priori and provides the utilization of gimbal families for the classification of the gimbal angles. The proposed methodology can be easily adapted to a wide range of satellites as long as their dynamic model is known, otherwise, the same procedure can be followed only for the kinematics model. In conjunction with an inspection mechanism, it is possible to monitor whether the real system follows the prediction. In case of deviations (e.g., produced by external disturbances), a new prediction can be obtained using, as initial/input configuration, the current configuration. Moreover, once the data-set is created and the training of the ML system has been completed, the computational demands to predict the output are significantly low, suggesting that the trained system can be potentially used on board to predict the desired set in real-time. However, the implementation and the needs of such an approach are beyond the scope of this paper and they are reserved for future work. Additional research should focus on enhancing the predictions using other types of neural networks, such as 1-D convolutional neural networks or long short-term memory networks, while assessing the performance of the system for the partially correct predictions in an effort to utilize them in case they do not deteriorate the OF.