Simulation of spacecraft damage tolerance and adaptive controls

The nature of adaptive controls, or controls for unpredictable systems, lends itself naturally to the concept of damage tolerant controls in high performing systems, such as aircraft and spacecraft. Recent technical demonstrations of damage tolerant aircraft prove the concept of adaptive controls in an operational environment. Research covered by this paper expands on the topic by discussing the application of adaptive controls to spacecraft and theory behind simulating damage tolerant control implementation. Simulation is then used to demonstrate the stability of adaptive controls when experiencing sudden mass loss and rapid changes in inertia.


A. BACKGROUND
Space based operations pose significant operational and technical challenges. The job of maintaining orbit in the space environment is complex, yet operators must also contend with outside threats to their spacecraft. Threats to spacecraft include the space medium itself, conventional weapons, directed energy weapons, and electronic warfare (Baines, 2006, pp. 33-39). One threat in particular is growing at an alarming rate; the threat of colliding with other orbiting objects. The advent of space use has introduced more than 39,000 traceable manmade objects into orbit, with over 16,000 large enough to be currently tracked (United States Strategic Command, 2012). Of these objects, approximately five percent are functional (United States Strategic Command, 2012).
This leaves a vast majority of objects orbiting earth that have no means of maneuvering away from a collision.
This population of orbiting objects, including spacecraft, rocket bodies, and debris is continuously growing. The risk of collision in space rises with the number of objects in orbit, and has the potential to create cascading, exponential increases in the number of objects orbiting earth (Kessler & Cour-Palais, 1978 (Kelso, 2013). As the opportunity for collision increases due to advancing technology and increasing debris, protecting operational spacecraft must become a priority.

B. MOTIVATION
Expanding reliance upon space assets and space based capabilities increases the opportunity for and consequences of a disruption. Weapon technology will continue to advance and spread. Orbital debris can take many years to deorbit and only seconds to create. These things will not change. Clearly satellites require greater levels of protection than ever before, and a promising technology may hold some answers for flight within and outside of the atmosphere. Adaptive control is best defined as "…an approach to dealing with uncertain systems or time-varying systems" (Slotine & Li, 1991, p. 204). This infers the use of what is known as an adaptive controller, defined as "…a controller with adjustable parameters and a mechanism for adjusting the parameters" (Åström & Wittenmark, 2008, p. 1). By these definitions, adaptive control is a specific kind of learning system that is generally considered appropriate when a system exhibits time variable dynamics (Dumont & Huzmean, 2002). The demonstration of DTC by the RQ-7B is enabled via the use of adaptive control through an adaptive controller.
Concurrently, with the successes of Rockwell Collins and DARPA, researchers at the University of Illinois successfully modified the programming for a UAV using adaptive controls (Hovakimyan, 2011). Using this modification the UAV was able to search for, and follow a moving ground based target autonomously. These demonstrations represent industry firsts and a tremendous step forward in the use of adaptive controls.
The successful tests by the University of Illinois, Rockwell Collins, and DARPA with autonomous flight and adaptive controls have certain industry parallels. Machine learning has developed many optimized adaptive controls, such as the relatively new reward-weighted regression model (Peters & Schaal, 2007). This model was developed specifically to minimize the processing power required, possibly allowing for greater adoption of autonomous machine learning. Adaptive controls have also been designed to adjust for a rapidly shifting center of gravity on light cargo trucks by the Robert Bosch company, dramatically increasing stability and reducing rollover risk (Liebemann, Füher, & Kröger, 2007). Additionally, adaptive controls are making their way into consumer products in the form of vehicular adaptive cruise control (Man Truck & Bus, 2012).
Adaptive cruise control is performed via the controller maintaining the user set speed of travel and changing to match the speed of slower moving vehicles when encountered (Pananurak, Somphong, & Manukid, 2008 Coy, 2008). These variations in torque can make spacecraft attitude control all but impossible, especially for small satellites. Another application is the proposed space tug, which moves between defunct orbiting objects, collects them, and deorbit them (Tewari, 2012). Adaptive controls would enable the tug to compensate for unknown debris mass and maximize its fuel capabilities.
As the space medium becomes more crowded across all orbits, the development of DTC for spacecraft will become a necessity. Adaptive autonomous operations has been called for in order to improve spacecraft survivability (Baines, 2006, pp. 45-47).
Threats to spacecraft exist at every period of their lifetime; from launch to operations and disposal. DTC and the recent developmental leaps in implementing adaptive controls present a possible answer to these evolving threats. This thesis will discuss the history, problems associated with, and a simulated solution for providing damage tolerance via adaptive controls.

C. PURPOSE AND RESEARCH QUESTION
The purpose of this research is to simulate a satellite with sudden mass loss and simulate adaptive controls to counteract the loss. DTC would be able to react to the loss much quicker than any human operator, giving the satellite the best opportunity to recover from damage. The question this research seeks to answer is: Are DTC possible for satellites in orbit?

D. SCOPE OF METHODOLOGY
The methodology of this research begins with a literature review of the development of adaptive controls. Following that is a detailed description of the development of the satellite simulation. Last is the data collection and analysis of results.

A. HISTORICAL DEVELOPMENT
In the 1950s and 1960s, the National Aeronautics and Space Administration (NASA), the United States Air Force (USAF), and the North American X-15 rocket powered aircraft were pioneering the concepts and principles that would come to define modern powered flight. Launched in flight from the wing of a B-52A aircraft, the X-15 would fire its rocket engine, achieve the mission's required altitude, and glide to earth for landing. Among the ground breaking ideas proposed was a system of adaptive controls, or a controller that would take into consideration the changing operational environment to deliver appropriate control to the operator (Staff of the Flight Research Center, 1961).
Primarily what the X-15 proved was the utility of something called Gain Scheduling.
Gain Scheduling is a method of adapting known linear control technique to meet the challenges required of a nonlinear system (Slotine & Li, 1991). By selecting enough points across the changing system and designing linear controls for each portion of the operation, it becomes possible to achieve adaptive nonlinear control. The primary concern when using gain scheduling is the lack of stability that can occur if the system becomes over saturated or departs from the programmed model. In 1967, oversaturated controls of the X-15 that Major Mike Adams was piloting prevented him from regaining control of the aircraft after deviating from the mission trajectory (Lilley, 2011). Major Adams was killed in the resulting breakup, and the X-15 program lost its funding the next fiscal year. NASA reports the lessons from the X-15 were the basis of the flight control system for the Apollo Lunar Excursion Module, and heavily influenced the Space Shuttle program (Lilley, 2011).
Concurrently to the X-15 project, adaptive controls were being proposed and put to the test in many other fields, such as spacecraft control and machine tooling. In partnership with the Bendix Corporation, the USAF experimented with utilizing adaptive controls with feedback for metal cutting, one of the first such attempts (Ulsoy & Koren, 1989). The goal was to account for tool wear in the machining process, both by measurement and by position feedback. At the same time NASA was investigating the possibility of developing adaptive controls for space vehicles, though the stated purpose was to extend the lifetime of spacecraft by minimizing the fuel consumption required to perform the mission (Taylor, 1969). Gain scheduling was heavily favored in these applications, as the required computing power to perform nonlinear adaptive control was yet to come. Gain scheduling requires significant up front processing power, in order to develop all the linear controls needed, which also suffered from the relative lack of computing power of the era.
These projects led naturally to the inclusion of adaptive controls in the development of the International Space Station, to assist with stability during the construction phase and overall attitude control (Ih, Wang, & Leondes, 1985). In this we see the emergence of developing inherently robust controls across the entire mission profile, where only the parameters change between the different phases. Also emerging at this point are many different attempts to limit uncertainty for space based systems, such as the use of Kalman filters, model reference controls, and linear quadratics (Govin, Claudinon, & Larminat, 1981). Indeed, the realization that slight disturbances can lead to system failure has forced the development these inherently robust controls, and leads developers to calculate uncertainty and feed it into the control parameters adjustment during operations (Kosut, 1989). As late as 1983, the equations required to perform adaptive control for complex space structures were too complicated to be run in real time (Schaechter, 1983).

B. RECENT DEVELOPMENT
Development up to the 1990s left space operations needing a controller that functions well across a system with changing operational conditions. Serious study at this point focused on utilizing the dominant control method of industry, the proportional integral derivative (PID) controller, which was developed for naval autopilots (Xu, Shum, Lee, & Kanade, 1991). The adaptive PID controller works for a wide array of processes without requiring significant characterization of the system, all while outperforming other control methods, such as the generalized predictive control system (Ho, Rad, Chan, & Wong, 1999). This is due in part to the flexibility of the controller, which is demonstrated in the adaptive control scheme used by this simulation. Due to the nature of the PID equation, developers can take specific portions of the controller and adapt them for a specific use, such as the Proportional Derivative controllers proposeded for use in space manipulators (Ehrenwald & Guelman, 1998). PID and PID derivative adaptive controls show significant promise when applied to space based controls.

A. INTRODUCTION
The purpose of the simulation is to answer our research question "Are accurate and stable DTC possible for satellites in orbit?" Simulating ground conditions allows for continuation and validation of any results in the laboratory. The satellite was modeled in SIMULINK and the satellite block diagram is as shown in Figure 1.

B. MODIFIED PID CONTROLLER
The concept of the PID controller comes from the Åström and Wittenmark definition: where ( ) u t is the process or control input, ( )

C. STEERING
The spacecraft achieves attitude control via CMG steering, within the CMG Steering subsystem, which is contained in the Actuators and Control subsystem as shown in Figure 1. The simulation uses a minimum, non-redundant CMG array of three CMGs and a balance mass to offset gravity gradient disturbances. The CMG Steering subsystem utilizes the Moore-Penrose Pseudoinverse Steering Law as described by Bong Wie (Wie, 2008, pp. 465-466). Wie's description assumes a CMG array as shown in Figure 3.
where { } ω is the angular velocity. Finally the Moore-Penrose Pseudoinverse Steering Law, also known as pseudoinverse steering logic, may be obtained as: with the gimbal rate. The CMG Steering subsystem is as shown in Figure 4.

D. DYNAMICS
The Dynamics section was derived from the law of conservation of angular momentum, and the definition of angular momentum: is the sum of the torques in the rotational frame and { } M , the rotation of the body frame, is defined as (Reeves, 1999, pp. 324-325): From change in angular momentum we use Equation 13 to find change in angular velocity and angular velocity, outputting both. The spacecraft dynamics block diagram is as shown in Figure 5.

E. KINEMATICS
The Kinematics section begins with the angular velocity of the spacecraft, ( , , ) x y z ω ω ω , and adds the angular velocity of the spacecraft's orbit, resulting in 1 2 3 ( , , ) ω ω ω , the angular velocity with respect to orbit. This angular velocity is transformed into a quaternion, which is a specific type of complex number, by the relationship: where 1 q is the scalar part, the values 2 q , 3 q , 4 q make up a vector part, and [ ] is a matrix multiplication skew-symmetric version of the cross product in Equation 17 (Wie, 2008, p. 426). One benefit of using Equation 18 to find the quaternion is that a quaternion calculated via this method will always be normalized (Wie, 2008, p.423).

Once the quaternion [ ]
Q is calculated, the direction cosine matrix (DCM) is calculated via the relationships:  19 is expanded, the following DCM can be extracted (Wie, 2008, p.  q q q q q q q q q q DCM q q q q q q q q q q q q q q q q q q q q The quaternion block is required in order to avoid singularities during the simulation that result when using Euler angles alone. The Apollo program's inertial measurement unit was highly susceptible to gimbal lock thanks to using Euler angles without quaternions and three axis gimbals, leading to dangerous losses of position accuracy during several missions (Hoag, 1963). The block diagram of the quaternion and DCM calculations is as shown in Figure 6. The DCM is also defined by writing out the result of the three body axis rotations: , and assuming the coordinate transformation

F. DISTURBANCES
The only disturbances modeled were the gravity gradient torque, or the torque due to unequal gravitational pull on the disparate parts of the satellite. This is the only disturbance expected to be observed in a laboratory follow up of this simulation. Gravity gradient torque is defined as: where { } gg T is the gravity gradient torque, µ is the Earth's gravitational coefficient, 0 R is the distance from Earth's center, { } e u is the unit vector towards Nadir, and [ ] I is the spacecraft moment of inertia matrix (Reeves, 1999, p. 324 The gravity gradient torque is output to the Dynamics Block, and the block diagram is as shown in Figure 9.

G. SENSORS AND OBSERVERS
The enabling concept behind the feedback capabilities of the simulation is contained in the Sensors and Observers block. Euler angles and angular rates enter, combined in a state vector, which can be shunted along different paths, from an unedited ideal full state feedback to sensor feedback, observers, state feedback, Kalman filtered sensors, and Lowpass filtered sensors. Once the simulation selects anything other than ideal full state feedback, a sensor is simulated. The sensor is the ideal feedback signal with a random number generator adding noise. Next in the process flow is the Observer Subsystem, containing a Luenberger observer and a PID observer. The purpose of any observer is to create a complete state vector from incomplete and/or noisy observations.
The PID observer relies upon the same concept as the PID controller, or measuring current error, accumulating past error, and predicting future error. The PID observer The other choice for observer, the Luenberger observer, also has the ability to receive the control signal from the Dynamics block, labeled TotalControl on the block diagram. The Luenberger observer operates on a system defined as: where ( ) x t is the process state, ( ) u t is the process inputs, ( ) y t is the process outputs, and A , B , C , and D are gain constants for tuning the observer (Luenberger, 1979).
Assuming such a system, the Luenberger observer is defined as: Where ( ) z t is the estimated process state, ( ) The simulated Luenberger observer is enhanced to accept feedback just like the PID controller and features the TotalControl option as previously discussed. The block diagram of the PID and Luenberger observers are as shown in Figure 10. Immediately after the Observer block is the ability to enable a Kalman filter.
Kalman filters are a means of isolating a system state buried inside an otherwise noisy signal. The Kalman filter operates on a state defined as:  (Welch & Bishop, 2006). The filter makes observations defined as: x is the estimated state and k K is the Kalman gain. Using these relationships a Kalman filter makes a prediction of the state and covariance, calculates gain, and updates its state and covariance model.
In the simulation, the state vector is broken apart, and the Euler angles are run separately from the angular velocity through corresponding Kalman filters. This enables the simulation to find the true error in the Kalman values by comparing the filtered Euler angles to be compared to the true Euler angles. The Kalman Filter block diagram is as shown in Figure 11.
where s is the signal, ' s is the filtered signal, and p ω , p ζ , z ω , z ζ are parameters tuned to the desired filter level (Wie, 2008, p. 137). When the lowpass filter is selected, the simulation breaks out each of the six components of the state vector, utilizes individual, separately tunable filters, and pushes the filtered signal to the Controller block. The Lowpass filter block diagram is as shown in Figure 12.

H. CHAPTER SUMMARY
This chapter covered the simulation as it was written, including the many different possible configurations. Each section included the founding principle and associated equations that led the development of the respective block.

A. INTRODUCTION
To answer the research question completely requires that the DTC are effective, accurate, and stable. This requires at least two different methods for analysis. The selected methods are the Monte Carlo analysis and phase portrait analysis. Both methods will demonstrate that DTC are effective, or that the simulated DTC do in fact function.
The Monte Carlo analysis will also demonstrate the effects on accuracy due to DTC. The phase portrait analysis will demonstrate the stability of DTC.

B. MONTE CARLO ANALYSIS
The Monte Carlo method, created by Stanislaw Ulam, draws its name from Ulam's uncle, who frequented the Monte Carlo casino (Metropolis, 1987). The premise is that by running simulations numerous times and recording the results, the outcome can be accurately characterized. This is akin to visiting a casino many times to determine the odds of any game of chance.
In order to profile the outcome of the DTC in the simulation, a Matlab m-file was written, iteratively calling the simulation. Each iteration was distinguished by increasing the mass loss of the spacecraft by 0.1 percent, beginning at zero percent and finishing at 90 percent mass loss. Mass loss was simulated by reducing the simulated spacecraft moment of inertia matrix. This assumes that in the case of sudden mass loss, the satellite remains functional. Each iteration, the spacecraft was commanded to perform a 30 degree yaw, and the tracking error was recorded. In addition to the mean error, the standard deviation of the error was also recorded. The m file was written as shown in Appendix B.
The Monte Carlo method applied to tracking error does an excellent job of characterizing the accuracy of the DTC when a spacecraft mass is suddenly lost, and by returning these results, shows that the DTC of the simulation do function correctly. The DTC never experienced greater than a mean 0.9 degree tracking error, with a standard deviation that was always less than 1.1 degrees. The results are as shown in Figure 14, where µ  is the mean measured error, and σ  is the standard deviation. Figure 14. Monte Carlo Analysis Results.

C. PHASE PORTRAIT ANALYSIS
The premise behind phase portrait analysis is to characterize the behavior of a system with regard to stability of equilibrium points. In this case, the behavior of the spacecraft DTC was examined around the commanded state vector. In order to demonstrate stability, the axes of angular rate and angular position in the inertial frame were chosen. If the motion described circles into the commanded point, then stability has been achieved.
To create phase portraits, a Matlab m-file was written which iteratively calls the simulation. Each portrait reflects a fixed mass loss, with many different values of initial position and initial velocity given. Mass loss was simulated by reducing the inertia matrix. This assumes that in the case of sudden mass loss, the satellite remains functional. Each iteration changes the initial position and initial velocity, then records the results as the simulation is run for a set time of 100s. The omega value was already calculated by the Dynamics section, as variable w. In order to record the desired results, a new variable had to be captured, the position in the inertial frame. This was accomplished by adding an integrator block to the angular speed in the Dynamics section, and capturing the angle as the variable wAngles, as shown in Figure 15. For each iteration the spacecraft was commanded to perform a 30 degree yaw, with the omega angles and omega value recorded, then plotted against each other in graphs for each of the inertial frame dimensions. The m-file was written as shown in Appendix C.
The generated phase trajectory portraits successfully characterizes the stability of the DTC when spacecraft mass is suddenly lost and the spacecraft is imparted with sudden changes in state. Stability is demonstrated by the boundedness of the phase trajectories (Slotine & Li, 1991). Stable trajectories are generally expected to approach the origin, unstable trajectories generally diverge from the origin. Examples by Slotine and Li of phase trajectories with differing stability can be found in Figure 16.

D. CHAPTER SUMMARY
This chapter covered the analysis methods used to answer the research question.
The Monte Carlo method proved effective in characterizing the tracking error of the system when subjected to mass loss. The phase portraits provide insight into the stability of the system when subjected to sudden mass loss, change in velocity, and change in position. In both examples the fewest possible changes were made to the base simulation to protect the integrity of the results. The changes were limited to commenting out, or removing, initial conditions that interfered with data collection, and adding a single integrator and variable output set for phase portrait generation.

V. CONCLUSIONS INTRODUCTION
The development of adaptive controls and the enabling technology for them has reached a point where new and innovative uses are now becoming possible. By introducing a modified adaptive PID controller with adaptive feed forward control to this simulated spacecraft, it is demonstrated that the controls have achieved significant damage tolerance. This comes at a time where the need for such tools has never been greater, and the dangers associated with space operations grow daily.

B. ADAPTIVE CONTROL
Space operations are going to become more difficult and dangerous in the foreseeable future. Significant action is required to protect the space assets that the United States has become dependent on. Adaptive control holds the key for many of the solutions currently proposed to mitigate these risks.
The damage tolerant, adaptive controller as implemented in the simulation provides adaptive control with accuracy and stability. The accuracy is evidenced by the minimal tracking error of the system even when approaching a 90 percent mass loss. The stability is evidenced by the phase portraits in each inertial frame recovering from the sudden change in state even when the change was accompanied by a loss of mass. The research question was: Are DTC possible for satellites in orbit? Yes, the satellite simulation achieved accurate and stable DTC.

C. APPLICATION OF STUDY
Introducing DTC like those simulated here is achievable with today's technology.
As the largest limiting factor historically has been processing power, the feasibility of retrofitting operational spacecraft with DTC is limited, but not necessarily impossible.
Modern spacecraft should have no technical limitations prohibiting the implementation of DTC. Writing DTC into spacecraft controllers may even lower the cost and risk of the program as a whole (Wertz & Larson, 1999). DTC clearly exhibit a robust ability for all manner of spacecraft, warranting further study and operational adoption.

D. AREAS TO CONDUCT FURTHER RESEARCH
The logical next step is to validate the simulation results in a laboratory. The simulation was designed to enable laboratory testing, by including the Gravity Gradient disturbances alone and setting the altitude to zero, as would be observed in the laboratory.