Tuned gain values for the PDI controller and observer.
This manuscript will explore and analyze the effects of different controllers in an overall spacecraft’s attitude determination and control system (ADCS). The experimental setup will include comparing an ideal nonlinear feedforward controller, a feedback controller, and a combined ideal nonlinear feedforward + feedback controller within a Simulink simulation. A custom proportional, derivative, integral controller was implemented in the feedback control, adding an additional term to account for the nonlinear coupled motion. Consistent proportional, derivative, and integral gains were used throughout the duration of the experiment. The simulated results will show that the ideal nonlinear feedforward controller lacked an error correction mechanism and took extra time to execute, the feedback controller faired only slightly better, but the combined ideal nonlinear feedforward controller with feedback correction yielded the highest accuracy with the lowest execution time. This highlights the potential effectiveness for a learning control system.
- control systems
- learning systems
The goal of a spacecraft’s attitude determination and control system (ADCS) is to have a system that can move to and hold a specific orientation in three-dimensional space, relative to an inertial frame. This project can be viewed through three different lenses: classical control, modern control, and/or machine learning. These lenses explain the same control theory in three different contexts. For all the control theories, the ADCS considers the kinetics, kinematics, disturbances, controls, and actuators that dictate the system’s motion . Specifically, with regard to classical control, both feedforward and feedback controller are implemented in order to eliminate the error between a desired and commanded signal . With regard to modern control, a similar estimation and correction method is implemented using either an extended Kalman controller, which relies upon on a nonlinear control estimator coupled with a linear control corrector, or an unscented Kalman controller, which uses both a nonlinear control estimator and nonlinear control corrector, in order to reduce error [2, 3, 4, 5, 6]. The third context relates control systems to deterministic artificial intelligence and machine learning. The control estimate derives from self-awareness of its own attributes that update every time-step with new information. This self-updating learning mechanism can be viewed akin to the update cycle used by supervised learning algorithms to model a system’s performance. As an example, the updating mechanism is either a linear or nonlinear method to update an unknown inertia matrix for a spacecraft [7, 8, 9, 10, 11, 12, 13].
Figure 1 depicts the topology of the computational steps that take desired angle inputs and calculates Euler angle outputs: φ, θ, and ψ. The desired angle inputs are processed through the trajectory, controls, actuators, dynamics, and disturbances blocks. Section II will explain the theory behind the overall control system, Section III will detail the experimental setup, Section IV will show the results, and Section V will conclude this paper.
2. Background and theory
The rotation maneuver from one position to another is measured from the inertial reference frame or [XI, YI, ZI] to the final position, the body reference frame or [XB, YB, ZB], as depicted in Figure 2. For this simulation, a model was created to rotate from orientation A, [XA, YA, ZA], to orientation B, [XB, YB, ZB]. The kinetics, kinematics, orbital frame, and disturbance calculations are explained in Ref. . This paper focuses on a combined feedforward plus feedback controller as an error estimation and correction mechanism. This simulation utilizes three control moment gyroscopes (CMG) that are responsible for physically moving the system according to the inputted control signal. Additionally, this paper will focus on how the control system implementation affects the rotational maneuver and final orientation of a spacecraft.
2.1 Control moment gyroscopes
A CMG acts like a large reaction wheel spinning at a constant speed that transfers energy by changing its orientation. It successfully induces motion by following the governing equations of rotational mechanics, detailed in Eqs. (1) and (2):
These governing equations apply to any rotating, rigid body of mass. T represents the torque which is equal to the optimal control, ; represents the total system’s angular momentum; represents the angular velocity of the body; is the inertia matrix for the entire body, including the CMGs; and is the momentum produced by the CMGs. All these variables are expressed in the body frame of the spacecraft.
Physically on a spacecraft, the CMGs are typically one of several cylinders located at different orientations within the spacecraft’s bus, used to perform reorientation maneuvers. In Figure 1, the CMGs are represented within the actuators block, which is directly before the dynamics block. The actuator input is a commanded torque , and the output is an actual torque that is fed to the system using a sinusoidal trajectory described in .
The method of transforming a commanded torque, T, into an actual torque using the CMGs is described in Eqs. (3), (4), and (5). In these equations, the variable is the rotation about the gimbal axis, and β is the skew angle orientation of the respective CMG. The notations have also been shortened so that sine and cosine trig functions are “s” and “c,” respectively:
The first step is to build [A], commonly referred to as the Jacobian matrix or the spatial matrix. This matrix takes the angular changes in H and compares them to the changes in . This concept is visually represented in Figure 3, given a fixed β and fixed from (3).
The second step is based on the “so-called” inverse steering law, which is represented in (4). This equation relates the commanded torque to the gimbal rate, where the commanded torque is also known as the rate of change of the angular momentum. This calculation can be done with a variety of methods. A few potential methods for inversion include singular value decomposition, matrix inversion for square matrices, matrix pseudo-inversion for non-square matrices, or element by element in [A]−1 as defined in (5). Each of these methods yields a commanded gimbal rate, . For simplification, the actuator is assumed to be perfect and produces the actual gimbal rate commanded without error or loss.
The last step is to invoke the inverse steering law in (6) to relate the Jacobian matrix to the actual gimbal rate and determine the actual torque produced. This can be completed using decoupled equations, as shown in :
A singularity occurs when an element in the Jacobian matrix, from (3), is resolved to an undefined value. This is caused by a zero existing within the denominator of (5), which complicates the calculation when solving for the determinant of [A]. Eq. (7) shows that singularities depend upon θ1, θ2, θ3, β1, β2, and β3 values. Conceptually, this occurs at certain θ and β combinations because infinite torque is required to move the CMG when the torque vector is orthogonal to the gimbal axis. Trying to do so is impossible and yields unstable behavior as the CMG acts erroneously and tries to resolve a 1/0 calculation and command an undefined torque. Furthermore, when all the β angles are equal, β1 = β2 = β3, (7) simplifies further but is depicted as is for thoroughness.
This analysis is completed by taking (7) and stepping through θ and β combinations to verify which yield a zero determinant. For example, with sin θ1, cos β2, cos θ2, and sin θ3 all equal 0, the determinant of [A] is zero, yielding a possible solution of θ1 = θ2 = θ3 = 0°. However, this is a long process with the many permutations of solutions, which are omitted in this manuscript .
2.3 Controllers and observers
The input to a CMG is a torque vector, [Tx, Ty, Tz], which is a signal generated by the trajectory block in Figure 1. However, this signal is not tuned to adjust to real world influences, where mechanical hardware can introduce errors due to incorrectly or un-modeled attributes, noise, etc. In order to overcome these losses, either a feedforward controller, a feedback controller, or a combination of both controllers can be used to counter introduce errors. More specifically, proportional, integral, and derivative (PID) gains are correlated to the position error generated when moving from one position to another position to correct the errors. However, using only the position error , its integral and its derivative result in inaccuracies. This is due to the derivative calculation, which is both inefficient and inaccurate as a result of the virtual-zero reference created in the cascaded topology of a PID controller when the computation is initialized [16, 17, 18, 19]. This inaccuracy can be prevented by sending in both the position error and the velocity error, which has been done in this experiment via an enhanced Luenberger proportional, derivative, integral (PDI) controller [16, 17, 18, 19]. Additionally, the enhanced Luenberger controller differs from the conventional PID controller which only receives a position error. The result is a controller that outputs a commanded torque to the actuator block in Figure 1. Topologies are shown of the overall feedback controller in Figure 4, and the enhanced Luenberger PDI controller in Figure 5.
The simulation in this experiment utilized an observer to eliminate the virtual-zero reference described above. An observer is comparable to a controller as they both take in a position via system sensors and output a twice differentiated term to produce full-state feedback knowledge. However, it provides an advantage: because it is not implemented on a specific piece of hardware, much higher gains can be utilized than can be used otherwise. A topology of the observer is shown in Figure 6 in the controller/observer block.
2.4 Control system learning
A control system is capable of learning by estimating its desired position and then updating the control to correct for errors. In a learning control system, the control estimator is the feedforward controller defined by (8), and the corrector or learning mechanism is the feedback controller defined by (9), where and are defined by (10) and (11), respectively. The feedback controller can also be written in terms of the gains and the position error, , as shown in (12). Combining (8) and (9) yields a learning system that develops a more accurate control over time through (13):
Overall, the term “” in (9) represents the self-awareness statement. The nonlinear state transition matrix, , was built by knowing the dynamics of the system, and is the vector of unknown variables. Another application includes analyzing a changing inertia matrix, where it is assumed that the mass of the system is varying. The vector of unknowns, , is the learned moment of inertia that is recalculated at every iteration of the model and determining its new mass .
3. Experimental setup
This manuscript documents the implementation of three different control algorithm combinations to induce a yawing motion on a spacecraft by generating the commanded torque to a three-gimballed spacecraft ACS. The three cases are a nonlinear feedforward control (case 1), a linear feedback control (case 2), and a combination of both nonlinear feedforward + linear feedback (case 3). The gains for these controllers are found in Table 1.
|Kp gain||Kd gain||Ki gain|
The model in this manuscript was built in MATLAB and Simulink, where integrations were calculated using the ode45 with the Runge–Kutta solver and a fixed time-step. Euler angles were resolved using a 3-2-1 rotation sequence with the atan2 trigonometry function.
As per , initialized values include torque = [0,0,0] and quaternion = [0,0,0,1]. The spacecraft’s inertia matrix is J = [10,0.1,0.1; 0.1,10,0.1; 0.1,0.1,10]. The disturbances are defined in . The orbital altitude was set at 150 km with a drag coefficient of 2.5 and orbital motion off. Each simulation executed over a five-second quiescent period, five-second maneuver time, and five-second post-maneuver observation period, totaling 60 seconds and yielding a and for the sinusoidal trajectory of the controller.
4. Experimental results and analysis
4.1 Time-step analysis
Time-step analysis was completed to determine whether reducing the time-step would help minimize the body frame to the inertial frame error deviations. The results of executing a maneuver with a feedforward + feedback controller utilizing two different time-steps are depicted in Figure 7. Expectations were that a smaller time-step would result in more precise results, meaning a smaller deviation between the commanded and executed Euler angles. However, comparing the red and blue trajectories within each of the three plots in Figure 7 shows that although some refinement is gained by decreasing the time-step, the gain is minimal. Therefore, a larger time-step can be used without losing much accuracy.
Comparing the θactual − θdesired and ωactual − ωdesired errors for time-steps of 0.01 and 0.001 in Figure 8 yielded a similar result. The θz channel did receive the greatest amount of refinement with a smaller time-step, but no order of magnitude increase resulted. Therefore, these results confirm that varying the time-step has limited impact on the trajectories. Therefore, for the gains in Table 1, a minimum time-step of 0.01 is recommended, and decreasing it provides no additional benefit.
4.2 Control implementation
The performance of the three control system implementations is depicted in Figure 9. Comparing the three cases allowed further analysis on the differences between feedforward, feedback, and the combined feedforward + feedback control system. The feedforward and feedforward + feedback controllers are more precise than the feedback method. This is because it is based off an exact control equation, Eq. (8). Conversely, the feedback controller is based off a PDI controller that has one time-step of induced lag and is therefore less precise. Additionally, the gains in a PDI or PID controller must be finely tuned with predetermined gain values, which can be an iterative and time-consuming task because controller performance varies greatly depending on the values. Lastly, the combined controller configuration represents an error combination of both the feedforward and feedback plots. It allows the analytical accuracy of the feedforward equation to be updated with the responsiveness of the feedback correction, but too little error exists in this case for the results to be visible.
Figure 10 shows the error of the commanded Euler angle over time. The two left-most plots in Figure 10 show that the error is different for each controller. The feedback controller fluctuates initially as it corrects to minimize error over time. The feedforward controller is excellent initially but slowly deviates as error accrues without correction. Lastly, the combined controller is the best of both and starts with minimal error but then corrects that error over time. However, note that the error is minimal because no movement was commanded in either the φ or θ channels; the residual error exists because of cross-chatter between channels resultant from Eqs. (3) and (5).
The third plot from the left shows the position error in the channel, which is the channel in which a 30-degree maneuver was commanded. Before the maneuver was started, the desired versus commanded error starts at 30°. At each time-step, the position is updated and the error decreases. Due to the scale of the maneuver, all three controllers appear to do well during the maneuver. To better understand the performance, the fourth and right-most plot is a zoom-in of the third plot, illustrating the accuracies of the feedforward controller due to the forward propagation accuracy of (8), the lag induced error and imperfect gain tuning of the feedback controller, and the results of the combined feedforward + feedback controllers. It is a better example of how each controller operates: the feedforward controller again starts off with minimal error before deviating over time, the feedback controller starts with the greatest amount of error that is overshot and damped, and the combined controller, which is the best of both the minimal starting error and correction capability of the other controllers.
Lastly, Table 2 compares the boundary condition satisfaction at the final time of the maneuver. The results show that the feedforward + feedback controller has both the least amount of error and the shortest runtime. Conversely, the feedforward controller is the worst in both accuracy and runtime but only by a small margin compared to the feedback controller. The feedforward controller is hypothesized to perform worse because (12) tries to model (1) but can only poorly approximate it, yielding inaccuracies, which accrue over time.
|φactual − φdesired||θactual − θdesired||ψactual − ψdesired||Run time (seconds)|
Figure 11 is a revisualization of the data in Figure 10. This depiction is more intuitive and breaks down the change in angular position over time for each controller, as well as magnifying the post-maneuver oscillations and damping. Commanding [0;0;30], we see that all controller configurations are responsive to this input, with the expected differences. The accuracy of the feedforward control in the left-most plots, combined with the undamped response of feedback control of the middle plots, gives dampened response of the combined controller in the right-most plots.
This experiment implemented and compared the effects of a feedforward, feedback, and a combined forward + feedback control system. A yaw maneuver was commanded, and the response was measured to show that an ADCS can estimate and then update its control over time, similar to a feedforward and feedback learning mechanism. The results showed that the feedforward controller lacks a correction mechanism that accrues error and takes time; the feedback system is slightly better in both metrics, but the combined feedforward + feedback system combines the best of both systems for superior accuracy in the shortest time. Therefore, the combined system is the best choice for its accuracy and adaptability. However, this combined system needs to be further researched by subjecting the system to noise and induced disturbances to validate the combined system’s responsiveness.
We would like to thank our teacher, Dr. Timothy Sands, for his guidance in developing this work, as well as our families for their support while we spent our time away from them developing this research, so thank you.
Conflict of interest
The authors declare no conflict of interest.