Autonomous Rendezvous and Docking With Tumbling
Autonomous Rendezvous and Docking With Tumbling
Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Department of Aeronautics and Astronautics
May 10, 2019
Certified by . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
David W. Miller
Professor, Aeronautics and Astronautics
Thesis Supervisor
Accepted by . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sertac Karaman
Chairman, Department Committee on Graduate Theses
2
Autonomous Rendezvous and Docking with Tumbling,
Uncooperative, and Fragile Targets under Uncertain
Knowledge
by
Hailee Elida Hettrick
Abstract
As efforts to expand humanity’s presence in space continue to increase, a need for
spacecraft to autonomously perform in-space close proximity maneuvers without a
human operator increases, as well. Such in-space close proximity maneuvers include
active debris removal, satellite servicing, and in-space assembly. Active debris removal
will facilitate the continued use and access to low Earth orbit, mitigating the expo-
nential debris growth occurring due to decrepit satellites and rocket bodies colliding.
Satellite servicing will provide the capability to repair and refurbish spacecraft, elon-
gating the lifetime of valuable assets both locally orbiting Earth and on routes further
out in the solar system. In-space assembly is the means by which large space struc-
tures are developed in orbit. Currently, such feats occur with the help of astronauts
and robotic arms (i.e. the continued development of the International Space Station).
However, for increased benefit, in-space assembly must occur autonomously, without
a human in-the-loop, in order to create large structures in locations unideal for hu-
mans or with a non-negligible communication latency. These three reference missions
need the software enabling autonomous rendezvous and docking to reach a technical
readiness level to be employed with confidence. In-space close proximity maneuvers
share a standard sequence of events described in this thesis. The focus of this thesis
address the terminal approach trajectory to soft docking, the contact dynamics of
docking between two spacecraft, the optimization of the detumble procedure to bring
the Target to stabilization, and adaptive control techniques to handle uncertainties
in spacecraft knowledge. The software developed in support of these subproblems is
included in the appendices and is largely based on implementation with the Synchro-
nized Position Hold Engage Reorient Experimental Satellites (SPHERES) platform
or with the characteristics of SPHERES considered.
3
4
Acknowledgments
This research was conducted primarily under the support of the Massachusetts Insti-
tute of Technology Department of Aeronautics and Astronautics through a research
assistantship. The author thanks the department for its support and Dr. David
Miller for his guidance through the research. Additional gratitude is expressed to
the SPHERES team and former postdoc Danilo Roascio for assistance with using the
SPHERES testbed.
Lastly, many thanks to the never-ending support and wisdom from family and the
friendship and community provided by Jess, Alexa, Cadence, and Golda.
5
6
Contents
1 Introduction 21
1.1 Motivation for Autonomous Rendezvous & Docking . . . . . . . . . . 21
1.1.1 History of Rendezvous and Docking . . . . . . . . . . . . . . . 21
1.1.2 Reference Missions for Autonomous Rendezvous & Docking . . 24
1.2 SPHERES Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.2.1 Status of Testbed . . . . . . . . . . . . . . . . . . . . . . . . . 32
1.3 Relative Operations for Autonomous Maneuvers . . . . . . . . . . . . 33
1.4 Research Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
1.5 Thesis Roadmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2 Literature Review 37
2.1 Trajectory Optimization . . . . . . . . . . . . . . . . . . . . . . . . . 37
2.2 Nonlinear Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.2.1 Sliding Mode Control . . . . . . . . . . . . . . . . . . . . . . . 39
2.2.2 Adaptive Control . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.3 Attitude Stabilization under Actuator Loss-of-Effectiveness . . . . . . 43
2.4 Soft Docking & Stabilization of a Tumbling Target . . . . . . . . . . 44
3 Trajectory Optimization 47
3.1 Stage Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.2 Synchronous Radial Approach via Second Order Differential Equation 48
3.3 Differential Equation Propagator Architecture . . . . . . . . . . . . . 56
3.3.1 R-Bar Alignment . . . . . . . . . . . . . . . . . . . . . . . . . 57
7
3.3.2 Forward Propagation . . . . . . . . . . . . . . . . . . . . . . . 59
3.3.3 Determine Final Position . . . . . . . . . . . . . . . . . . . . . 59
3.3.4 Backwards Propagation . . . . . . . . . . . . . . . . . . . . . 60
3.3.5 Radial Shift . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
8
B Adaptive Control for Uncertainty 149
B.1 Thruster Characterization Plots . . . . . . . . . . . . . . . . . . . . . 149
B.2 Thruster Characterization Functions . . . . . . . . . . . . . . . . . . 150
B.3 Adaptive PID SMC Controller . . . . . . . . . . . . . . . . . . . . . . 165
9
10
List of Figures
11
3-4 Euclidean norm of acceleration components as fraction of the Euclidean
norm of total acceleration . . . . . . . . . . . . . . . . . . . . . . . . 51
3-5 Sum of Euclidean norm of radial and tangential acceleration compo-
nents as fraction of the Euclidean norm of total acceleration . . . . . 52
3-6 Vector elements of acceleration components for each generated trajectory 54
3-7 Chaser’s trajectory from call to ode45 using Listing 3.1 . . . . . . . . 56
3-8 Illustrating the necessary initial conditions for the propagator i.e. the
Chaser is at the desired radius and the Chaser is along the Target’s
R-bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3-9 Timeline illustrating the Chaser’s intersections with the Target’s R-bar
at the desired initial radial length away from the Target . . . . . . . . 58
3-10 Forward propagate Target’s orientation and rotation rate for 𝑛 periods 59
3-11 Generated trajectory yielded from 𝑡𝑓 from forward propagation prior
to radial shift to align initial position with Chaser’s current position . 63
3-12 Generated trajectory after radial shift with initial position aligned with
Chaser’s current position . . . . . . . . . . . . . . . . . . . . . . . . . 64
3-13 Illustration of timeline shift after shifting the radial approach to align
with the Chaser’s current position . . . . . . . . . . . . . . . . . . . . 65
4-1 Location and indices of thrusters on satellite with noted exhaust direction 68
4-2 Thruster characterization: raw accelerometer and gyroscope data from
IMU in test session 97 . . . . . . . . . . . . . . . . . . . . . . . . . . 69
4-3 Thruster characterization: 200 ms impulse accelerometer data sepa-
rated by axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4-4 Calculated force magnitude of each thruster on Blue and Orange satellites 73
4-5 Test session 101: calculated force of each thruster and each satellite . 75
4-6 Test 11: closed-loop x-translation telemetry . . . . . . . . . . . . . . 77
4-7 Test 12: closed-loop y-translation telemetry . . . . . . . . . . . . . . 78
4-8 Test 13: closed-loop z-translation telemetry . . . . . . . . . . . . . . . 79
4-9 Test 14: closed-loop x-rotation telemetry . . . . . . . . . . . . . . . . 80
12
4-10 Test 15: closed-loop y-rotation telemetry . . . . . . . . . . . . . . . . 80
4-11 Test 16: closed-loop z-rotation telemetry . . . . . . . . . . . . . . . . 81
4-12 Flowchart of the in-flight adaptive PID sliding mode controller as im-
plemented in C-code . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
4-13 A comparison of commanded position and attitude vs. measured teleme-
try from simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
4-14 Adaptive PID SMC time histories corresponding to position and atti-
tude from simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
4-15 Trajectories plotted in the 𝑥-𝑦 plane from simulation . . . . . . . . . 95
4-16 Trajectories plotted in the 𝑥-𝑦 plane from hardware tests . . . . . . . 96
4-17 A comparison of commanded position and attitude vs. measured teleme-
try from hardware tests . . . . . . . . . . . . . . . . . . . . . . . . . . 97
4-18 Adaptive PID SMC time histories corresponding to position and atti-
tude from hardware tests . . . . . . . . . . . . . . . . . . . . . . . . . 98
5-1 Chaser and Target during instance before docking occurs denoted with
separate position, velocity, and attitude vectors . . . . . . . . . . . . 102
5-2 Chaser and Target in the instance after docking denoted with aggre-
gated translational and attitude velocity . . . . . . . . . . . . . . . . 103
5-3 Chaser and Target as docked, aggregated system with denoted body-
fixed frame at Target’s center of mass and the force and torque direc-
tions of the Chaser . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
5-4 Free body diagram of the Chaser displaying Chaser’s abilities to impart
force and torques and its internal loads and moments from interacting
with the Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
5-5 Expected angular velocity time histories from integration of selected
angular acceleration functional forms . . . . . . . . . . . . . . . . . . 114
5-6 Angular acceleration profiles as axisymmetric spacecraft initially rotate
about all three axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
5-7 Angular acceleration profiles as spacecraft initially rotate about 𝜓-axis 121
13
5-8 Angular acceleration profiles as axisymmetric spacecraft initially nutate 121
14
List of Tables
5.1 Notation for contact dynamics of two spacecraft docking to one another 102
5.2 fmincon optimization options used in the indirect optimization of an-
gular acceleration profiles . . . . . . . . . . . . . . . . . . . . . . . . . 113
5.3 Method 1 optimization results of optimal Δ𝑡 and associated cost . . . 116
5.4 Method 2 optimization results of optimal Δ𝑡 and associated cost . . . 119
15
16
Nomenclature
Acronyms
CM Center of mass
DOF Degree-of-freedom
PID Proportional-Integral-Derivative
17
ROAM Relative Operations for Autonomous Manev
TS Test Session
VERTIGO Visual Estimation for Relative Tracking and Inspection of Generic Ob-
jects
Coordinate Frames
Variables
𝜆 Wavelength
𝜑 Roll angle
𝜓 Yaw angle
18
𝜃 Pitch angle
𝛼
⃗ Angular acceleration vector
𝜔
⃗ Angular velocity vector
⃗𝑟 Position vector
𝑞 Quaternion
D Aperture diameter
19
20
Chapter 1
Introduction
Initial interest in spacecraft rendezvous coincided with the beginning of the Space Age
in the late 1950s [1]. Technical adeptness at in-space rendezvous improved through
the course of the Gemini program in preparation for the Apollo program. Gemini 6A
and 7 achieved the first space rendezvous using a concentric orbit rendezvous plan [2].
Gemini 8’s sequences were a repeat of the previous mission with the Agena Target
Vehicle (ATV) with the addition of humans-in-the-loop for docking the two vehicles
[3]. Additional rendezvous sequences were tested in missions 9 through 12 of the
21
Gemini program, proving in-space rendezvous feasible in preparation for the Apollo
missions.
Rendezvous and capture were necessary functionalities for the Apollo program to
satisfy its mission objectives, as the Lunar Excursion Module had to rendezvous and
dock with the Command Service Module [4]. The coelliptic rendezvous scheme was
utilized for Apollo 11 and 12 [5], and the lessons learned from those missions as well
as 7, 9, and 10 led to the utilization of a shorter rendezvous profile in missions 14
through 17 that increased time on the lunar surface [6]. In this manner, rendezvous
and docking were essential maneuvers that facilitated visiting the Moon.
The era of the Space Shuttle ushered in new rendezvous, capture, and docking
approaches necessitated by the target spacecraft. Shuttle’s onboard guidance, naviga-
tion, and control (GN&C) subsystem autonomously performed rendezvous functions
but required the crew to be in-the-loop for docking maneuvers [4]. Additionally, the
Shuttle program was the first to make use of a robotic arm (the Remote Manipulator
System) for capture and berthing (see Figure 1-1) [7]. Therefore, the Shuttle did
not only advance the software capabilities critical for autonomous rendezvous and
docking, but it also had a significant impact on the hardware that facilitates such
maneuvers.
The Demonstration of Autonomous Rendezvous Technology (DART) was the first
US effort to perform rendezvous and docking without an astronaut piloting the ma-
neuver. Its mission objectives included demonstrating R-bar, V-bar, and circumnavi-
gation approach methods [9]. Launched in April 2005, the rendezvous maneuvers were
completed successfully. Unfortunately, DART’s mission was not entirely successful
as consequence of a sensor anomaly resulting in more fuel usage and a collision with
the secondary spacecraft, indicating necessary system engineering improvements for
a fully autonomous rendezvous mission [10].
XSS-10 and Orbital Express represented a focus shift towards satellite servicing.
The Air Force Research Laboratory’s XSS-10, which was deployed from a Delta II
vehicle in January 2003, successfully semi-autonomously maneuvered around the sec-
ond stage, performing close-proximity inspection of the stage [11]. Launched in March
22
Figure 1-1: Remote Manipulator System on STS-125, Hubble berthed to Shuttle [8]
2007, DARPA’s Orbital Express demonstrated the hardware and software abilities to
autonomously capture the Target and to autonomously service the Target [12]. Or-
bital Express was a key milestone in validating these technologies, illustrating the
technical feasibility of satellite servicing [10].
23
1.1.2 Reference Missions for Autonomous Rendezvous & Dock-
ing
In 1978, Kessler predicted that by the year 2000, existing pieces of small debris will
exponentially increase via collisions even without additional debris being added from
orbit. As of 2010, Kessler’s prediction has proven true – the exponential increase
of small debris from collisions is coined the Kessler Syndrome [14]. Specifically, the
debris population of low Earth orbit (LEO) is at risk of reaching a capacity of decrepit
spacecraft and launch vehicle stages that satellites will no longer be able to be placed
in LEO [15]. Kessler also emphasized the need to implement mitigation practices in
the wake of inadequate collision avoidance by not leaving future payloads and rocket
bodies in orbit once deprecated. Figure 1-3 illustrates the effective number of objects
in LEO that are 10 cm or larger based on simulation. "Effective number" refers to the
fraction of time per orbit period than an object spends within the altitude range of
200 km to 2000 km [15]. Figure 1-3 indicates the steady growth of collision fragments
as collision-created debris causes more collisions.
Motivated by the dire situation the Kessler Syndrome presents, software develop-
ment has begun to make feasible active debris removal. Bonnal et al. highlight the
general high-level functions agnostic to the Chaser that are necessary for de-orbiting
debris. In summary, these functions are
24
Figure 1-3: Effective number of LEO objects larger than 10 cm [15]
5. De-orbitation
25
Figure 1-4: Conceptual diagram of potential capturing methods [17]
In-Space Assembly
Most spacecraft are limited in size and functionality by the size of the payload fairing
of the launch vehicle. One workaround for this issue are utilizing complex deployable
systems, a methodology the James Webb Space Telescope has employed [18]. In-space
assembly with a human operator has occurred and is a continued possibility; however,
such an operation has inherent limitations. The International Space Station (ISS) is
a noteworthy example of in-space assembly with humans-in-the-loop (see Figure 1-
6). Lessons learned from the assembly of the ISS emphasized the importance of
offloading the work placed on the EVA astronaut as advances in computer vision,
remote operations, and autonomy occur [19].
According to Mohan, the feasibility of future space missions depends on the tech-
nical advancement of in-space assembly to facilitate the next-generation of space
26
(a) Zarya and Unity on December 13, 1998 (b) ISS on March 7, 2011 [21]
[20]
telescopes, fuel depots, and solar power stations [22]. The next-generation of space
telescopes presents the most pressing case for robotic in-space assembly. Complex
deployable systems present a high risk to the mission, and desirable locations for
space telescopes are not necessarily in locations accessible by astronauts [23]. For
space telescopes (and other payload equipment that utilize apertures), the angular
resolution improves as the aperture diameter improves according to 𝜃 = 1.22 𝐷𝜆 , where
𝐷 is the aperture diameter and 𝜆 is the wavelength [24]. A higher angular resolution
is desirable as it allows for more precise imaging.
The disadvantages of human-assisted assembly are communication latencies (for
tele-operation), a lengthy lead time of roughly a decade before a mission occurs,
limited locations based on where humans can travel, and increased costs of assembly
due to human involvement. Robotic in-space assembly offers a low-cost and low-
risk alternative; however, technological progress in the use of space robotics and
autonomous rendezvous and docking methodologies is necessary for feasibility [22].
Satellite Servicing
27
claim it will also be a necessity as spacecraft systems become more complicated [10].
Astronaut-assisted satellite servicing has already proven its use with respect to re-
pairing Skylab and the Hubble Space Telescope (HST). The first instance of servicing
occurred shortly after Skylab’s launch in 1973. The micrometeroid shield failed and a
main solar array panel failed to deploy. The crew performed a series of extravehicular
activities (EVAs) to replace the shield. More notorious were the issues with HST,
which was designed to support on-orbit servicing via astronaut support. On initial
checkout, an optical flaw was discovered in HST’s primary mirror and it experienced
thermal jittering during orbital sunrise and sunset. Five servicing missions were de-
signed and executed to repair, replace, or augment various aspects of HST, the first
of which is depicted in Figure 1-7 [10].
Figure 1-7: Astronauts install set of corrective lenses for flawed mirror in HST on
first servicing mission (STS-61) [25]
The Space Station Remote Manipulator System (SSRMS), also known as Canadarm2
28
(see Figure 1-8), is a fully operational, 17-meter long robotic arm attached to the Inter-
national Space Station that offers seven degrees of freedom and is capable of handling
payloads up to 100,000 kg of mass [26]. Canadarm2 assists in maintaining the ISS,
grappling resupply spacecraft and berthing them to the ISS, and moving equipment.
Not only is Canadarm2 an example of the use of robotics in satellite servicing, but
it is also the recipient of servicing from astronauts. For example, in 2002, one of its
wrist roll joints was replaced and it received new latching end effectors in 2017 and
2018 [27]. Robotic arms are expected to continue and serve in a critical capacity for
future satellite servicing missions.
29
1.2 SPHERES Platform
SPHERES (see Figure 1-9) is a platform for the development and validation of for-
mation flying, docking, control, estimation, navigation, and guidance algorithms for
separated and aggregated spacecraft systems [28], [29]. There are three testbeds for
SPHERES – the Japanese Exploration Module (JEM) in the International Space
Station (ISS), the glass table in the Space Systems Laboratory (SSL) at the Mas-
sachusetts Institute of Technology (MIT), and the flat floor facility at MIT. The
testbed aboard the ISS allows for six degree-of-freedom testing because of the micro-
gravity environment – a unique feature this program offers for spacecraft algorithm
development. The two testbeds at MIT – the glass table and the flat floor – offer
three degree-of-freedom environments for SPHERES testing. Although this is a more
constrained environment, these testbeds are easier to access and all intended ISS test
sessions are first implemented on either the glass table or the flat floor.
Figure 1-9: Two SPHERES equipped with UDPs performing docking maneuver on-
board the ISS
There are three satellites aboard the ISS and three satellites in the SSL at MIT.
Each satellite is equipped with 12 CO2 thrusters that provide full translational and ro-
tational actuation. For ground-based testing, the satellites are placed on air carriages
30
that use CO2 to produce a thin film of air underneath the pucks. In this manner,
the satellites can translate in 𝑥 and 𝑦 and rotate about 𝑧 nearly frictionlessly. These
coordinates are defined in the body-fixed reference frame of each satellite. The origin
is defined as the geometric center of the satellite. The +𝑥 axis goes through the ex-
pansion port, +𝑦 is opposite of the control panel, and +𝑧 goes through the regulator
knob.
The satellites were designed to limit astronaut and research accessibility to only
the battery compartment, the CO2 tank, the expansion port, and the regulator
knob. The internal structure is an aluminum frame that all the internal devices
are mounted to. The external assembly is a polycarbonate shell, called out in Figure
1-10. The 12 thrusters operate based on on/off commands and offer full controllabil-
ity in six degrees-of-freedom. Each thruster produces a nominal force of 0.1 N, and
these thrusters are not throttleable. The satellite determines its metrology via the
Position and Attitude Determination System (PADS). Five ultrasound beacons are
wall-mounted about the test volume, and each satellite is equipped with ultrasound
receivers enabling global position knowledge. Additionally, each satellite has three
single-axis rate gyroscopes to measure body-axis angular rates and three single-axis
accelerometers to measure its linear acceleration. In this manner, each satellite is
controllable and observable.
Over the course of the satellites’ lifetime, several peripherals have been developed
and validated, expanding the capabilities of the satellites aboard the ISS. These pe-
ripherals include Halo, Universal Docking Port (UDP), and Visual Estimation for
Relative Tracking and Inspection of Generic Objects (VERTIGO). Halo is a struc-
tural attachment that expands the single expansion port of SPHERES to six expan-
sion ports, enabling a single satellite to use both UDP and VERTIGO at the same
time. The UDP is an attachment that permits unidirectional docking between two
satellites. Prior to the development of UDP, the satellites "docked" via Velcro straps.
With UDP, the satellites can autonomously dock and undock via the metal lance and
opening. The UDP is equipped with a photosensor that determines when the lance
is fully inserted. Then, a motor closes two metal cams around the lance, locking it in
31
Figure 1-10: Expanded view of SPHERES
place. Moreover, the UDP has a camera and fiducial marker parallel to the lance and
opening to enable autonomous docking maneuvers. Lastly, VERTIGO enables vision-
based navigation and estimation using a 1.2 GHz x86Linux computer and two stereo
cameras. These peripherals enable more science to be conducted with SPHERES but
also change the well-understood inertial properties of the satellites [30].
The SPHERES platform on ISS has been operating for 13 years and has almost
performed 110 test sessions. As a consequence of this usage, several thrusters across
the three satellites have become degraded. An analysis and initial attempt at a
workaround are documented in this thesis. It is also hypothesized that the knowledge
of inertial properties of the satellite with an attachment may be inaccurate based on
the poor test results yielded from autonomous docking tests. The inability for the
satellites to dock to one another may be a consequence of both these issues though.
In order to address the possibility of inaccurate knowledge of inertial properties of an
32
aggregated system, a controller resilient to mass properties for position and attitude
of a free-flyer was developed.
33
and an adaptive control methodology to overcome such uncertainties is presented.
Lastly, since active debris removal is a type of in-space close proximity missions are
a problem of interest, a fragile Target at risk of breaking apart further is the subject
of the beginning of Stage 3 – detumbling the uncooperative Target. Therefore, in
addition to modeling the docked dynamics of the aggregated system, two different
optimization methods are employed to minimize a cost function of both fuel and
imparted loads and moments via optimizing the angular acceleration profile.
• Using Chaser’s tracking error and information regarding the Target’s pose from
estimation
• While ensuring stability and both minimum fuel and minimum loads and mo-
ments imparted on the Target.
34
1.5 Thesis Roadmap
Six chapters constitute this thesis. Chapter 1 motivated the research documented
herein; provided a literature review of existing autonomous rendezvous and dock-
ing work; and outlined the research objective. Chapter 2 formulated the in-space
close proximity operations problem and gave an overview of the approaches em-
ployed. Chapter 3 detailed observations regarding existing trajectory optimization
research and described the framework for a trajectory propagator. Chapter 4 dis-
cussed an in-flight adaptive proportional-integral-derivative sliding mode controller
and the thruster degradation analysis of the SPHERES aboard the International
Space Station. Chapter 5 described modeling of contact dynamics from dancing, dy-
namics of two docked spacecraft, and the optimization of the detumbling procedure.
Lastly, Chapter 6 summarized the result of the aforementioned chapters and outlined
future work to be completed.
35
36
Chapter 2
Literature Review
37
as expected [34]. These examples of existing research in the literature made use of
offline methods that are too computational expensive to occur in-flight.
Research in the literature has also focused on employing path planning techniques
that can produce trajectories more rapidly. Virgili-Llop et al. presented an onboard
algorithm to capture a tumbling Target via solving a series of convex programming
problems [35]. Munoz developed a rapid path-planning algorithm for the terminal
approach trajectory via an adaptive artificial potential function methodology that
produced a near-optimal trajectory yielding a near-minimum time or fuel cost [36].
Moreover, Zappulla et al. validated a real-time trajectory planner for spacecraft ren-
dezvous via harmonic potential functions and an RRT* algorithm for fuel optimality
[37]. In addition to the aforementioned literature, research in the SSL at MIT has also
focused on developing and validating in-flight optimal trajectory planners. Sternberg
investigated the autonomous docking approach problem that is complicated by an
uncooperative and tumbling Target, uncertainty in the knowledge of the tumble, and
required the Chaser to use an accelerated approach trajectory. Sternberg produced
a computationally efficient solver for determining a fuel-optimal approach trajectory
robust against uncertainty in the Target’s tumble. This solver utilized a synchronous
R-bar (where R-bar is defined as the docking port axis) approach for docking with
the rigid body Target [38]. However, there were some fundamental issues with the
technique Sternberg employed that are discussed at length later in this thesis.
38
2.2.1 Sliding Mode Control
Adaptive control offers a set of control methods for handling uncertainty in either sys-
tem parameters or the control parameters. This uncertainty arises from both a lack
of knowledge and from a system whose parameters vary with time. Therefore, adap-
tive control techniques provide the means for performing online parameter estimation
39
that consequently decreases a controller’s tracking error [44]. A basic adaptive control
setup is displayed in Figure 2-1. Only nondual adaptive control techniques were con-
sidered for the research documented in this thesis. Such control techniques include
model reference adaptive control (MRAC), self-tuning control, gain scheduling, and
adaptive sliding mode.
Figure 2-1: Diagram of a generic adaptive control system configuration from Landau’s
textbook [44]
40
Figure 2-2: Diagram of a model reference adaptive control system
41
in several respects despite their varying motivations, as illustrated by their respective
block diagrams (Figures 2-2 and 2-3).
42
The adaptive control scheme employed and documented later in this thesis is
adaptive sliding mode control. Adaptive sliding mode control uses the sliding mode
variable previously described in combination with adaptation laws that fall out of Lya-
punov stability theory. Slotine and Coetsee detail how coupling adaptive control with
sliding mode control offers improved performance using the boundary layer concept to
limit control authority and chattering [54], [55]. Research furthering the robustness of
adaptive sliding mode control utilizes estimating the boundary of perturbations and
applying a low-pass filter in addition to the boundary layer described by Slotine [56].
Technical details of this type of controller and a derivation of necessary adaptation
laws is discussed in Chapter 4.
Formation flying has motivated the research to develop methods for persisting through
sensor or actuator failures. Godard and Kumar develop and present two adaptive
fault-tolerant control laws – continuous sliding mode and nonsingular terminal slid-
ing mode – as a software solution to an onboard sensor and actuator failure in order
to maintain a spacecraft clusters ability to fly in formation. They show via sim-
ulation that both methodologies were able to stabilized the formation and execute
maneuvers despite the failures; specifically, the nonsingular terminal sliding mode
had a faster convergence rate, was more effective in minimizing the tracking erros,
and limited fuel consumption compared to the continuous sliding mode [57]. Li et al.
demonstrate the robustness of a second-order sliding mode control algorithm against
sensor and actuator failure but with limited performance [58]. Moreover, Hu and Xiao
apply a sliding mode controller to a flexible spacecraft experiencing actuator loss-of-
effectiveness and demonstrate its ability to recover from the fault and achieve mission
objectives [59]. Henceforth, the existing literature suggests sliding mode control is a
promising method for stabilizing a spacecraft under actuator loss-of-effectiveness.
43
2.4 Soft Docking & Stabilization of a Tumbling
Target
At the end of the terminal approach stage (Stage 2) of ROAM occurs the soft dock,
after which both spacecraft act as a single system. Sternberg’s soft dock stage contin-
ued with the approach along the Target’s R-bar and assumed a mechanical clasping
between the docking ports of the Chaser and the Target [38]. Contrastingly, the
Orbital Express Demonstration System used a robotic arm to capture its stable and
cooperative Target and berth it to the Chaser for servicing [12]. Similarly, the Japan
Aerospace Exploration Agency’s Kounotori Integrated Tether Experiment is a low-
cost active debris removal system that uses an electrodynamic tether to capture an
object of debris and deorbit it [60]. Nguyen-Huynh developed an adaptive algorithm
for a space manipulator during the capture of an unknown, tumbling, rigid object to
create a reactionless motion, thus, perturbing the base of the manipulator minimally
during the transient period between capture and stabilizing the Target [61]. Zhang et
al. utilized an inter-satellite electromagnetic force and proposed a nonlinear 6-DOF
control (via linear quadratic regulator and an extended state observer) coupled with
the method of soft docking [62]. These different methods are appropriate for their
relative missions of capturing and becoming one system with a rigid Target.
Once a Chaser has docked to an uncooperative and tumbling Target, the Chaser
must stabilize the tumble that is occurring. Katz investigated the stabilization of an
uncooperative, flexible Target in 2D using an adaptive control law, which had better
performance than a PD controller and partial feedback linearization controller [63].
Aghili presented a closed-form solution for time-optimal controlling of a tumbling,
rigid Target that satisfied a constraint to maintain the norm of the braking torques
below a specified value correlating to the limits of an actuator’s torque [64]. Avanzini
and Giuletti developed a B-dot control law to detumble a spacecraft solely using mag-
netic actuators and confirmed its validity and convergence via Monte Carlo analysis
[65]. Coverstone-Carroll discussed a variable structure controller used to detumble
underactuated spacecraft, validated through detumbling simulations [66]. Several of
44
these methods have been posed as detumbling means for a spacecraft to detumble
itself, rather than for a Chaser docked to a Target and needing to detumble the ag-
gregated system. The same methodologies can be applied to this scenario. However,
the primary concern would be the limited actuator force available to the Chaser since
the Target is assumed to be uncooperative.
45
46
Chapter 3
Trajectory Optimization
This chapter will focus on the trajectory optimization approach of the in-space close
proximity operations mission (i.e. Stage 2 of ROAM). Stage 2 is the terminal ap-
proach to soft docking that begins when the Chaser is approximately 10 meters from
the Target spacecraft. It occurs after the angles-only rendezvous that gets the Chaser
into the desired proximity of the Target before a terminal approach with an end state
of the Chaser docking to or grappling the Target. An expansion of previous trajec-
tory optimization research was attempted, but that attempt led to some noteworthy
observations of the previous work, documented in this chapter. Additionally, the at-
tempt at the expansion resulted in a software framework for finding the waypoints of
a trajectory by propagating a given differential equation.
The Chaser approaches the Target along its R-bar, maintaining a synchronous radial
approach to the Target’s docking port. In the context of this chapter, R-bar refers to
the body-fixed, radial axis of the Target’s docking port expressed in the UDP reference
frame. In discussing the dynamics of the Chaser and Target, four reference frames are
used – INT, the inertially-fixed frame; TAR, the Target’s body-fixed frame centered
at its center of mass; UDP, the body-fixed frame located at the docking port’s lance;
and CHA, the body-fixed frame of the Chaser centered at its center of mass. These
47
reference frames are illustrated in Figure 3-1.
It is assumed that the Target is tumbling and uncooperative. The Chaser de-
termines the Target’s orientation and rotation rate via a model delivered by the
estimation stage of the mission. Additional assumptions include rigid body dynamics
and that the Chaser has full control authority to translate and rotate. This stage
begins when the Chaser is relatively close to the Target (on the order of magnitude
of 10 meters away) and has zero initial velocity.
1. All possible tumbles are a function of inertia ratios and angular rate components;
therefore, a minimum parametrization exists.
48
2. A fuel optimal approach is analogous with the tangential and radial acceleration
components of a trajectory being equivalent between initial and final transients.
The first hypothesis is well supported by Sternberg [38]; the second and third hy-
potheses will be discussed in-depth here. Following Sternberg’s optimization process
detailed in his thesis and illustrated by Figure 3-2, the following plots were produced
using a final time array of [1, 20, 33, 55, 240] seconds. The spacecraft has an inertia
ratio of [1, 1, 1] and an angular velocity of [0, 0, 5] deg
s
. The optimization options uti-
lized were: OptimalityTolerance = 1e-3, MaxFunctionEvaluationss = 1e6,
MaxIterations = 1e7, StepTolerance = 1e-8, and Algorithm = 'sqp'. Two
of the primary functions for running this optimization are included in this thesis in
Appendix A.1. Contact the author for access to the numerous supporting functions.
49
Figure 3-3: Δ𝑉 of five trajectory optimizations with fixed final time
⃗˙ 𝐼𝑁
Angular: ⃗𝑎𝑎𝑛𝑔 = 𝜔 𝑇 𝐴𝑅
𝑟𝑇𝐶𝐻𝐴
𝑇 ×⃗ 𝐴𝑅 (3.1c)
𝑇 𝐴𝑅
Coriolis: ⃗𝑎𝑐𝑜𝑟 = 2(⃗𝜔𝐼𝑁 𝑟˙𝑇𝐶𝐻𝐴
𝑇 ×⃗ 𝐴𝑅 ). (3.1d)
The radial acceleration components are the linear and centripetal accelerations and
the tangential acceleration components are angular and Coriolis.
50
In Figure 3-4, the Euclidean norm of each component as a fraction of the Euclidean
norm of the total acceleration is represented. Since the Target is in a flat spin with
angular velocity [0, 0, 5] deg
s
, the angular acceleration component is zero throughout
⃗˙ 𝐼𝑁
the time duration since 𝜔 𝑇 𝐴𝑅 ⃗
𝑇 (𝑡) = 0. The time histories of the remaining three
acceleration components differ based on the fixed final time inputted in the trajectory
optimization for minimizing Δ𝑉 . The corresponding Δ𝑉 is labeled at the top of each
plot.
Figure 3-5 illustrates the sum of the radial acceleration components with respect
to the sum of the tangential acceleration components. According to the second hy-
pothesis, these sums should be equivalent between initial and final transients for the
fuel-optimal trajectory. The lowest Δ𝑉 cost is when 𝑡𝑓 = 33 seconds, corresponding
to Figure 3-6c. Clearly, the radial and tangential accelerations are not equivalent;
however, that may be a consequence of the optimization setup. Thus far, Stern-
berg’s results supporting his second hypothesis have not been able to be reproduced,
which is a matter that requires further investigation to yield any decisive conclusions.
51
Regardless, these plots display a sum of the norms of the acceleration components
rather than a comparison of the vector elements. A comparison of the vector ele-
ments of the acceleration components is a more physically intuitive relationship to
turn to in hopes of deriving any physical relationship between fuel optimality and the
acceleration components.
Figure 3-5: Sum of Euclidean norm of radial and tangential acceleration components
as fraction of the Euclidean norm of total acceleration
It is evident in Figure 3-6 that it is impossible for the vector tangential acceleration
to be equivalent to the vector radial acceleration, regardless of if the trajectory is fuel-
optimal or not. For a synchronous radial approach, the Chaser is along the Target’s
R-bar corresponding to its docking port axis. Thus,
⎡ ⎤
¨ ⎥
⎢ 𝑥
⎢ ⎥
⃗𝑎𝑙𝑖𝑛 = ⃗𝑟¨𝑇𝐶𝐻𝐴
𝐴𝑅 = ⎢ ⎥. (3.2)
⎢ 0 ⎥
⎢ ⎥
⎣ ⎦
0
52
The centripetal acceleration for a flat spin is calculated as
𝑇 𝐴𝑅 𝑇 𝐴𝑅
⃗𝑎𝑐𝑒𝑛𝑡 = 𝜔
⃗ 𝐼𝑁 𝑇 × (⃗
𝜔𝐼𝑁 𝑟𝑇𝐶𝐻𝐴
𝑇 ×⃗ 𝐴𝑅 ) (3.3a)
⎛⎡ ⎤ ⎡ ⎤⎞
⎜⎢ 0 ⎥ ⎢ 𝑥 ⎥⎟
⎜⎢ ⎥ ⎢ ⎥⎟
𝑇 𝐴𝑅
⃗𝑎𝑐𝑒𝑛𝑡 = 𝜔
⃗ 𝐼𝑁 𝑇 × ⎜⎢
⎜⎢ 0 ⎥×⎢
⎥ ⎢
0 ⎥
⎥⎟
⎟ (3.3b)
⎜⎢ ⎥ ⎢ ⎥⎟
⎝⎣ ⎦ ⎣ ⎦⎠
𝜔𝑧 0
⎡ ⎤ ⎡ ⎤ ⎡ ⎤
2
⎢ 0 ⎥ ⎢ 0 ⎥ ⎢ −𝜔𝑧 𝑥 ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ 0 ⎥ × ⎢ 𝜔𝑧 𝑥
⃗𝑎𝑐𝑒𝑛𝑡 = ⎢ =⎢ 0 (3.3c)
⎥ ⎢ ⎥ ⎥
⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎣ ⎦ ⎣ ⎦ ⎣ ⎦
𝜔𝑧 0 0
Therefore, the radial acceleration components (linear and centripetal) are only nonzero
in 𝑥. It has been established that the angular acceleration is zero for all time
(⃗𝑎𝑎𝑛𝑔 = ⃗0). The Coriolis acceleration is displayed in the following equations.
𝑇 𝐴𝑅
⃗𝑎𝑐𝑜𝑟 = 2(⃗𝜔𝐼𝑁 𝑟˙𝑇𝐶𝐻𝐴
𝑇 ×⃗ 𝐴𝑅 ) (3.4a)
⎡ ⎤
⎢ 0 ⎥
⎢ ⎥
⃗𝑎𝑐𝑜𝑟 = ⎢
⎢ 𝜔𝑧 𝑥˙
⎥
⎥ (3.4b)
⎢ ⎥
⎣ ⎦
0
Hence, the tangential acceleration is only nonzero in 𝑦. Since the elements of the
vectors are not equivalent, it cannot be deduced that the tangential and radial accel-
eration vectors are equivalent for a fuel-optimal trajectory.
The last set of plots (Figure 3-6) were not presented in Sternberg’s Sc.D. thesis –
the vector representation of the radial and tangential accelerations were not shown.
The plots in Figure 3-6 indicate that the elements of the radial and tangential ac-
celerations are not equivalent for any of the optimizations. In the absence of this
information, Sternberg developed his third hypothesis that the first two hypotheses
lead to a reduction in optimization complexity. The reduction he refers to is a vector
second order differential equation equating the tangential and radial accelerations,
shown in Equation 3.5 (equivalent representation in Equation 3.6). The appealing
53
(a) 𝑡𝑓 = 1 s (b) 𝑡𝑓 = 20 s (c) 𝑡𝑓 = 33 s
Figure 3-6: Vector elements of acceleration components for each generated trajectory
nature of this hypothesis was that a second order differential equation is more com-
putationally efficient to solve in-flight than an optimization. Therefore, while the
equation was promising in terms of in-flight feasibility, it is fundamentally incorrect.
(︁ )︁
⃗𝑟¨𝑇𝐶𝐻𝐴
𝐴𝑅 + 𝜔
𝑇 𝐴𝑅
⃗ 𝐼𝑁 𝑇 × 𝜔
𝑇 𝐴𝑅
⃗ 𝐼𝑁 𝑟𝑇𝐶𝐻𝐴
𝑇 ×⃗ ⃗˙ 𝐼𝑁
𝐴𝑅 = 𝜔
𝑇 𝐴𝑅
𝑟𝑇𝐶𝐻𝐴
𝑇 ×⃗ 𝐴𝑅 + 2(⃗
𝑇 𝐴𝑅
𝜔𝐼𝑁 𝑟˙𝑇𝐶𝐻𝐴
𝑇 ×⃗ 𝐴𝑅 ) (3.5)
To further illustrate that this equation does not produce a fuel-optimal, radial
synchronous approach from the Chaser to the Target, a simple simulation was exe-
cuted via MATLAB’s ode45. The right-hand side function is shown in Listing 3.1
with the angular velocity hard-coded since the example is a flat spin case and the
angular acceleration is zero.
54
⎡ ⎤
⎢ 0 −𝜔3 𝜔2 ⎥
⎢ ⎥
¨𝐶𝐻𝐴
I3⃗𝑟𝑇 𝐴𝑅 − 2 ⎢
⎢
𝜔3 0
⎥ ˙ 𝐶𝐻𝐴
−𝜔1 ⎥ ⃗𝑟 + ...
⎢ ⎥ 𝑇 𝐴𝑅
⎣ ⎦
−𝜔2 𝜔1 0
⎡ ⎤
⎢ −𝜔32 − 𝜔22 𝜔˙ 3 + 𝜔1 𝜔2 −𝜔˙ 2 + 𝜔1 𝜔3 ⎥
⎢ ⎥
⎢
−𝜔˙ 3 + 𝜔1 𝜔2 −𝜔12 − 𝜔32
⎥ 𝐶𝐻𝐴
𝜔˙ 1 + 𝜔2 𝜔3 ⎥ ⃗𝑟 = ⃗0 (3.6)
⎥ 𝑇 𝐴𝑅
⎢
⎢
⎣ ⎦
𝜔˙ 2 + 𝜔1 𝜔3 −𝜔˙ 1 + 𝜔2 𝜔3 −𝜔12 − 𝜔22
Listing 3.1: Right-hand side function for call to ode45 to demonstrate the second-
order differential equation
1 function zdot = RHS(t,z)
2 omega_TAR_INT=deg2rad( 5/norm([0 0 1])*[0 0 1]');
3 w1 = omega_TAR_INT(1); w2 = omega_TAR_INT(2); w3 = omega_TAR_INT(3);
4 w1dot = 0; w2dot = 0; w3dot = 0;
5
9 B = 2*w_skew;
10 C = (wdot_skew - w_skew*w_skew);
11
12 A = [zeros(3), eye(3);
13 C B];
14
15 zdot = A*z;
The initial translational position was [10, 0, 0] and the initial translational velocity
was [0, 0, 0]. The simulation was run for 100 seconds and produced the following
trajectory in Figure 3-7. The trajectory spirals away from the Target at (0, 0). This
example shows that Equation 3.5 does not produce a synchronous radial approach
for a Chaser with respect to a tumbling Target.
55
Figure 3-7: Chaser’s trajectory from call to ode45 using Listing 3.1
56
software, (3) determines the Chaser’s final position of the end of the approach, (4)
backwards propagates the differential equation from the final position, and then (5)
radially shifts the trajectory of waypoints such that the initial position aligns with
the Chaser’s current position. This all occurs before the Chaser aligns itself with the
Target’s R-bar and begins the approach. The propagator architecture is encompassed
in the file propagator.c, shown in Appendix A.3.
Figure 3-8 illustrates the necessary initial conditions for starting the propagator: (1)
the Chaser is at the desired radial length from the Target, and (2) the Chaser is along
the Target’s R-bar. If provided with a model of the Target’s rotation, the propagator
can use this information for identifying intersections of the Target’s R-bar with the
Chaser at the desired radial length. Alternatively, if the Chaser is not approaching in
the correct plane, this step also identifies the future intersection location that requires
minimal state change for the Chaser.
Provided with a model of the Target’s rotation based on the Chaser’s estimation
capabilities, the Chaser can create a future history of the Target’s rotation (Figure
3-9). This future history is multiplied by 180 deg about the Target’s docking axis and
is compared with the Chaser’s static quaternion. When the difference between these
two quaternions is zero, the Chaser will be aligned with the Target’s R-bar for the
associated points in time. For example, if the Target’s docking port is on its x-axis,
the propagator finds the quaternion rotated about the z-axis via Equation 3.7.
*,𝐶𝐻𝐴 𝑇 𝐴𝑅
𝑞𝐼𝑁 𝑇 = 𝑞𝐼𝑁 𝑇 ⊗ [0, 0, −1, 0] (3.7)
*,𝐶𝐻𝐴 0,𝐶𝐻𝐴
The times associated with the minimum of 𝑞𝐼𝑁 𝑇 − 𝑞𝐼𝑁 𝑇 indicate the future
intersection times – these are the times in which the Chaser should start moving
synchronously with the Target’s R-bar. The times associated with the intersection
locations are graphically illustrated in Figure 3-9. In the current implementation of
the propagator architecture, the propagator develops a future history rotation model
57
Figure 3-8: Illustrating the necessary initial conditions for the propagator i.e. the
Chaser is at the desired radius and the Chaser is along the Target’s R-bar
Figure 3-9: Timeline illustrating the Chaser’s intersections with the Target’s R-bar
at the desired initial radial length away from the Target
of the Target in the absence of the estimation software. Therefore, instead of com-
paring the Chaser’s quaternion with each future Target quaternion, the propagator
⃒ ⃒
*,𝐶𝐻𝐴 *,𝐶𝐻𝐴 0,𝐶𝐻𝐴 ⃒
identifies the value of 𝑞𝐼𝑁 𝑇 and checks at 1 Hz if ⃒⃒𝑞𝐼𝑁 𝑇 − 𝑞𝐼𝑁 𝑇 ⃒ < 𝛿, where 𝛿 is
58
3.3.2 Forward Propagation
For the full in-space close proximity operations mission, the estimation portion of the
software infrastructure will work in-the-loop with this trajectory generator. Based
on its observations, it will develop a rotation model of the Target that includes the
expected future 𝜔 ⃗˙ , 𝑞, 𝑞.
⃗,𝜔 ˙ In the absence of that rotation model, the propagator
currently creates its own forward propagation of the Target (up to three periods)
based on the Target’s current rotation rate. This forward propagation is graphically
depicted by Figure 3-10.
Figure 3-10: Forward propagate Target’s orientation and rotation rate for 𝑛 periods
The future estimates of the Target’s rotation are found by numerically solving the
following equations for up to three periods of rotation.
⃗˙ 𝐼𝑁
𝜔 𝑇 𝐴𝑅
𝑇 = 𝐼
−1 𝑇 𝐴𝑅
(𝑀 − (⃗𝜔𝐼𝑁 𝑇 × 𝐼⃗
𝑇 𝐴𝑅
𝜔𝐼𝑁 𝑇 )) (3.8a)
⎛⎡ ⎤ ⎞
𝑇 𝐴𝑅
𝑇 𝐴𝑅 1 ⎜⎢ 𝜔
⃗ 𝐼𝑁 𝑇 ⎥ 𝑇 𝐴𝑅 ⎟
𝑞˙𝐼𝑁 𝑇 = ⎝⎣ ⎦ ⊗ 𝑞𝐼𝑁 𝑇 ⎠ (3.8b)
2 0
𝑇 𝐴𝑅 𝑇 𝐴𝑅
For each time step, Euler integration solves the associated 𝜔
⃗ 𝐼𝑁 𝑇 and 𝑞𝐼𝑁 𝑇 values. At
the end of this step in the propagator architecture, there are three periods worth of
𝑇 𝐴𝑅 ˙ 𝑇 𝐴𝑅 𝑇 𝐴𝑅 𝑇 𝐴𝑅
future estimates of 𝜔
⃗ 𝐼𝑁 𝑇, 𝜔
⃗ 𝐼𝑁 𝑇 , 𝑞𝐼𝑁 𝑇 , and 𝑞˙𝐼𝑁 𝑇 .
If the Target has a complex tumble, it may take more than one period of rotation for
the Chaser to be able to dock to it. However, for flat spins, the Chaser should be able
to dock to the Target in less than one period of rotation. Based on this information,
59
a desired final time (𝑡𝑓 ) is selected. The corresponding final Target quaternion is
𝑇 𝐴𝑅
𝑞𝐼𝑁 𝑇 (𝑡𝑓 ). Therefore, the corresponding final position of the Chaser is determined by
𝐶𝐻𝐴 𝑇 𝐴𝑅
⃗𝑟𝐼𝑁 𝑇 (𝑡𝑓 ) = 𝐷𝐶𝑀 (𝑞𝐼𝑁 𝑇 (𝑡𝑓 ))⃗
𝑟𝑠𝑡𝑎𝑛𝑑𝑜𝑓 𝑓 (3.9)
where ⃗𝑟𝑠𝑡𝑎𝑛𝑑𝑜𝑓 𝑓 is the user-defined desired position away from the Target at 𝑡𝑓 . The
variable 𝐷𝐶𝑀 denotes the operation that yields a direction cosine matrix provided
a quaternion. The relative position of the Chaser to the Target is
⃗𝑟𝑇𝐶𝐻𝐴 𝑇 𝐴𝑅
𝐴𝑅 (𝑡𝑓 ) = 𝑞𝐼𝑁 𝑇 (𝑡𝑓 ) ⊗ ⃗
𝐶𝐻𝐴
𝑟𝐼𝑁 𝑇 (𝑡𝑓 ) (3.10)
The final position of the Chaser relative to the Target is a necessary boundary con-
dition for the following step.
Now that the necessary boundary conditions have been determined, ⃗𝑟𝑇𝐶𝐻𝐴 𝑟𝑇𝐶𝐻𝐴
𝐴𝑅 (0), ⃗ 𝐴𝑅 (𝑡𝑓 ),
⃗𝑟˙𝑇𝐶𝐻𝐴
𝐴𝑅 (𝑡𝑓 ) = 0, the backwards propagation – the part of the propagator software that
generates the trajectory – is ready to be utilized. This part of the software is currently
implemented as a C-function named propagateToTarget and takes eight arrays as
inputs. These inputs are described in Table 3.1; the "to-be-trimmed" arrays are short-
ened to match the filled-in length of the future Target histories since all arrays were
initialized with a length of 2000.
After trimming the quaternion and denoting the index corresponding to the filled-
in length, the function uses ctrlState and tgtState to compute the Chaser’s position
relative to the Target at the current time step. The expected final Target quaternion is
converted to a direction cosine matrix and is multiplied by the desired radial standoff
of the Chaser during the last time step. The resulting array is the desired ⃗𝑟𝑓 of the
Chaser with respect to the inertial frame.
Having denoted the desired final position and the initial position, the function
enters into a while loop that it can only exit once the radial position is greater
60
Table 3.1: Inputs to propagateToTarget function with descriptions
than 𝑟0 (the initial radial distance between the Target and Chaser) or the counter of
iterations has exceeded the user-defined maximum. The procedure that occurs in the
while loop is
2. The skew symmetric matrices for the Target’s angular velocity and angular
acceleration are constructed.
𝐵 = 2𝜔× (3.11a)
𝐶 = 𝜔˙ × − 𝜔× 𝜔× (3.11b)
⎡ ⎤
0 I ⎥
𝐴=⎢
⎣ ⎦ (3.11c)
𝐶 𝐵
61
4. The state vector ⃗𝑥 is populated using the current iteration of the Chaser’s posi-
[︁ ]︁ 𝑇
𝐶𝐻𝐴 ˙ 𝐶𝐻𝐴
tion and velocity with respect to the inertial frame, such that ⃗𝑥 = ⃗𝑟𝐼𝑁 𝑟𝐼𝑁 𝑇 .
𝑇 ,⃗
5. The computation ⃗𝑥˙ = 𝐴⃗𝑥 occurs to populate ⃗𝑥˙ . Euler integration then creates
𝐶𝐻𝐴
an updated ⃗𝑟𝐼𝑁 𝑟˙𝐼𝑁
𝑇 and ⃗
𝐶𝐻𝐴
𝑇 .
𝑟𝑇𝐶𝐻𝐴 𝐼𝑁 𝑇 𝐶𝐻𝐴
𝐴𝑅 = 𝑞𝑇 𝐴𝑅 ⊗ 𝑟𝐼𝑁 𝑇 (3.12a)
𝑟˙𝑇𝐶𝐻𝐴 𝐼𝑁 𝑇 𝐶𝐻𝐴
𝐴𝑅 = 𝑞𝑇 𝐴𝑅 ⊗ 𝑟˙𝐼𝑁 𝑇 (3.12b)
62
Figure 3-11: Generated trajectory yielded from 𝑡𝑓 from forward propagation prior to
radial shift to align initial position with Chaser’s current position
𝐴
𝐴^ = (3.13a)
||𝐴||
^= 𝐵
𝐵 (3.13b)
||𝐵||
2. Calculate the dot product and the magnitude of the cross product of the unit
vectors.
𝐴^ · 𝐵
^ = 𝑎1 𝑏 1 + 𝑎2 𝑏 2 + 𝑎3 𝑏 3 (3.14a)
⎡ ⎤
⎢ 𝑎2 𝑏 3 − 𝑎3 𝑏 2 ⎥
⎢ ⎥
𝐴^ × 𝐵
^= 𝑎3 𝑏 1 − 𝑎1 𝑏 3 ⎥ (3.14b)
⎢ ⎥
⎢
⎢ ⎥
⎣ ⎦
𝑎1 𝑏 2 − 𝑎2 𝑏 1
√︁
||𝐴^ × 𝐵||
^ = (𝑎2 𝑏3 − 𝑎3 𝑏2 )2 + (𝑎3 𝑏1 − 𝑎1 𝑏3 )2 + (𝑎1 𝑏2 − 𝑎2 𝑏1 )2 (3.14c)
63
3. Construct the matrix 𝐺.
⎡ ⎤
⎢ 𝐴^ · 𝐵
^
−||𝐴^ × 𝐵||
^ 0 ⎥
⎢ ⎥
𝐺=
⎢
⎢ ^ ^
||𝐴 × 𝐵|| ^
𝐴·𝐵 ^ 0 ⎥
⎥
(3.15)
⎢ ⎥
⎣ ⎦
0 0 1
[︂ ]︂−1
^ 𝐴·^ 𝐵)
^ 𝐴^
𝐹 = 𝐴^ 𝐵−(
^ 𝐴·
||𝐵−( ^ 𝐵)
^ 𝐴||
^ 𝐴^ × 𝐵
^ (3.16)
Figure 3-12: Generated trajectory after radial shift with initial position aligned with
Chaser’s current position
This is repeated for each position in the radial profile array and is the final output
for the propagateToTarget function. Figure 3-12 illustrates the radially-shifted
trajectory. Figure 3-13 depicts what this radial shift means in the scheme of the
64
timeline of the synchronous radial approach. This radially-shifted trajectory is used
as a series of commanded positions for the Chaser to follow along with the velocity
profile that commands the corresponding velocities at each position.
Figure 3-13: Illustration of timeline shift after shifting the radial approach to align
with the Chaser’s current position
65
66
Chapter 4
The motivation for the topics discussed in this chapter is the inability for the SPHERES
to dock to one another with the UDPs attached aboard the ISS. Moreover, this is-
sue is relevant to the ROAM project as a practical application to one of the three
reference missions – active debris removal. Realistically, an effective active debris
removal effort will involve interacting with unknown Targets or Targets whose well-
characterized properties will have changed due to collisions with other debris. This
chapter first discusses the test design, results, and analysis of thruster characteriza-
tion for the SPHERES free-flyers on the ISS. Second, this chapter provides a detailed
description of an adaptive controller robust to uncertainty in knowledge of inertial
properties.
67
favored possibilities for what is causing the issue: 1) the inertial properties of the
aggregated system are incorrect and/or 2) the thrusters have degraded significantly
enough that it is causing nontrivial performance issues. This section will focus on the
investigation into possible thruster degradation on the satellites on station.
The thruster dance – a series of commanded thrusts used to characterize the cur-
rent performance – was conducted as Test 18 on Test Session 97 (TS97) using the
SPHERES platform on the ISS. The thruster dance consisted of pulsing each thruster
individually and then the pairs that create torques for three time segments: 50 ms,
100 ms, and 200 ms. As mentioned previously, each satellite has 12 thrusters and are
indexed from 0 to 11. The location of each thruster is indicated by its index on Figure
4-1. The thruster force and torque directions (and torque couplings) are shown in
Table 4.1.
Figure 4-1: Location and indices of thrusters on satellite with noted exhaust direction
The raw data from this test is shown in the following Figures 4-2a and 4-2b. To
better understand and gauge if each thruster is producing a similar level of thrust,
the raw accelerometer data was separated by axis and by the duration of the thrust
impulse.
Figures 4-3a and 4-3b are a series of segregated data plots, separated by satellite,
by direction, and by impulse series. The associated thruster with a commanded
68
Table 4.1: Thruster force and torque directions in SPHERES body-fixed frame
Raw IMU data for Sphere logical ID 1 Raw IMU data for Sphere logical ID 1
0.1 0.1
Accelerometers [m s -2 ]
Accelerometers [m s -2 ]
x x
y y
0.05 z
0.05 z
0 0
-0.05 -0.05
-0.1 -0.1
10 20 30 40 50 60 70 10 20 30 40 50 60 70
0.2 0.2
Gyroscopes [rad/s]
Gyroscopes [rad/s]
0.1 0.1
0 0
x x
-0.1 y -0.1 y
z z
-0.2 -0.2
10 20 30 40 50 60 70 10 20 30 40 50 60 70
Test time, s Test time, s
Figure 4-2: Thruster characterization: raw accelerometer and gyroscope data from
IMU in test session 97
impulse is denoted on each plot by its thruster index (described in Table 4.1). There
are significant spikes in data associated with another thruster’s impulse – this is a
consequence of the impulse ringing the system and can effectively be ignored.
The 200 ms accelerometer data provides the cleanest impulse image; the following
deductions are based off of the 200 ms plots (Figures 4-3a and 4-3b). Qualitatively,
half of the thrusters produce a similar impulse in both Blue and Orange. Orange’s
thrusters 0, 6, and 7 produce an impulse larger than their counterparts on Blue; Blue’s
69
Z-Accelerometers [m s -2 ]Y-Accelerometers [m s -2 ] X-Accelerometers [m s -2 ]
0 0
-0.05 6 7 -0.05 6 7
38 40 42 44 46 48 38 40 42 44 46 48
0.05 2 3 0.05 2 3
0 0
-0.05 8 9 -0.05 8 9
38 40 42 44 46 48 38 40 42 44 46 48
0.05 4 5 0.05 4 5
0 0
-0.05 10 11 -0.05 10 11
38 40 42 44 46 48 38 40 42 44 46 48
Test time, s Test time, s
Methodology
70
its satellite number. The accelerometer data was interpolated to match the length
of the gyroscope data and both accelerometer and gyroscope data were smoothed.
The thruster commands were extracted from the test data, as well, – the thruster
commands are a series of on and off commands to each thruster. Based on this
information, time history vectors of when the thrusters were commanded on were
constructed for each satellite. The function then determines the maximum pulse
length across all the thrusters to use for extracting each pulse. It does so by identifying
six stages of the pulse: pre-pulse start, pre-pulse end, during pulse start, during pulse
end, post-pulse start, and post-pulse end. The user is then presented with a series of
plots of the accelerometer data and is asked to select the start and end of the peak of
the impulse (the pulse period). Contrastingly, the function uses the gyroscope data
without user input.
The function pulse_extraction.m determines acceleration, angular accelera-
tion, angular velocity, and change in angular velocity. The average of the accelerom-
eter data in the user-selected pulse period is the acceleration (⃗𝑎𝑚𝑒𝑎𝑠 ). The angular
acceleration (⃗
𝛼) is determined as the difference between the final gyroscope data and
the initial gyroscope data divided by the time period during the user-selected pulse
period. The angular velocity (⃗𝜔 ) is simply the average of the gyroscope data, and the
change in the angular velocity (Δ⃗𝜔 ) is the average of the difference of gyroscope data
before the pulse and after. This information is stored in a struct for each pulse for
each thruster and outputted as a .mat file for each satellite.
The function process_pulses_sph.m takes in the pulse .mat files that were
created in pulse_extraction.m and outputs the force of each thrusters for each
satellite. In order to find the force 𝐹𝑡ℎ𝑟𝑢𝑠𝑡 = 𝑚 *⃗𝑎, ⃗𝑎 must be computed. The function
iterates through each pulse and separates this problem into solving for the acceleration
in each direction. Thus, for each pulse (𝑝), the following is computed (using only the
𝑥-direction in this example):
71
where row 1 of 𝐴𝑥 (𝑝, :) corresponds to the 𝑥-direction and the columns correspond to
thrusters acting in 𝑥, 𝐴𝑡ℎ𝑟𝑢𝑠𝑡 ∈ R3×12 with a 1 corresponding to the thruster direction
and zeros otherwise, 𝛼× is the skew symmetric matrix of 𝛼
⃗ 𝑝 from pulse_extraction.m,
𝜔 × is the skew symmetric matrix of Δ⃗𝜔
2 𝑝
from pulse_extraction.m, and ⃗𝑟𝑔𝑐,𝑥 is the
position of the 𝑥-axis accelerometer in SPHERES. Once each pulse is looped through,
there are three completed matrices (𝐴𝑥 , 𝐴𝑦 , 𝐴𝑧 ∈ R12×4 ) and three completed vectors
(𝑏𝑥 , 𝑏𝑦 , 𝑏𝑧 ∈ R12×1 ). The calculated acceleration is found via
𝑥¨ = 𝐴−1
𝑥 𝑏𝑥 ∈ R
4×1
(4.2)
where the first two elements correspond to the thruster’s imparted force and the
second two elements correspond to the thruster’s imparted torque. This calculation
occurs for each direction and the first two elements are extracted into a vector of
forces associated with the corresponding thruster indices. Additionally, 𝐴𝑥 , 𝐴𝑦 , 𝐴𝑧 ,
𝑏𝑥 , 𝑏𝑦 , 𝑏𝑧 , 𝑎𝑚𝑒𝑎𝑠 , 𝛼𝑚𝑒𝑎𝑠 , and 𝜔𝑚𝑒𝑎𝑠 are placed in a struct and are outputs of this
function.
Lastly, the function plot_pulses.m takes the results struct created in
process_pulses_sph.m and plots the thruster force for each satellite according to
thruster index. If the user has low confidence in the result for a thruster or for a
handful but does not wish to re-do the entire extraction process, they can utilize
revise_pulses.m and re-extract and re-process a selected number of pulses.
Results
Using the aforementioned MATLAB functions and test data from Test 18 in TS97,
Figure 4-4 was produced. It is evident that each satellite has thrusters that are per-
forming poorly. Each computed thruster force and the ratio of computed to expected
is shown in Table 4.2. (Note: the expected thruster force is 0.098 N.) Ratios of less
than 0.5 are highlighted in red on the table and ratios between 0.5 and 0.75 are high-
lighted in yellow. Of note are the thrusters whose performance is denoted by the
red.
72
Thruster Force
0.1
0.09
0.08
0.07
0.06
Thrust [N]
0.05
0.04
0.03
0.02
0.01
Blue
Orange
0
0 1 2 3 4 5 6 7 8 9 10 11
Thruster Number
Figure 4-4: Calculated force magnitude of each thruster on Blue and Orange satellites
For Blue, this means that two +𝑦 torques, two −𝑥 forces, one +𝑥 force, and one
−𝑦 torque are performing poorly. For Orange, this indicates that one −𝑧 torque, one
+𝑧 torque, one −𝑦 force, and one +𝑦 force are under-performing. These results are
concerning since they imply that the satellites have an insignificant amount of control
authority in the noted directions. Based on these conclusions, a maintenance session
was designed to perform a thruster characterization test for Blue, Orange, and Red in
addition to testing new mixers (via a handful of translational and attitude sequences)
the SPHERES team designed based on knowledge of thruster characterization before
the session.
Three types of tests were designed and run during the maintenance session: open-loop
thruster characterizations, closed-loop translational and orientation maneuvers with
new mixers, and a thruster manifold test. For this test session, three satellites were
used (Blue, Orange, Red). The goals of the maintenance session were threefold:
(1) to produce a secondary thruster characterization for Blue and Orange and a
73
Table 4.2: Calculated thruster forces for each satellite and ratios of calculated thruster
force divided by expected force for each satellite
primary one for Red since it had not been utilized in several years
(2) to evaluate the performance of new mixers designed for each satellite based on
previous thruster characterization
(3) to evaluate if the thruster manifolds in each satellite were behaving as expected.
In this section, the first two points are discussed but no analysis has occurred for
the thruster manifold test at this time. This maintenance session occurred as Test
Session 101 (TS101) in June 2018 and consisted of 16 tests, described in Table 4.3.
Thruster Characterization
Tests 1-9 were simply thruster characterization tests split into the separate planes and
for three different lengths of time: 50 ms, 100 ms, and 200 ms. The SPHERES team
performed the analysis on the resulting sets of data using the functions described
in Section 4.1.2. This analysis culminated in Figure 4-5, which shows the measured
thruster force per thruster per satellite and references the nominal force as 0.088 N (an
already degraded value from the thruster’s datasheet value of 0.098 N). Illustratively,
it is clear that each satellite suffers from at least one seriously degraded thruster. For
Red, thruster 0 outputted 0.002 N, meaning its ability to thrust in the +𝑥 direction
74
Table 4.3: Test session 101 descriptive list of tests executed
Test # Description
1 Open-Loop X-Y Plane (200 ms)
2 Open-Loop X-Z Plane (200 ms)
3 Open-Loop Y-Z Plane (200 ms)
4 Open-Loop X-Y Plane (100 ms)
5 Open-Loop X-Z Plane (100 ms)
6 Open-Loop Y-Z Plane (100 ms)
7 Open-Loop X-Y Plane (50 ms)
8 Open-Loop X-Z Plane (50 ms)
9 Open-Loop Y-Z Plane (50 ms)
10 Thruster Manifold Test
11 Closed-Loop X Translate
12 Closed-Loop Y Translate
13 Closed-Loop Z Translate
14 Closed-Loop X Rotate
15 Closed-Loop Y Rotate
16 Closed-Loop Z Rotate
and torque about +𝑦 is severely crippled. For Orange, thruster 3 outputted 0.008 N
and thruster 9 outputted 0.014 N – its ability to thrust in +𝑦 and −𝑦 is limited and
is crippled for torquing about −𝑧. For Blue, thruster 0 outputted 0.023 N, thruster 6
outputted 0.015 N, and thruster 7 outputted 0.032 N, meaning it has limited ability
to thrust in +𝑥 and −𝑥 and is at a disadvantage for torquing about −𝑦 and +𝑦.
These conclusions are based on the force and torque directions outlined in Table 4.2.
Figure 4-5: Test session 101: calculated force of each thruster and each satellite
75
Mixer Validation
Based on the thruster characterization results prior to this test session, the SPHERES
team developed an individual mixer for Blue, Orange, and Red. Similar to the pre-
vious standard mixer, these individualized mixers took in the desired control effort
from the controller and outputted the necessary thruster on/off commands. However,
the team modified each one to consider the limited performance of certain thrusters
on the different satellites, thereby changing the force matrix for each one. Hypothet-
ically, this would help in achieving the desired position or orientation. In order to
test these mixers, a series of closed-loop tests for each translation and orientation
direction were completed in TS101.
Each closed-loop test consisted of four maneuvers. For all tests, maneuver 1 was
10 seconds allotted for estimator convergence and the satellite’s initial position was
copied to memory as the position to return to in maneuver 4. For all tests, maneuver
2 commanded each satellite to hold its initial position and orientation. Maneuver 3
varied for each test as it consisted of the translational or reorientation command. For
the translation tests, maneuver 3 commanded each satellite to translate by +0.3 m in
the respective direction of the test. For the rotation tests, maneuver 3 commanded
each satellite to rotate +90 deg about the respective rotation axis. For all tests,
maneuver 4 commanded each satellite back to its original position and orientation.
The following portion of this section will discuss the results of each closed-loop
test in turn. First, two instances of the closed-loop translation in 𝑥 were run, both
of which yielded poor results. The best results for each satellite are presented in
the following figures. From Figure 4-6a, it is shown that Blue did not reach the
commanded 𝑥-position in the allotted time. By the end of maneuver 3, it should have
moved +0.3 m from its initial position in maneuver 1, and then returned to that initial
position by the end of maneuver 4. At the end of maneuver 4, it is still increasing
in +𝑥 and does not return to its initial position. This indicates that the mixer was
not able to compensate for the thruster degradation in thruster 0, as illustrated in
Figure 4-5. Orange’s performance during this test is shown in Figure 4-6b. During
76
maneuver 3, it is hypothesized that the satellite would have been able to reach the
commanded position if more time had been permitted. Not surprisingly based on
Figure 4-5, Red struggled to move in the +𝑥 direction but quickly translated in −𝑥
(Figure 4-6c), indicating that the mixer was not able to compensate for its crippled
+x thruster (thruster 0). The results for the closed-loop test for translation in 𝑥 were
underwhelming in part due to too little time allotted for the maneuver and crippled
thrusters. It would be worthwhile to investigate the performance with more permitted
time per maneuver.
The closed-loop translation in 𝑦 test yielded more promising results. Figure 4-7a
illustrates the results for Blue. Blue was able to translate +0.3 m in the 𝑦-direction
and then −0.3 m back. This is not surprising based on the thruster characterization
results indicating no issues with Blue’s ±𝑦 thrusting prior to the new mixer. Or-
ange’s results are shown in Figure 4-7b and indicate that the new mixer was able
to overcome Orange’s limited thrust capability in +𝑦 but not in −𝑦, evident by no
indication that Orange started to move in −𝑦 before the test ended. Lastly, Red’s
performance is illustrated by Figure 4-7c, which indicates Red was able to complete
77
the commanded maneuvers without any issue – unsurprising since its ±𝑦 thrusters
were without significant degradation.
78
(a) Blue: position telemetry (b) Orange: position telemetry
it is evident that Blue had no issue performing the desired roll maneuver, indicating
that with its new mixer it is able to overcome any torque deficiencies from thruster
loss-of-effectiveness. Similarly, Orange completed the roll maneuver in the allotted
time with slightly more trouble than Blue – an issue that can be resolved by revising
its mixer (Figure 4-9b). Figure 4-9c also displays that Red had no issue meeting the
commanded roll maneuver in the allowed time. Overall, all three satellites were able
to complete roll maneuvers with their individualized mixers.
The next rotation test was the pitch maneuver. Based on the thruster character-
ization, Blue (prior to the mixer revision) was expected to perform poorly. However,
Figure 4-10a indicates that the updated mixer helped Blue complete the ±90 deg
pitch maneuver. Orange’s position and attitude telemetry in Figure 4-10b suggests a
collision or manual impulse occurred at the beginning of the test. However, Orange
still satisfactorily completed the commanded attitude changes in maneuvers 3 and 4
of this test. Red’s performance during the pitch maneuver proved to be particularly
interesting. As displayed on Figure 4-5, Red’s thruster 0 practically produced no
thrust, which is of concern for a pitch maneuver since it is one of the +𝑦 torquers.
79
(a) Blue: attitude telemetry (b) Orange: attitude telemetry
Despite this handicap and in combination with Red’s updated mixer, Red completed
the pitch maneuver within the timeframe of the maneuvers (Figure 4-10c).
80
The last closed-loop test conducted on TS101 was the yaw maneuver, in which
each satellite was commanded to rotate ±90 deg about its 𝑧-axis. Figure 4-11a shows
that Blue performed the yaw maneuver well and finished with a few seconds to spare.
Unfortunately, Orange performed poorly, taking a longer period of time to reach the
+90 deg rotation and overshooting the command, leaving little time to return to the
original orientation (Figure 4-11b). This suggests that Orange’s thruster degradation
cannot be compensated for by a modified mixer. Lastly, Red’s yaw maneuver is shown
in Figure 4-11c, which performed exceptionally.
Conclusively, the modified mixers proved to help complete desired maneuvers de-
spite thruster degradation for Blue and Red in all tests except 𝑥-translation. Orange,
however, struggled in several of the maneuvers despite the new mixer. From this test
session, Orange was elected to return to ground for thruster replacement.
81
4.2 In-Flight Adaptive PID Sliding Mode Position
and Attitude Controller
Future spacecraft operations, such as debris capture and autonomous in-orbit ser-
vicing, will require spacecraft to interact with objects with poorly defined inertial
properties which introduce a large degree of uncertainty into the dynamics of such
operations. To handle this uncertainty, this section describes the development and
validation of a mass property-resilient controller for position and attitude control of a
free-flying spacecraft. Specifically, the proportional-integral-derivative (PID) sliding
mode controller (SMC) was developed to account for inaccurate knowledge of mass
properties of small spacecraft, using sliding mode variables for each axis and an adap-
tive determination of the appropriate integral and derivative gains to achieve a com-
manded motion. The controller was validated both in simulation and in ground-based
tests on the SPHERES (Synchronized Position Hold Engage Reorient Experimental
Satellites) platform, small free-floating autonomous satellites used to study precision
navigation and maneuvering. The SPHERES was commanded to follow a specified
series of maneuvers using the PID SMC, to assess the convergence time of the sliding
variables, gain values and commanded state parameters in each maneuver.
In order to provide resilience to mass properties, sliding mode control and adaptive
control were utilized. By using sliding mode and adaptive control techniques, the
controller gains and the characteristic coefficients of the system’s equations of motion
were found in-flight using adaptation equations (differential equations that update the
gains and coefficients based on a sliding variable). These values updated throughout
the course of each test to converge the system to the desired state [39].
The controller detailed in this section was designed using the linearized SPHERES’s
translational dynamics (equivalent to that of a mass-spring-damper system) and the
linearized SPHERES’s attitude dynamics (a double integrator). Although this con-
troller was designed specifically for SPHERES, a similar derivation process can be
performed based on the dynamics of the system in question. Additionally, this type
of controller has wider applications in the field of autonomous free-flying spacecraft
82
beyond the SPHERES program. Autonomous spacecraft proximity operations such
as docking, in-orbit servicing, and space debris capture, will comprise a large part of
future space operations. In such cases, inertial properties of the spacecraft or compo-
nent being interacted with may not be fully defined and will impact the dynamics of
the free-flying satellite. Use of a mass property resilient-controller allows the system
to adaptively adjust its gains to account for this uncertainty.
To illustrate the performance of the PID SMC under unknown or uncertain mass
property knowledge, the static PID controller with incorrect mass property knowledge
was used for the same tests. This comparison for both the simulation and hardware
tests emphasizes that the PID SMC offers significantly better performance over a
static PID controller under the circumstance of incorrect/uncertain mass property
knowledge since the PID SMC does not rely on this information.
83
adaptation laws was verified by applying Barbalat’s Lemma to a candidate Lyapunov
function [39]. In this section, the derivation of the eight laws are detailed as well as
the verification that stability is ensured.
Position Control
𝑥¨ + 𝛼𝑥 𝑥˙ + 𝛽𝑥 𝑥 = 𝑢𝑥 (4.3a)
𝑦¨ + 𝛼𝑦 𝑦˙ + 𝛽𝑦 𝑦 = 𝑢𝑦 (4.3b)
𝑧¨ + 𝛼𝑧 𝑧˙ + 𝛽𝑧 𝑧 = 𝑢𝑧 (4.3c)
As seen from the above equations of motion, this system is order 𝑛 = 2, so the general
form of the sliding variable is
𝑠 = 𝑥˜˙ + 𝜆˜
𝑥 = 𝑥˙ − 𝑥˙𝑟 (4.4)
where 𝑥˜ is the difference between the current position and the desired position (𝑥𝑑 )
and 𝑥˙𝑟 = 𝑥˙ 𝑑 − 𝜆˜
𝑥. The following derivation is for the translation in the 𝑥-axis, so 𝑠
is denoted as 𝑠𝑥 .
𝑠˙ 𝑥 = 𝑥¨ − 𝑥¨𝑟 (4.5a)
84
Additionally, a PID control law is desired, so let
^ 𝑖,𝑥 and 𝐾
In Equation 4.7, 𝐾𝑝,𝑥 is a positive constant, but 𝐾 ^ 𝑑,𝑥 can be either positive
or negative and change via adaptation laws that are yielded from the Lyapunov
candidate function. This simplifies 𝑠˙ 𝑥 to Equation 4.8.
˜𝑥 − 𝑢𝑥,𝑃 𝐼𝐷
𝑠˙ 𝑥 = 𝑌𝑥⃗𝑎 (4.8)
A candidate Lyapunov function for this system and its derivative are derived
below. This Lyapunov function needs to be positive definite in order to use Barbalat’s
Lemma to analyze the system stability.
1 1 ˜ 2 + 1 𝛾 −1 𝐾 ˜ 2 + 1𝑎
𝑉𝑥 = 𝑠2𝑥 + 𝛾1−1 𝐾 𝑖,𝑥 2 𝑑,𝑥 ˜𝑇𝑥 Γ−1
1 𝑎 ˜𝑥 (4.9a)
2 2 2 ∫︁
2
˜𝑥 − 𝐾𝑝,𝑥 𝑠2 − 𝐾
𝑉˙ 𝑥 = 𝑠𝑥 𝑌𝑥⃗𝑎 ^ 𝑠
𝑖,𝑥 𝑥 𝑠𝑥 𝑑𝑡 − 𝐾 ^ 𝑑,𝑥 𝑠𝑥 𝑠˙ 𝑥 + ...
𝑥
𝛾1−1 𝐾 ^˙ 𝑖,𝑥 + 𝛾 −1 𝐾
˜ 𝑖,𝑥 𝐾 ^˙ 𝑑,𝑥 + 𝑎
˜ 𝑑,𝑥 𝐾 ^˙ 𝑇𝑥 Γ−1 ˜𝑥 (4.9b)
2 1 𝑎
^˙ 𝑥 = −Γ1 𝑌 𝑇 𝑠𝑥
=⇒ Adaptation Law 1: ⃗𝑎 (4.9c)
𝑥
∫︁
=⇒ 𝑉˙ 𝑥 = −𝐾𝑝,𝑥 𝑠2𝑥 − 𝐾
^ 𝑖,𝑥 𝑠𝑥 ^ 𝑑,𝑥 𝑠𝑥 𝑠˙ 𝑥 + ...
𝑠𝑥 𝑑𝑡 − 𝐾
𝛾1−1 𝐾 ^˙ 𝑖,𝑥 + 𝛾 −1 𝐾
˜ 𝑖,𝑥 𝐾 ^˙ 𝑑,𝑥
˜ 𝑑,𝑥 𝐾 (4.9d)
2
^˙ 𝑖,𝑥 = 𝛾1 𝑠𝑥
∫︁
=⇒ Adaptation Law 2: 𝐾 𝑠𝑥 𝑑𝑡 (4.10a)
^˙ 𝑑,𝑥 = 𝛾2 𝑠𝑥 𝑠˙ 𝑥
=⇒ Adaptation Law 3: 𝐾 (4.10b)
^𝑥 , 𝐾
When the three adaptation laws are used to update the values of ⃗𝑎 ^ 𝑑 , and 𝐾
^ 𝑖 , 𝑉˙ 𝑥
85
Since 𝑉˙ 𝑥 is negative definite and 𝑉𝑥 is positive definite, it is determined that 𝑉𝑥
˜ 𝑖,𝑥 , 𝐾
is bounded, and therefore, 𝑠𝑥 , 𝐾 ˜ 𝑑,𝑥 , and 𝑎
˜𝑥 are bounded. It is straightforward
to show that 𝑉¨𝑥 is bounded based on the previously determined bounded variables
from 𝑉𝑥 . By Barbalat’s Lemma, 𝑉˙ 𝑥 → 0 as 𝑡 → ∞, which implies that 𝑠𝑥 → 0, as
well [39]. Thus, these three adaptation laws in addition to the PID control provide a
stable sliding mode controller solution for position control.
The same proof can be used for the 𝑦 and 𝑧 position dynamics and would produce
the same result for appropriately subscripted terms unique to 𝑦 and 𝑧.
Attitude Control
⃗¨ = ⃗𝜏 , where 𝛼
The attitude dynamics of the satellite are described by 𝐽 𝛼 ⃗ = [𝜓, 𝜃, 𝜑]𝑇
(which correspond to roll, pitch, and yaw, respectively) and ⃗𝜏 is the control input.
This is decomposed into the following equations per axis.
The following derivation is for the attitude about the 𝑧-axis, denoted by 𝜑. Similar
to the derivation for position, this system has order 𝑛 = 2, so the sliding variable is
defined as 𝑠𝜑 = 𝜑˜˙ + 𝜆𝜑˜ = 𝜑˙ − 𝜑˙ 𝑟 . For increased simplicity in the derivation, the term
𝐽33 𝑠𝜑 is used in the derivation.
86
^
In order to drive 𝑠˙ 𝜑 to 0, let 𝜏^𝜑 = 𝑌𝜑 𝐽⃗𝜑 . Since a PID control law is desired, let
^ 𝑖,𝜑 and 𝐾
In Equation 4.14, 𝐾𝑝,𝜑 is a positive constant, but 𝐾 ^ 𝑑,𝜑 can be either positive
or negative and change via adaptation laws yielded from the Lyapunov candidate
function.
A candidate Lyapunov function for this system and its derivative are derived
below.
1 1 ˜ 𝑖,𝜑 1 ˜ 𝑑,𝜑 1˜ ⃗˜
𝑉𝜑 = 𝐽33 𝑠2𝜑 + 𝛾3−1 𝐾 2
+ 𝛾4−1 𝐾 2
+ 𝐽⃗𝜑𝑇 Γ−1
2 𝐽𝜑 (4.16a)
2 2 2 ∫︁ 2
˜
𝑉˙ 𝜑 = 𝑠𝜑 𝑌𝜑 𝐽⃗𝜑 − 𝐾𝑝,𝜑 𝑠𝜑 − 𝑠𝜑 𝐾
2 ^ 𝑖,𝜑 𝑠𝜑 𝑑𝑡 − 𝑠𝜑 𝐾^ 𝑑,𝜑 𝑠˙ 𝜑 + ...
˙
𝛾3−1 𝐾 ^˙ 𝑖,𝜑 + 𝛾4−1 𝐾
˜ 𝑖,𝜑 𝐾 ^˙ 𝑑,𝜑 + 𝐽⃗^𝜑𝑇 Γ−1
˜ 𝑑,𝜑 𝐾 ⃗˜
2 𝐽𝜑 (4.16b)
˙
=⇒ Adaptation Law 1: 𝐽^𝜑 = −Γ2 𝑌𝜑𝑇 𝑠𝜑 (4.16c)
∫︁
^ 𝑖,𝜑
=⇒ 𝑉˙ 𝜑 = −𝐾𝑝,𝜑 𝑠2𝜑 − 𝑠𝜑 𝐾 ^ 𝑑,𝜑 𝑠˙ 𝜑 + ...
𝑠𝜑 𝑑𝑡 − 𝑠𝜑 𝐾
To ensure that 𝑉˙ 𝜑 is negative definite, the following two adaptation laws are derived,
as well.
^˙ 𝑖,𝜑 = 𝛾3 𝑠𝜑
∫︁
=⇒ Adaptation Law 2: 𝐾 𝑠𝜑 𝑑𝑡 (4.17a)
^˙ 𝑑,𝜑 = 𝛾4 𝑠𝜑 𝑠˙ 𝜑
=⇒ Adaptation Law 3: 𝐾 (4.17b)
87
When the three adaptation laws are used to update the values of 𝐽^𝜑 , 𝐾
^ 𝑖,𝜑 , and 𝐾
^ 𝑑,𝜑 ,
The same proof can be used for 𝜓 and 𝜃 attitude dynamics and would produce
the same result with appropriately subscripted terms unique to 𝜓 and 𝜃.
An extensive sweep of possible parameter values via numerous simulation runs was
used to determine the final parameter values used for the simulation and hardware
testing based on which provided the best performance. The following parameters
yielded the quickest response time without overshooting in simulation. Note that
in the 3-DOF implementation of this controller, the user-defined position control
88
Table 4.4: Sequential series of maneuvers and corresponding commanded position
and quaternion
Position Control
Attitude Control
𝜆2 = 0.10, 𝛾3 = 4, 𝛾4 = 2,
⎡ ⎤
⎢ 10 0 0 ⎥
⎢ ⎥
𝐾𝑝,𝜑 = 50, Γ2 = 0 10 0 ⎥
⎢ ⎥
⎢
⎢ ⎥
⎣ ⎦
0 0 10
The control and adaptation laws described in the previous section were imple-
mented within the SPHERES framework as a substitution for the default controller.
The sequence of maneuvers described in Table 4.4 was defined as a test file that in-
corporated the standard infrastructure of the SPHERES programming. Therefore,
during the execution of this test, the standard infrastructure handled the satellite’s
state vector and computed the state error. Once the state error was calculated, a call
to the PID SMC was made. A high-level description of the sequence of computations
89
that occurred in the controller is displayed in Figure 4-12. In this figure (and in
the subsequent sections of this paper), 𝑝 is used as a generic variable representing
𝑥, 𝑦, and 𝜑 for brevity. Note that the flowchart provides the numerical equations
implemented for computing the integral term of the sliding variable as well as the
derivative. Specifically, the integral terms are not integrated in addition to the nu-
merical integration equation, but are provided as a reference to the terms derived in
the previous section.
This section describes the results yielded from the previously derived position and
attitude PID SMC with the above parameters. First, the results from simulation
are shown and discussed, and then the results from hardware testing are shown and
discussed.
Simulation
Simulation tests were run using the SPHERES simulation and flight software together
with the implemented PID SMC. The simulation was limited to a three degrees of
freedom test using a mass model that incorporated the air bearing stand that the
SPHERES are held on for ground tests. Thus, the simulation aligns with the hardware
ground test as closely as possible.
Figure 4-13a shows the 𝑥-position, 𝑦-position, and 𝑦𝑎𝑤 attitude commands and
response of the satellite during the simulation. The vertical magenta lines indicate a
new maneuver has been commanded (i.e. a new commanded position and attitude).
As described in the previous section, the satellite is permitted to move on to the
next maneuver once it stays within a 2.5 cm tolerance of the commanded position for
5 seconds. In the simulation the satellite was consistently able to meet this condition,
converging to the commanded position and attitude and subsequently terminating
each maneuver after 5 seconds. This is evident in Figure 4-13a where the satellite
takes approximately 20 seconds to converge to the commanded state and holding for
90
Start Controller Call
Convert quaternions
to Euler angles
Compute
Δt
sp dt = sp dt + (sp,j−2 + sp,j−1 )
(∫ ) (∫ )
j j−1 2
Compute
.
sp,j = p̃ j + λ p̃ j
Compute
. .
p̃ j − p̃ j−1 .
.
sp,j = + λ p̃ j
Δt
Construct Yp matrix
Compute
. .
.
ˆ ˆ
â p , K i,p , K d,p
Numerically integrate to
find
ˆ ˆ
â p , K i,p , K d,p
Figure 4-12: Flowchart of the in-flight adaptive PID sliding mode controller as im-
plemented in C-code
In order to verify that the PID SMC provides a better control solution to the
scenario in which uncertain mass properties exist, the PID SMC results are com-
pared against results from the static PID controller given incorrect mass properties.
The position and attitude results from such a scenario are shown in Figure 4-13b.
91
Time vs. X-Position
0.5
Position [m]
0
Measured
Commanded
Maneuver
-0.5
0 50 100 150 200 250 300 350 400
Time [s]
Time vs. Y-Position
0.5
Position [m]
0
-0.5
0 50 100 150 200 250 300 350 400
Time [s]
Time vs. Yaw
200
150
Attitude [deg]
100
50
-50
Figure 4-13: A comparison of commanded position and attitude vs. measured teleme-
try from simulation
Note that with this static PID controller, the test took roughly 425 seconds to reach
completion — 200 seconds longer than it took for the PID SMC. Additionally, the
position and attitude overshoot on every new command.
𝑠𝑝 = 𝑝˜˙ + 𝜆˜
𝑝 (4.18)
where 𝑝˜ = 𝑝 − 𝑝𝑑 .
Additionally, recall that the goal of the sliding mode controller is for the sliding
variable to converge to zero (indicating that the system has converged to the desired
position/attitude). Thus, when viewing the time history of the sliding variables (i.e.
Figure 4-14a), the goal is for the variable to converge to zero by the end of the
maneuver. When the position or attitude command between maneuvers changes, it
is expected for the sliding variable to jump to a new value. Naturally, this change is
proportional in magnitude and direction as the new command compared to the old
command.
92
(a) Sliding Variables (b) Gain Values
Figure 4-14: Adaptive PID SMC time histories corresponding to position and attitude
from simulation
Figure 4-14a illustrates how the 𝑠𝑝 variable changes throughout the course of the
test. Since the sliding variable was not used during the first maneuver (estimator
convergence) of the test, this maneuver is not included in the figure. The sliding
variables associated with the 𝑥 and 𝑦 positions are consistent with the desired behavior
whereas the sliding variable associated with the 𝑦𝑎𝑤 attitude is not. The sliding
variables 𝑠𝑥 and 𝑠𝑦 converge to zero by the end of each maneuver and reset as expected
per new command at a new maneuver. However, 𝑠𝜑 exhibits significant chattering
about 𝑠𝜑 = 0, indicating that the variable overshoots zero and enters a limit cycle as
it repeats the overshoot. This behavior was not fixable via parameter tuning, but it is
expected that if the attitude sliding mode controller was re-designed with a boundary
layer in the sliding variable, this behavior would subside.
^˙ 𝑝 = −Γ𝑌 𝑇 𝑠𝑝
⃗𝑎 (4.19)
𝑝
^˙ 𝑖,𝑝 = 𝛾𝑖 𝑠𝑝
∫︁
𝐾 𝑠𝑝 𝑑𝑡 (4.20)
93
^˙ 𝑑,𝑝 = 𝛾𝑑 𝑠𝑝 𝑠˙ 𝑝 .
𝐾 (4.21)
Each adaptation law contains the sliding variable; therefore, as the sliding variable
converges to zero, it is expected that these derivative terms converge to zero, meaning
the adaptation term and gain values converge to some constant value per command.
^ values change for each degree of freedom
Figure 4-14b illustrates how the 𝐾
through the course of the test. Convergence to a constant value is evident for the
^ 𝑑 and 𝐾
𝐾 ^ 𝑖 values for the 𝑥 and 𝑦 positions. However, for the 𝑦𝑎𝑤 attitude gains,
^ 𝑑 value keeps increasing across all maneuvers. This issue is correlated with the
the 𝐾
chattering behavior in Figure 4-14a and is discussed in more detail later in this paper.
The 𝑥-𝑦 plot in Figure 4-15 shows the satellite’s trajectory as it attempted to
reach each position for both the PID SMC and the default PID controller. In the
figure, the asterisk markers indicate the satellite’s position at the beginning of each
maneuver. Although the commands are only associated with specific positions the
satellite is to reach by the end of each maneuver without explicitly defining the
trajectory, there exists an implied commanded trajectory, i.e. the shortest distance
between the position of the previous maneuver with that of the current maneuver.
With the PID SMC, the satellite closely matches this implicit trajectory as it reaches
each commanded position. However, when the satellite is equipped with the default
PID controller, it overshoots each commanded endpoint, illustrating that the PID
SMC offers better performance.
Hardware
Hardware tests were run using the glass table for SPHERES testing in the Space
Systems Laboratory. The satellite was fastened to an air bearing stand in order
to minimize friction with the table. The same flight software was loaded on the
SPHERES as was used in the simulation. Again, this setup is restricted to three
degrees of freedom (𝑥, 𝑦 and 𝑦𝑎𝑤). From this testing, four datasets were produced,
all of which are shown in Figure 4-16a; however, only dataset 4 is discussed in detail
presently as it yielded the best results (and the corresponding data is shown in Figures
94
X vs. Y
0.4
PID SMC
Default PID
Commanded
0.3
Man 5
ManMan
6 6
Man 5
0.2
0.1
Man 4
Man 9
Y [m]
0 Man
Man 22 Man 7
Man 4 Man 9
Man 7
-0.1
-0.2
Man 8
Man 3
Man Man
8 3
-0.3
-0.4
-0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4
X [m]
It is clear from Figure 4-16b that the static PID controller performed poorly on
the table in comparison to the adaptive PID SMC in Figure 4-16a. It was expected
that the performance would be poor based on the simulation results. However, it
is hypothesized that the imperfections of the glass table coupled with the inferior
controller resulted in the inability of the PID controller to meet the desired endpoints.
Figure 4-17a illustrates the 𝑥-position, 𝑦-position, and 𝑦𝑎𝑤 attitude commands
and response of the satellite during the hardware test corresponding to dataset 4.
The same time tolerance as the simulation case was set for completing a maneuver.
For this hardware test, the maximum time the satellite was allowed to spend in each
maneuver was 100 seconds, before the satellite would terminate its effort to converge
and move on to the next maneuver. In maneuvers 4, 5 and 9 it can be seen that
while the satellite converges to the commanded 𝑥-position and 𝑦𝑎𝑤, it struggles to
converge to the commanded 𝑦-position. From Figure 4-16a it is evident that this
inability to reach the commanded 𝑦-position in maneuvers 4, 5 and 9 (𝑦 = 0.25 cm)
occurred across all four hardware tests. However, this was clearly not an issue in
the simulation tests. There are several possible explanations for this result. The
simulation likely has a poor model of the true system, particularly with respect to
95
X vs. Y
0.4
Default PID
Commanded
0.3
0.2
0.1
Man 7
Man 8
Man 6
Y [m]
0 Man 5 Man 9
Man 4
Man 3
-0.1
-0.2
-0.3
Man 2
-0.4
-0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4
X [m]
(a) Four datasets from adaptive PID SMC (b) Static PID
Figure 4-16: Trajectories plotted in the 𝑥-𝑦 plane from hardware tests
thruster performance. The simulation assumes all thrusters thrust at a constant value
over time, however in practice this does not occur. Some thrusters on the hardware
have suffered degradation over the years and therefore thrust inconsistently. The
air bearings that move the SPHERES across the glass table require an extremely
smooth surface to operate, so any small imperfections in the glass table could result in
additional friction when moving the SPHERES in that area. As the problem seems to
be consistent with a particular 𝑦 position across the table, the more likely explanation
is that the glass table was not perfectly level at that point and consequently the
thrusters had difficulty moving the satellite in this region.
In all four datasets, maneuvers 4, 5 and 9 timed-out (seen in Figure 4-17a where
the maneuvers automatically terminate after 100 seconds). It is also important to
note that for datasets 1 and 2, the final maneuver was not completed. This was due
to depletion of the CO2 tanks used for thruster propellant before the final maneuver.
Lastly, the large jumps in data in Figure 4-16a is indicative of a combination of some
data dropping across communications in addition to some estimation error rather
than the satellite performing large oscillations as it translated.
96
Time vs. X-Position
0.5
Position [m]
0
Measured
Commanded
Maneuver
-0.5
0 100 200 300 400 500 600 700 800
Time [s]
Time vs. Y-Position
0.5
Position [m]
0
-0.5
0 100 200 300 400 500 600 700 800
Time [s]
Time vs. Yaw
200
150
Attitude [deg]
100
50
-50
Figure 4-17: A comparison of commanded position and attitude vs. measured teleme-
try from hardware tests
Figure 4-17b illustrates the position and attitude time history of the satellite
completing the test maneuvers using the static PID controller with incorrect mass
knowledge. It is evident that the controller struggles to complete the test, timing
out in each maneuver rather than meeting the desired endpoint. Comparing Figure
4-17b with Figure 4-17a supports the conclusion that the PID SMC offers superior
performance to the default PID controller when there exists incorrect mass property
knowledge because the adaptive PID SMC controller is able to meet the commands
whereas the defualt PID controller cannot.
Figure 4-18a depicts the 𝑠𝑝 sliding variable time history for dataset 4. As men-
tioned previously, since the sliding variable was not used during the first maneuver
(estimator convergence), the maneuver is not included in the figure. Recall that for
each maneuver, the sliding variable should converge to 𝑠𝑝 = 0, corresponding to the
system converging to the commanded position (or attitude). Compared to the time
history of sliding variables in Figure 4-14a, the sliding variables for 𝑥 and 𝑦 positions
appear to chatter slightly around 𝑠𝑝 = 0. This behavior is consistent with the slow
convergence to the commanded positions in Figure 4-17a. In fact, the slow conver-
97
(a) Sliding Variables (b) Gain Values
Figure 4-18: Adaptive PID SMC time histories corresponding to position and attitude
from hardware tests
Figure 4-18b shows the time history of the derivative and integral gains for the 𝑥
^
and 𝑦 positions and the 𝑦𝑎𝑤 attitude. Recall that the desired behavior of these 𝐾
values is convergence to some constant value per commanded position; however, this
convergence is dependent on the sliding variable converging to 𝑠𝑝 = 0. Of particular
interest is the sliding variable time history for the 𝑦 position during maneuvers 4 and
5. From Figure 4-17a, it is clear that the satellite moves on to the next maneuver due
to reaching the maximum time limit rather than spending 5 seconds within a tolerance
of 2.5 cm of the commanded position. Thus, the corresponding time history in Figure
4-18b indicates that the slowly changing gains were insufficient for controlling the
satellite to its desired position. Similar to the simulation results, the gain values
98
^ 𝑖 value does not manage to
for the yaw attitude exhibit poor convergence. The 𝐾
converge to a constant value during the maneuvers; however, the range over which
the value changes is an order of magnitude smaller than the corresponding position
integral gain values. This indicates a negligible impact on the system. Again, the
^ 𝑑 value is a consequence of the chattering 𝑦𝑎𝑤 sliding variable that
ever-increasing 𝐾
is discussed in more depth in the following section.
When conducting hardware tests of the PID sliding mode attitude and position con-
trollers, the decision was made to increase the test from five maneuvers to nine in
order to add waypoints between particularly distant endpoints of maneuvers. This
was an attempt to force the satellite to more closely follow the trajectory that the
simulation mapped out (i.e. a straight line between endpoints). Prior to these ad-
ditional waypoints, the satellite followed semicircular-like curves between endpoints
during hardware testing due to imperfections in the glass table that inadvertently af-
fected the satellite’s path. The addition of these waypoints decreased the initial value
of the sliding variable per new command, which translates into smaller necessary gain
values per maneuver.
In order for a sliding mode controller to operate correctly, chattering must be
eliminated in order to limit the necessary control activity. As mentioned previously,
chattering of the 𝑦𝑎𝑤 attitude sliding variable occurred in both simulation and in
hardware testing. A thin boundary layer can be applied to 𝑠𝑝 = 0 in an attempt
to smooth out this chattering. The addition of a thin boundary layer to the sliding
variable trades "perfect" tracking for tracking with a guaranteed precision proportional
to the width of the boundary layer. This implementation changes the definition
of the sliding variable and the subsequent derivation of the adaptation laws. The
implementation of a boundary layer in the attitude controller is future work for this
research.
Both hardware and simulation tests were used to validate the PID sliding mode
controllers for position and attitude. Results show that with experimentally tuned
99
parameters, the adaptive controller enabled the satellite to sufficiently converge to
commanded positions and attitudes over a series of maneuvers. The performance
of the PID SMC was compared with a PID controller designed with incorrect mass
property knowledge (the SPHERES’s default PID controller). The results of both
simulation and hardware tests for each controller supports the conclusion that the
PID SMC provides resilience to incorrect mass properties knowledge and superior
performance. Future work will address the chattering of the attitude controller via
the addition of a boundary layer to the sliding variable (and the subsequent effects
that will have on the adaptation laws). Altogether, the PID SMC is a promising
control scheme for offering resilience to systems with uncertainty in mass properties,
and continued efforts are necessary to more finely tune its capabilities.
100
Chapter 5
Docked Dynamics
The focus of this chapter is the beginning of Stage 3 of the ROAM project – soft
docking between the Chaser and the Target and the detumbling procedure that brings
the aggregated system to a standstill. In this stage, the Chaser has instantaneously
docked to the Target by maintaining synchronous motion on its approach. The goal
is for the Chaser to detumble the Target while minimizing fuel, loads, and moments
imparted on the Target. This chapter will overview the contact dynamics of docking,
the docked dynamics of maintaining synchronous motion, and an optimization for
the detumble procedure. Because active debris removal presents scenarios in which
Targets will be fragile, the imparted loads and moments on the Target are considered
in the cost of the detumbling maneuver.
For the scenario in which the Target spacecraft is fragile, the user is interested in de-
termining the loads and moments imparted on the Target during the docking process
and detumbling maneuver. The contact dynamics of docking are provided from the
literature and applied to this problem [67].
Figure 5-1 indicates the Chaser and Target the instant before docking, in which
both spacecraft still have their separate linear and angular velocity. Refer to Table
5.1 regarding the notation used in the figure. This problem is more constrained than
101
Figure 5-1: Chaser and Target during instance before docking occurs denoted with
separate position, velocity, and attitude vectors
the original problem cited in the literature [67], since the trajectory approach of the
mission is limited to a synchronous radial approach. This implies that the angular
velocity of the Chaser is equivalent to that of the Target. Figure 5-2 illustrates the
aggregated system immediately after docking.
Table 5.1: Notation for contact dynamics of two spacecraft docking to one another
Variable Description
⃗𝑣𝑡 , ⃗𝑣𝑐 Independent linear velocity
𝜔
⃗ 𝑡, 𝜔 ⃗𝑐 Independent angular velocity
⃗𝑟𝑡 , ⃗𝑟𝑐 Position from system center of mass
⃗𝑟𝑡𝑐 Distance from Target’s CM to Chaser’s CM
⃗𝑟𝑙𝑡 Distance from docking interface to Target’s CM
𝑚𝑡 , 𝑚𝑐 Spacecraft mass
⃗ 𝐶𝑀 𝐶
Ω System angular velocity
𝑉⃗𝐶𝑀 𝐶 System linear velocity
𝜖= 𝑚 𝑚𝑡
𝑐
Mass ratio
In order to yield expressions for the impulsive force and torque imparted during
docking, several geometric relationships are defined. The position vectors are related
via ⃗𝑟𝑐 = ⃗𝑟𝑡 +⃗𝑟𝑡𝑐 . The definition of the center of mass of the aggregated system implies
that 𝑚𝑐⃗𝑟𝑐 + 𝑚𝑡⃗𝑟𝑡 = 0. Therefore, both position vectors can be expressed in terms of
102
Figure 5-2: Chaser and Target in the instance after docking denoted with aggregated
translational and attitude velocity
𝜖 and ⃗𝑟𝑡𝑐 .
Thus, the independent velocity of the Target relative to the aggregated system linear
velocity after docking is found by equating the two ⃗𝑟˙𝑡 expressions and rearranging.
By conservation of linear momentum, the linear momentum of the Chaser and the
Target before docking must be equivalent to the linear momentum of the aggregated
system after docking. From this relationship, an expression for the linear velocity of
103
the aggregated system is determined.
⃗ 𝐶𝑀 𝐶 × ⃗𝑟𝑡 .
𝑉⃗𝑡+ = 𝑉⃗𝐶𝑀 𝐶 + Ω (5.6)
Using the velocity relationships already defined, the impulsive force is determined in
Equation 5.7c.
⃗ 𝑡 +⃗𝑟𝑡 × 𝑚𝑡⃗𝑟˙𝑡 + 𝐻
𝐻 ⃗ 𝑐 + ⃗𝑟𝑐 × 𝑚𝑐⃗𝑟˙𝑐 = 𝐼𝐶𝑀 𝐶 Ω
⃗ 𝐶𝑀 𝐶 (5.8a)
[︁ ]︁
⃗ 𝐶𝑀 𝐶 = 𝐼 −1 𝐻
Ω ⃗ 𝑐 + 𝑚𝑐 (1 + 𝜖)−1⃗𝑟𝑡𝑐 × ⃗𝑟˙𝑡𝑐
⃗𝑡 + 𝐻 (5.8b)
𝐶𝑀 𝐶
⃗ 𝑡 = 𝐼𝑡 𝜔
𝐻 ⃗𝑡
⃗ 𝑐 = 𝐼𝑐 𝜔
𝐻 ⃗𝑐
⃗ 𝐶𝑀 𝐶 − 𝜔
⃗𝜏𝐼 = 𝐼𝑡 (Ω ⃗ 𝑡 ) − ⃗𝑟𝑙𝑡 × 𝐹⃗𝐼 (5.9)
⃗ 𝐶𝑀 𝐶 , 𝜔
Equation 5.9 indicates that Ω ⃗ 𝑡 , ⃗𝑟𝑙𝑡 , and the variables from Equation 5.7c are
104
the state variables contributing to the impulsive torque imparted on the spacecraft.
Based on the aforementioned analysis of the impulsive forces and torques imparted
in docking, it is evident that, in the scenario of a fragile Target, the Chaser must con-
tinue to thrust such that the spin axis remains at the Target’s center of mass. These
equations illustrated that with the constraint that the Chaser radially approaches the
Target while maintaining synchronicity, no state variable in this process can be mod-
ified to limit the impulses. This is a consequence of the synchronous radial approach
constraint offering no flexibility in the state variables that constitute Equations 5.7c
and 5.9. Therefore, a solution is to command the Chaser to thrust while docking such
that the angular velocity of the system is moved to be about the Target’s center of
mass as the Chaser starts the detumble procedure.
A script that symbolically solves for the impulsive force and torque can be found
in Appendix C.1, Listing C.1. A function to numerically solve for the impulsive force
and torque based on a given Chaser and Target is given in Appendix C.1, Listing C.2.
In Equation 5.10, ⃗𝑟𝐵 is the distance from the Target’s CM to the Chaser’s CM, which
does not change in the body frame since the spacecraft stays docked. The variable 𝜔
⃗
is the angular velocity expressed in the body axes of the Target and Chaser, and R𝐵2𝐼
105
(a) Top-down view (b) Side view
Figure 5-3: Chaser and Target as docked, aggregated system with denoted body-fixed
frame at Target’s center of mass and the force and torque directions of the Chaser
is the rotation matrix from the body frame to the inertial frame. While this equation
sufficiently defines the translation motion of the Chaser, it can be equivalently ex-
pressed via the following linear momentum balance, which illustrates the tensile and
shear loads applied to the Target during the detumbling procedure.
Σ𝐹⃗ = (𝐹𝑟 + 𝑇 )^
𝑒𝑟 + (𝐹𝜃 + 𝑆𝜃 )^
𝑒𝜃 + (𝐹𝑧 + 𝑆𝑧 )^
𝑒𝑧 (5.11c)
Equating Equation 5.11b with Equation 5.11c and representing the relationship in
matrix form yields Equation 5.12.
⎡ ⎤ ⎡ ⎤
2 2
⎢ 𝐹𝑟 + 𝑇 ⎥ ⎢ −𝑟𝑟 (𝜔𝜃 + 𝜔𝑧 ) + 𝑟𝜃 (𝜔𝑟 𝜔𝜃 − 𝜔
˙ 𝑧 ) + 𝑟𝑧 (𝜔𝑟 𝜔𝑧 + 𝜔˙ 𝜃 ) ⎥
⎢ ⎥ ⎢ ⎥
𝐹 𝜃 + 𝑆𝜃 ⎥ = 𝑚 ⎢ 𝑟𝑟 (𝜔𝑟 𝜔𝜃 + 𝜔˙ 𝑧 ) − 𝑟𝜃 (𝜔𝑟2 + 𝜔𝑧2 ) + 𝑟𝑧 (𝜔𝜃 𝜔𝑧 − 𝜔˙ 𝑟 ) ⎥ (5.12)
⎢ ⎥ ⎢ ⎥
⎢
⎢ ⎥ ⎢ ⎥
⎣ ⎦ ⎣ ⎦
𝐹 𝑧 + 𝑆𝑧 𝑟𝑟 (𝜔𝑟 𝜔𝑧 − 𝜔˙ 𝜃 ) + 𝑟𝜃 (𝜔𝜃 𝜔𝑧 + 𝜔˙ 𝑟 ) − 𝑟𝑧 (𝜔𝑟2 + 𝜔𝜃2 )
In Equation 5.12, 𝑇 , 𝑆𝜃 , and 𝑆𝑧 are the tensile and shear loads expressed in the
body frame of the docking interface. This linear momentum balance uses the free
body diagram of the Chaser only (Figure 5-4b and 5-4a). In order to determine the
values of 𝑇 , 𝑆𝜃 , and 𝑆𝑧 , the necessary torques for changing the Target’s rotation in
the desired manner are considered.
Now, the angular momentum balance for the Target and Chaser combined sys-
tem is constructed to determine the desired torques to detumble the Target. Let 𝜌
106
(a) Top-down view of Chaser (b) Side view of Chaser
Figure 5-4: Free body diagram of the Chaser displaying Chaser’s abilities to impart
force and torques and its internal loads and moments from interacting with the Target
represent the distance between the Target CM and the Chaser CM. The following
equations constitute the angular momentum balance.
𝑒𝑟 × 𝐹𝜃 𝑒^𝜃 + 𝜌^
Σ𝜏𝑇 = 𝑀𝑥 𝑒^𝑟 + 𝜌^ 𝑒𝑟 × 𝐹𝑧 𝑒^𝑧 (5.13c)
Expanding Equation 5.13d into matrix form yields the following Equation 5.14.
⎡ ⎤ ⎡ ⎤
⎢ 𝑀𝑥 ⎥ ⎢ 𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝑟𝑟 𝜔˙ 𝑟 + (𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝑧𝑧 − 𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝜃𝜃 )𝜔𝜃 𝜔𝑧 ⎥
⎢ ⎥ ⎢ ⎥
−𝜌𝐹𝑧 ⎥ = 𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝜃𝜃 𝜔˙ 𝜃 + (𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝑟𝑟 − 𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝑧𝑧 )𝜔𝑟 𝜔𝑧 ⎥ (5.14)
⎢ ⎥ ⎢ ⎥
⎢ ⎢
⎢ ⎥ ⎢ ⎥
⎣ ⎦ ⎣ ⎦
𝜌𝐹𝜃 𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝑧𝑧 𝜔˙ 𝑧 + (𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝜃𝜃 − 𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝑟𝑟 )𝜔𝑟 𝜔𝜃
[𝐼]𝐶𝑀 𝐶/𝑇 𝐴𝑅 = [𝐼]𝐶 + [𝐼]𝑇 + (𝑚𝐶 + 𝑚𝑇 )[I3 (⃗𝑞𝐵 · ⃗𝑞𝐵 ) − ⃗𝑞𝐵 ⊗ ⃗𝑞𝐵 ] (5.15)
and ⃗𝑞𝐵 is the displacement vector from the aggregated center of mass to the Target’s
CM. In general, this is not a diagonal matrix. In the context of ROAM, only inertia
ratios are provided from the estimation phase, so [𝐼]𝐶𝑀 𝐶/𝑇 𝐴𝑅 is a diagonal matrix.
107
Therefore, given a prescribed angular acceleration, the necessary forces and mo-
ments that the Chaser must produce are easily determined. Combining these results
with Equation 5.12 permits the ability to determine the values of 𝑆𝜃 and 𝑆𝑧 . This re-
lationship also illustrates that 𝐹𝑟 is not restricted by the angular momentum balance
of the Target-Chaser combined system. Therefore, 𝐹𝑟 can supply all of the necessary
force on the Chaser in the 𝑒^𝑟 direction, implying that 𝑇 = 0 for detumbling.
⎡ ⎤ ⎡ ⎤
⎢ 𝑀𝑥 + 𝑀𝐵,𝑟 ⎥ ⎢ 𝐼𝐶,𝑟𝑟 𝜔˙ 𝑟 + (𝐼𝐶,𝑧𝑧 − 𝐼𝐶,𝜃𝜃 )𝜔𝜃 𝜔𝑧 ⎥
⎢ ⎥ ⎢ ⎥
𝑀𝐵,𝜃 = 𝐼𝐶,𝜃𝜃 𝜔˙ 𝜃 + (𝐼𝐶,𝑟𝑟 − 𝐼𝐶,𝑧𝑧 )𝜔𝑟 𝜔𝑧 ⎥ (5.17)
⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢
⎢ ⎥ ⎢ ⎥
⎣ ⎦ ⎣ ⎦
𝑀𝐵,𝑧 𝐼𝐶,𝑧𝑧 𝜔˙ 𝑧 + (𝐼𝐶,𝜃𝜃 − 𝐼𝐶,𝑟𝑟 )𝜔𝑟 𝜔𝜃
The variable [𝐼]𝐶 is the Chaser’s inertia matrix. The variable 𝑀𝐵,𝜃 is the bending
moment at the docking interface about 𝑒^𝜃 ; 𝑀𝐵,𝑧 is the bending moment at the docking
interface about 𝑒^𝑧 . Torsion about the docking axis is represented by 𝑀𝐵,𝑟 . Lastly,
𝑀𝑥 is the applied moment that occurs about the Chaser’s CM that acts about the 𝑒^𝑟
axis. Thus, the angular momentum balance of the Chaser provides the expressions
for the torsion and bending moments that act at the docking port interface.
This exercise in analyzing the dynamics of the aggregated system and the Chaser
(cut away from the Target) has provided the relationships between the loads and
moments imparted on the Target. There are three internal loads (𝑇 , 𝑆𝜃 , 𝑆𝑧 ) and
three moments (𝑀𝐵,𝑟 , 𝑀𝐵,𝜃 , 𝑀𝐵,𝑧 ). Expressions for the internal loads are derived
from Equations 5.12 and 5.14. As mentioned previously, the internal tension is merely
𝑇 =0 (5.18)
since the applied force 𝐹𝑟 does not show up in the system’s angular momentum
balance. An expression for 𝐹𝜃 and 𝐹𝑧 in terms of inertias and angular velocities and
108
accelerations fall out of Equation 5.14. Applying these expressions to 5.12 yields the
following.
(︃ )︃
1
𝑆𝜃 = 𝜔𝑟 𝜔𝜃 (𝑚𝑟𝑟 − (𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝜃𝜃 − 𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝑟𝑟 )) + ...
𝜌
(︃ )︃ (5.19)
1
𝜔˙ 𝑧 (𝑚𝑟𝑟 − 𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝑧𝑧 ) − 𝑚(𝑟𝜃 (𝜔𝑟2 + 𝜔𝑧2 ) − 𝑟𝑧 (𝜔𝜃 𝜔𝑧 − 𝜔˙ 𝑟 ))
𝜌
1
𝑆𝑧 = 𝜔𝑟 𝜔𝑧 (𝑚𝑟𝑟 + (𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝑟𝑟 − 𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝑧𝑧 )) + ...
𝜌
(5.20)
1
𝜔˙ 𝜃 ( (𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝜃𝜃 − 𝑚𝑟𝑟 ) + 𝑚(𝑟𝜃 (𝜔𝜃 𝜔𝑧 + 𝜔˙ 𝑟 ) − 𝑟𝑧 (𝜔𝑟2 + 𝜔𝜃2 ))
𝜌
Therefore, the internal loads during the detumbling procedure are expressed by Equa-
tions 5.18, 5.19, and 5.20.
Now, expressions for the internal moments are determined from the previous dy-
namics analysis. From Equation 5.17, expressions for 𝑀𝐵,𝜃 and 𝑀𝐵,𝑧 are clear.
Equation 5.14 yields the necessary expression for 𝑀𝑥 that simplifies the relationship
between 𝑀𝐵,𝑟 and the angular velocities and angular accelerations.
(𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝑟𝑟 𝜔˙ 𝑟 + (𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝑧𝑧 − 𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝜃𝜃 )𝜔𝜃 𝜔𝑧 ) (5.23b)
(𝐼𝐶,𝑧𝑧 − 𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝑧𝑧 − 𝐼𝐶,𝜃𝜃 + 𝐼𝐶𝑀 𝐶/𝑇 𝐴𝑅,𝜃𝜃 )𝜔𝜃 𝜔𝑧 (5.23c)
Therefore, the internal moments during the detumbling procedure are expressed by
Equations 5.21, 5.22, and 5.23c.
109
5.3 Discrete Solver for Docked Dynamics
The discrete solver takes as inputs the maximum time allotted for the maneuver,
the desired profile of the angular acceleration time history, a struct containing the
Chaser’s parameters, and a struct containing the Target’s parameters. The Chaser
and Target structs are constructed by separate functions before the discrete solver
is called. Copies of these functions are in Appendix C.2, Listings C.3 and C.4. The
functions that setup the Chaser and Target structs define important lengths of
the spacecraft with respect to their centers of mass, define the principal axis inertia
matrix with origin at the center of mass, and set up the initial conditions of both
translation and attitude.
Given these inputs, the discrete solver enters a while loop that it can only exit once
the magnitude of every element of the angular velocity is less than a certain tolerance
(tol = 0.001). A time step occurs at each iteration of the loop. If the maximum
time allotted is exceeded, the loop is exited and deemed unsuccessful. Otherwise, the
time span that actually occurred is recorded and outputted to the user, as well as are
the time histories of all the states and their derivatives.
During each iteration of the loop, the solver executes the following procedure:
𝐼𝑦𝑦 − 𝐼𝑧𝑧 ˙ ˙
𝜑¨ = 𝜃𝜓 (5.24)
𝐼𝑥𝑥
𝐼𝑧𝑧 − 𝐼𝑥𝑥 ˙ ˙
𝜃¨ = 𝜑𝜓 (5.25)
𝐼𝑦𝑦
𝐼𝑥𝑥 − 𝐼𝑦𝑦 ˙ ˙
𝜓¨ = 𝜑𝜃 (5.26)
𝐼𝑧𝑧
(a) If the Target may be nutating, the solver counteracts the roll angular
velocity first (before dealing with the pitch and yaw angular velocities) by
applying the functional form of the angular acceleration (user-defined) in
110
the roll direction. Once the roll angular velocity has magnitude less than
the solver’s tolerance, the solver will counteract the pitch and yaw angular
velocities in the same manner.
(b) If the Target cannot be nutating, the solver counteracts the angular ve-
locity in all three directions simultaneously via the user-defined functional
form of the angular acceleration.
3. If the Target has any translational acceleration, the solver counteracts it using
a constant acceleration functional form.
4. The solver takes the change in the three rotation angles from the previous it-
eration and finds the quaternion from the last iteration using a call to quat2dcm
and transposing it. This DCM is transposed and allocated as the CurrentB2IRot
for the current iteration. This matrix is R𝐵2𝐼 mentioned in Section 5.2. Thus,
this step updates the rotation matrix relating the body frame to the inertial
frame.
⃗ 𝐵 × (⃗𝜔𝐵 × ⃗𝑟𝐵 )
⃗𝑎𝑐𝑒𝑛𝑡 = 𝜔 (5.27)
⃗ 𝐵 × ⃗𝑟𝐵
⃗𝑎𝑎𝑛𝑔 = 𝛼 (5.28)
6. The centripetal and angular accelerations are rotated into the inertial frame us-
ing CurrentB2IRot and summed. These inertial accelerations are also summed
with the desired translational deceleration from Step 3.
111
7. The solver calculates the angular momentum balance of the Target with respect
to the aggregated system and solves for 𝑀𝑥 , 𝐹𝑧 , and 𝐹𝜃 to be used in determining
the imparted loads and moments on the Target (see Equation 5.14).
8. Now that the solver has determined the effect to the translation and angu-
lar accelerations, it numerically integrates to solve for translation and angular
velocity and position for the current iteration.
9. The current iteration ends and the exit conditions in the while loop are checked.
∫︁ 𝑡𝑓 (︂ √︁ )︂
𝐽= 𝑆𝜃 (𝑡) + 𝑆𝑧 (𝑡) + 𝑀𝐵,𝑟 (𝑡) + 𝑀𝐵,𝜃 (𝑡) + 𝑀𝐵,𝑧 (𝑡) + 𝜑¨2 (𝑡) + 𝜃¨2 (𝑡) + 𝜓¨2 (𝑡) dt
0
(5.29)
where each term is equally weighted. It is worth noting that each load and moment
term can either be positive or negative, implying some magnitude cancellations may
occur depending on the nature of the Target’s tumble. Future work could include re-
fining this objective value to use absolute values of each load and moment. Moreover,
an objective function that seeks to minimize the maximum loads and moments of the
detumble would be a worthwhile case to investigate for fragile Targets.
Both methods, which are discussed in detail in the following sections, minimized
the objective function by optimizing the angular acceleration profiles. However, the
first method achieved this through an indirect approach while the second method
accomplished this directly.
112
5.4.1 Indirect Optimization on Angular Acceleration Profiles
∫︁ 𝑡𝑓
min 𝐽 = ( 𝑆𝜃 (𝑡) + 𝑆𝑧 (𝑡) + 𝑀𝐵,𝑟 (𝑡) + 𝑀𝐵,𝜃 (𝑡) + 𝑀𝐵,𝑧 (𝑡) + ...
Δ𝑡𝑑𝑒𝑠 0
√︁
¨ Δ𝑡𝑑𝑒𝑠 )2 + 𝜃(𝑡,
𝜑(𝑡, ¨ Δ𝑡𝑑𝑒𝑠 )2 + 𝜓(𝑡,
¨ Δ𝑡𝑑𝑒𝑠 )2 ) dt (5.30)
Four functional forms of the angular acceleration profiles were utilized in the
optimization and the results were compared against one another to determine which
provided the lowest cost. A description of these functional forms in provided in the
subsequent section.
This indirect optimization process used the MATLAB function fmincon. The
discrete solver previously described was the function input for the call to fmincon.
Thus, the optimization iteratively called the discrete solver whilst changing (Δ𝑡𝑑𝑒𝑠 ) to
minimize the objective function. For the sake of re-creation, the optimization settings
are detailed in Table 5.2. The following section describes the angular acceleration
functional forms.
Table 5.2: fmincon optimization options used in the indirect optimization of angular
acceleration profiles
In forming this optimization problem, angular acceleration functional forms were first
selected. Simple functions for the four desired forms were implemented in the discrete
solver function. These forms are denoted as Constant, Positive Linear, Negative
113
Linear, and Negative Quadratic. These functions determine the change in angular
acceleration that the Chaser needs to provide to counteract the Target’s angular
velocity. The effective time history in angular velocity that these functional forms
provide is qualitatively illustrated in Figures 5-5a-5-5d. In these figures, 𝜔𝑖𝑛𝑖𝑡𝑖𝑎𝑙 is the
initial angular velocity, 𝑡𝑤𝑎𝑖𝑡 is a user-defined variable indicating a desired time to
wait before starting the detumble procedure, and Δ𝑡𝑑𝑒𝑠𝑖𝑟𝑒𝑑 is the desired time for the
maneuver to complete. The angular acceleration functional forms are defined using
the given variables by Equations 5.31-5.34.
(c) Negative linear angular acceleration (d) Negative quadratic angular acceler-
ation
Figure 5-5: Expected angular velocity time histories from integration of selected
angular acceleration functional forms
114
𝜔
⃗ 𝑖𝑛𝑖𝑡𝑖𝑎𝑙
⃗˙ 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 = −
𝜔 (5.31)
Δ𝑡𝑑𝑒𝑠𝑖𝑟𝑒𝑑
𝜔
⃗ 𝑖𝑛𝑖𝑡𝑖𝑎𝑙
⃗˙ 𝑃 𝐿 = 2
𝜔 (𝑡 − (Δ𝑡𝑑𝑒𝑠𝑖𝑟𝑒𝑑 + 𝑡𝑤𝑎𝑖𝑡 )) (5.32)
(Δ𝑡𝑑𝑒𝑠𝑖𝑟𝑒𝑑 )2
𝜔
⃗ 𝑖𝑛𝑖𝑡𝑖𝑎𝑙
⃗˙ 𝑁 𝐿 = −2
𝜔 (𝑡 − 𝑡𝑤𝑎𝑖𝑡 ) (5.33)
(Δ𝑡𝑑𝑒𝑠𝑖𝑟𝑒𝑑 )2
𝜔
⃗ 𝑖𝑛𝑖𝑡𝑖𝑎𝑙
⃗˙ 𝑁 𝑄 = −3
𝜔 3
(𝑡 − 𝑡𝑤𝑎𝑖𝑡 )2 (5.34)
(Δ𝑡𝑑𝑒𝑠𝑖𝑟𝑒𝑑 )
These additional angular acceleration profiles are solved for on each iteration
of the discrete solver. Which profile the solver uses is selected by the user – it is
an input to the function call of the discrete solver. The use of pre-defined angular
acceleration profiles distinguish this optimization method from the secondary method
and necessitates that the optimization occurs on the variable Δ𝑡𝑑𝑒𝑠 .
Results
Using the aforementioned objective function (Equation 5.29), the following nested
for loops was executed to produce the results in Table 5.3. The potential spacecraft
shapes were spherical, rectangular prism, or cylindrical. The pre-defined angular
velocities for each type of spin were: [0, 0, 5] 𝑑𝑒𝑔
𝑠
for flat spin, [2, 2, 2] 𝑑𝑒𝑔
𝑠
for 3D spin,
[1, 2, 3] 𝑑𝑒𝑔
𝑠
for nutation.
115
Although two values were used in Algorithm 1 for Δ𝑡, the results presented in Ta-
ble 5.3 are the results from providing an initial guess of Δ𝑡 = 150𝑠. The optimization
routine outputted the optimal Δ𝑡 corresponding to the lowest cost. Only the results
for the initial guess of Δ𝑡 = 150𝑠 are displayed because the initial guess of Δ𝑡 = 5𝑠
occasionally produced a nonsensically large cost, suggesting an issue with the discrete
solver attempting to detumble the Target in such a short period of time.
116
In Table 5.3, the cost numerics nominally have three significant figures except
to distinguish the difference between costs for the same shape and spin. For the
spherical spacecraft, the positive linear angular acceleration functional form provides
the lowest cost with a Δ𝑡 = 5𝑠 for both the flat and 3D spins. For the rectangular
prism spacecraft, the negative quadratic angular acceleration functional form provided
the lowest cost for the flat and 3D spins (yielding the largest Δ𝑡 for both). However,
for the nutating spin, the positive linear form provided the lowest cost (half of the
second lowest cost). Similarly, for the cylindrical spacecraft, the negative quadratic
form yielded the lowest cost for the flat and 3D spins, and the positive linear form
yielded the lowest cost for the nutating spin. This data suggests that if a Target is
nutating, regardless of its shape, a positive linear angular acceleration profile is the
optimal profile form for minimizing Equation 5.29. Additionally, these results suggest
that for an axisymmetric spacecraft that is not nutating (i.e. it has a flat spin or a
general 3D spin), a negative quadratic angular acceleration profile is the optimal form
for minimizing Equation 5.29.
117
Problem Formulation
This problem was constructed as one phase in GPOPS with the following mathemat-
ical form.
∫︁ 𝑡𝑓
min 𝐽 = ( 𝑆𝜃 (𝑡) + 𝑆𝑧 (𝑡) + 𝑀𝐵,𝑟 (𝑡) + 𝑀𝐵,𝜃 (𝑡) + 𝑀𝐵,𝑧 (𝑡) + ...
𝛼
⃗ (𝑡) 0
√︁ )︂
¨ 2 + 𝜃(𝑡)
𝜑(𝑡) ¨ 2 + 𝜓(𝑡)
¨ 2 dt (5.35)
where
⎡ ⎤
¨
⎢ 𝜑(𝑡) ⎥
⎢ ⎥
⎢ ¨
⃗ (𝑡) = ⎢ 𝜃(𝑡)
𝛼 (5.36)
⎥
⎥
⎢ ⎥
¨
⎣ ⎦
𝜓(𝑡)
where ⃗𝑟𝐵 is the position vector from the Target’s CM to the Chaser’s CM in the body frame
⎡ ⎤
⎢ 𝑢𝜑 ⎥
⎢ ⎥
𝛼 ⃗˙ = ⎢
⃗ =𝜔 ⎢ 𝑢𝜃 ⎥
⎥
(5.38)
⎢ ⎥
⎣ ⎦
𝑢𝜓
⎡ ⎤ ⎡ ⎤
𝑞𝑤 ⎥ ˙ 𝑥
− 12 (𝜑𝑞 + 𝜃𝑞˙ 𝑦 + 𝜓𝑞˙ 𝑧)
⎢ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
1 ˙ ˙ ˙
𝑑
⎢
𝑞𝑥 ⎥ ⎢
( 𝜑𝑞 𝑤 + 𝜃𝑞 𝑧 − 𝜓𝑞 𝑦 ) ⎥
⃗𝑞˙ = 2
⎢ ⎥ ⎢ ⎥
⎢ ⎥ = ⎢ ⎥ (5.39)
𝑑𝑡 ⎢
⎢
⎥
𝑞𝑦 ⎥
⎢ 1
˙ 𝑧
⎢ (−𝜑𝑞 ˙ 𝑤 + 𝜓𝑞
+ 𝜃𝑞 ˙ 𝑥) ⎥
⎥
⎢ ⎥ ⎢ 2 ⎥
⎣ ⎦ ⎣ ⎦
1 ˙ ˙ 𝑥 + 𝜓𝑞
˙ 𝑤)
𝑞𝑧 2
(𝜑𝑞𝑦 − 𝜃𝑞
⎡ ⎤
2 2 2 2
⎢ 𝑞𝑤 + 𝑞𝑥 − 𝑞𝑦 − 𝑞𝑧 2(𝑞𝑥 𝑞𝑦 − 𝑞𝑧 𝑞𝑤 ) 2(𝑞𝑥 𝑞𝑧 + 𝑞𝑦 𝑞𝑤 ) ⎥
⎢ ⎥
R𝐵2𝐼 = 2(𝑞𝑥 𝑞𝑦 + 𝑞𝑧 𝑞𝑤 ) 𝑞𝑤2 − 𝑞𝑥2 + 𝑞𝑦2 − 𝑞𝑧2 2(𝑞𝑦 𝑞𝑧 − 𝑞𝑥 𝑞𝑤 ) (5.40)
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎣ ⎦
2(𝑞𝑥 𝑞𝑧 − 𝑞𝑦 𝑞𝑤 ) 2(𝑞𝑦 𝑞𝑧 + 𝑞𝑥 𝑞𝑤 ) 𝑞𝑤2 − 𝑞𝑥2 − 𝑞𝑦2 + 𝑞𝑧2
118
subject to the inequality path constraints
√︁
𝜁 − 1 × 10−4 ≤ 𝑥(𝑡)2 + 𝑦(𝑡)2 + 𝑧(𝑡)2 ≤ 𝜁 + 1 × 10−4 (5.41)
√︁
𝜁= 𝑥(0)2 + 𝑦(0)2 + 𝑧(0)2
In order to mimic the construction of the indirect optimization process, the control
was constrained to be [−0.007, −0.007, −0.007] ≤ ⃗𝑢 ≤ [0.007, 0.007, 0.007] rad
𝑠2
.
Results
Table 5.4 indicates the resultant Δ𝑡 and cost from the direct optimization process. In
this instance, the cost is calculated via cumtrapz in order to parallel the computation
from the indirect method. GPOPS-II was not able to converge to a solution for the 3D
spin of the spherical spacecraft. The hypothesized root cause is that the optimization
was not able to determine which axis to prioritize detumbling since there was no
difference in the axes’s inertia ratios or in the spin rate. Therefore, the optimization
ends having only exceeded its iteration limits rather than finding the optimal solution.
For the 3D spin, the rectangular prism and cylindrical spacecraft are initialized
with an angular velocity vector [2, 2, 2]𝑇 deg
s
. The spacecraft have the same dimensions
and mass, but their moments of inertias are intrinsically different. Such a difference
accounts for the slight variation in the control time history, illustrated in Figures 5-6a
and 5-6b, as well as the time duration and associated cost.
119
(a) Rectangular prism spacecraft (b) Cylindrical spacecraft
For the three spacecraft – spherical, rectangular prism, cylindrical – the control
effort about the 𝜓 axis follows a similar pattern over the time duration. The control 𝑢𝜓
initially starts at the minimum −0.007, increases in the positive direction (decreases
in negative magnitude), and returns to the minimum −0.007 around 𝑡 = 4 seconds.
The control history for the 𝜑 and 𝜃 axes of the rectangular prism and cylindrical
spacecraft are nearly identical, varying slightly at a handful of time steps (see Figures
5-7b and 5-7c). This is expected since they are both axisymmetric and equivalent in
mass and dimensions, yet they vary in their moment of inertia. Contrastingly, the
spherical spacecraft is trisymmetric, and the control history for 𝜑 and 𝜃 are noticeably
different than that of its counterparts (see Figure 5-7a).
While not identical, the control history results of the rectangular prism and cylin-
drical spacecraft are similar. Both are initialized with an angular velocity vector of
[1, 2, 3]𝑇 deg
s
. Similar to the 3D spin, the difference in the control time history is due
to the variation in the inertia ratios, displayed in Figures 5-8a and 5-8b, as well as
the time duration and cost.
Generally, the optimal Δ𝑡 from the direct optimization was smaller across the board
than that yielded from the indirect optimization. However, the minimal cost from
the indirect optimization method was nominally on the order of magnitude of 10−2 or
120
(a) Spherical spacecraft (b) Rectangular prism spacecraft
Figure 5-7: Angular acceleration profiles as spacecraft initially rotate about 𝜓-axis
smaller (23 out of 24 results) whereas the direct optimization yielded five out of seven
results with a cost 10−2 or smaller. This suggests that the indirect optimization can
provide an optimal or near-optimal angular acceleration profile for less computation
time. Additionally, this suggests that the patterns recognized from the indirect opti-
mization’s yielded results would be applicable as a near-optimal angular acceleration
121
profile – no longer necessitating an optimization to occur in-flight. To further vali-
date this point, more functional forms of the angular acceleration should be tested
using the indirect optimization method and more experimental spacecraft should be
utilized for comparison.
122
Chapter 6
123
Earth orbit. In-space assembly would encourage science missions that require space
telescopes than what can reasonably be stowed in a payload fairing of a launch vehicle
and develop orbiting stations like the ISS. Moreover, autonomous in-space assembly
would allow for such developments in remote locations unaccessible by astronauts.
Chapter 1 also covered a discussion of the current status of the SPHERES testbed,
as that motivated the work outlined in Chapter 4. Additionally, the ROAM project
is briefly described, as it was the impetus for the research detailed in Chapters 3 and
5. The research objective was formulated as as contributing towards the feasibility of
regular and repeatable in-space close proximity missions where a Chaser spacecraft
is interacting with an uncooperative, tumbling Target.
124
by Sternberg that was hypothesized based on evidence that a fuel-optimal radially
synchronous trajectory of a Chaser approaching a Target was one in which the mag-
nitudes of radial and tangential acceleration components were equal. While that
conclusion may be true, a vectorized differential equation that equates the radial
and tangential acceleration components is not valid as shown by the simple flat spin
case. Additionally, it was shown that a trajectory produced from solving this equa-
tion with ode45 yielded an outward bound path. Before this conclusion was drawn,
a software framework for propagating this differential equation was developed in C
code for use on SPHERES. Thus, this chapter details the execution sequence of var-
ious critical points in order to produce a series of waypoints that encapsulate the
trajectory for a Chaser to follow. This propagator software can be applied to any
trajectory-generating differential equation.
In Chapter 5, Stage 3 of the ROAM mission was modeled as the Chaser already
docked with the Target. This modeling included the fleshed out development of the
125
contact dynamics that occur while docking. This is of particular interest for the sce-
nario in which the Target is fragile, since it is undesirable to break the Target up
by applying too much force or torque. This fragility is not only a concern for the
contact dynamics but also when the Chaser detumbles the Target to bring it to a
standstill. The Chaser maintains synchronous motion about the Target’s center of
mass once it has docked, but it exerts an angular acceleration in order to bring the
aggregated standstill. These dynamics were setup in a discrete solver in MATLAB.
Two optimization methods were employed to optimize the angular acceleration profile
in order to minimize a cost function of fuel consumption and the loads and moments
imparted on the Target. Results indicated that the indirect optimization method
produced near-optimal results relative to the direct optimization process. These re-
sults suggested that further offline optimizations for different angular acceleration
functional forms and characteristic spacecraft inertias would provide a useful lookup
table for providing near-optimal in-flight solutions.
6.2 Contributions
This section briefly lists the contributions presented in this thesis, as follows:
126
• Closed-loop unit tests for validating updated mixers designed with respect to
specific thruster degradation
• Implementation of contact dynamics from [67] that output the impulsive force
and torque a tumbling Target experiences during docking
• Invest more time in investigating the relationship Sternberg was onto regarding
tangential and radial acceleration magnitudes being equivalent for fuel-optimal
R-bar approaches
127
• Implement and validate the trajectory-generating differential equation propa-
gator on SPHERES
• Validate the 6-DOF in-flight adaptive PID sliding mode controller in simulation
and then on SPHERES onboard the ISS
• Complete Monte Carlo simulations of the in-flight adaptive PID sliding mode
controller to evaluate how robustly it performs
• Test more general functional forms of angular acceleration profiles for the indi-
rect optimization of the detumbling procedure between a docked Chaser-Target
system
128
Appendix A
Trajectory Optimization
25 %% Set variables
26 num_dt = 100; % Number of time steps
27 NUM_TERMS = 6; % Number of terms to use in function fitting
129
28 omega = 5/norm([0 0 1])*[0 0 1]'; % Initial angular velocity of ...
Target
29 r0 = 10; % Initial radial distance between Chaser and Target
30 rf = 1; % Final radial distance between Chaser and Target
31 inertia_ratio = [1 1 1]'; % Diagonal of inertia matrix
32 fit_type = {'exponential'}; % Options: ...
{'polynomial','exponential','logistic'}
33 %Tend = 33; % Final times for optimization
34 Tend = [1 20 33 55 240];
35 for j=1:length(Tend)
36 %% 1. Find the Fuel Optimal Trajectory
37
38 % Setup for fmincon call
39 A = ones(num_dt);
40 b = Tend(j)*ones(num_dt,1);
41 Aeq = ones(1,num_dt);
42 beq = Tend(j);
43 lb = zeros(num_dt,1);
44 ub = Tend(j)*ones(num_dt,1);
45
75 optimal_time_history = t_out;
76 optimal_radial_distribution = r;
77
130
78 DV_computed = ...
DeltaV_dt_r_omega0(dt_out,optimal_radial_distribution,...
79 omega,inertia_ratio,1)
80 % Create struct
81 DV_computed_struct.dt_out(:,j) = dt_out;
82 DV_computed_struct.DV(j) = DV_computed;
83 DV_computed_struct.DV_out(j) = DV_out;
84 DV_computed_struct.Tend(j) = Tend(j);
85 DV_computed_struct.Alin(:,:,j) = Alin;
86 DV_computed_struct.Acen(:,:,j) = Acen;
87 DV_computed_struct.Acor(:,:,j) = Acor;
88 DV_computed_struct.Aang(:,:,j) = Aang;
89 end
90 save('DV_computed_final.mat','DV_computed_struct');
91 keyboard
92 % Currently, the below code is not designed with the for loop, so ...
it will
93 % just use the last optimal radial distribution and time ...
distribution.
94 %% 2. Fit a parameterized approximation to the fuel optimal ...
trajectory
95 [fcnfit_opt,fit_error,B_list]=fit_param_approx(...
96 optimal_radial_distribution, optimal_time_history, r0, rf,...
97 fit_type,NUM_TERMS, num_dt);
98 DV_fit1 = ...
DeltaV_dt_r_omega0(dt_out,fcnfit_opt(2,:),omega,inertia_ratio,1)
99
100 %% 3. Find the 2-term Fuel Optimal Exponential Trajectory
101 t_vec = linspace(0,Tend,num_dt+1);
102 dt = diff(t_vec);
103
104 % Nonlinear constrainted optimization function with argument b - ...
the coefficients.
105 nonlcon = @(b)TrajectoryOptimizerVariableStudy_nonlconfunc_B(...
106 t_vec,b,r0,rf,'exponential');
107
108 scaling_vec = [1; 1; 1; 1];
109
131
126 for i = 1:length(dt)
127 t_out(i+1) = t_out(i) + dt(i);
128 end
129
130 % Calculates radial profile of Chaser by time history done for ...
optimization
131 % of the coefficients - 2-term exponential
132 r = exp_coeff_out(1)*exp(-exp_coeff_out(2)*t_out) + ...
133 exp_coeff_out(3)*exp(-exp_coeff_out(4)*t_out);
134
135 x = t_out; % Re-naming variable
136 yx = r; % Re-naming variable; this is the optimized exp ...
trajectory
137 % This is the 100 points along optimal 2-term exponential trajectory
138 figure();
139 plot(t_out,r);
140 title({'Optimal Radial Distance ...
Profile';['\DeltaV=',num2str(DV_out2),'m/s']})
141 xlabel('Time [s]')
142 ylabel('Radius [m]')
143
144 % This is finding the deltaV from the optimal exp trajectory
145 DeltaV_Optimal = DeltaV_dt_r_omega0(dt,yx',omega,inertia_ratio,1);
146
147 %% 4. Fitting the exponential optimal trajectory!
148 [fcnfit_exp_opt,fit_error,B_list]=fit_param_approx(yx', x, r0, ...
rf, fit_type,NUM_TERMS, num_dt);
149
150 num_terms = NUM_TERMS;
151 for i = 1:num_terms
152 switch i
153 case 1
154 fit_coeffs = B_list{1}(:,end);
155 r_fit = fit_coeffs(1).*exp(-fit_coeffs(2).*x);
156 case 2
157 fit_coeffs = B_list{2}(:,end);
158 r_fit = fit_coeffs(1).*exp(-fit_coeffs(2).*x) + ...
fit_coeffs(3).*exp(-fit_coeffs(4).*x);
159 case 3
160 fit_coeffs = B_list{3}(:,end);
161 r_fit = fit_coeffs(1).*exp(-fit_coeffs(2).*x) + ...
fit_coeffs(3).*exp(-fit_coeffs(4).*x) + ...
fit_coeffs(5).*exp(-fit_coeffs(6).*x);
162 case 4
163 fit_coeffs = B_list{4}(:,end);
164 r_fit = fit_coeffs(1).*exp(-fit_coeffs(2).*x) + ...
fit_coeffs(3).*exp(-fit_coeffs(4).*x) + ...
fit_coeffs(5).*exp(-fit_coeffs(6).*x) +...
165 fit_coeffs(7).*exp(-fit_coeffs(8).*x);
166 case 5
167 fit_coeffs = B_list{5}(:,end);
168 r_fit = fit_coeffs(1).*exp(-fit_coeffs(2).*x) + ...
fit_coeffs(3).*exp(-fit_coeffs(4).*x) + ...
fit_coeffs(5).*exp(-fit_coeffs(6).*x) +...
132
169 fit_coeffs(7).*exp(-fit_coeffs(8).*x) + ...
fit_coeffs(9).*exp(-fit_coeffs(10).*x);
170 case 6
171 fit_coeffs = B_list{6}(:,end);
172 r_fit = fit_coeffs(1).*exp(-fit_coeffs(2).*x) + ...
fit_coeffs(3).*exp(-fit_coeffs(4).*x) + ...
fit_coeffs(5).*exp(-fit_coeffs(6).*x) +...
173 fit_coeffs(7).*exp(-fit_coeffs(8).*x) + ...
fit_coeffs(9).*exp(-fit_coeffs(10).*x) + ...
fit_coeffs(11).*exp(-fit_coeffs(12).*x);
174 end
175
176 R_FIT2(:,i) = r_fit;
177 DeltaV_Fit(i) = ...
DeltaV_dt_r_omega0(dt,r_fit',omega,inertia_ratio,0);
178
179 end
180
181 DeltaV_Fit_Normalized = DeltaV_Fit/DeltaV_Optimal; % optimal exp ...
trajectory
182
183 % Deducing that 2-term is fit, plot radial profile using two-terms
184 figure()
185 plot(x,R_FIT2(:,2));
186 grid on;
187 xlabel('Time [s]')
188 ylabel('Radius [m]')
189 title('Radial Distance of Exponential Fits')
190
191 figure()
192 plot(DeltaV_Fit_Normalized);
193 grid on;
194 xlabel('Number of Terms')
195 ylabel('Normalized \DeltaV')
196 title('Fit \DeltaV Normalized by Optimal \DeltaV')
197
198 DeltaV_dt_r_omega0(dt,R_FIT2(:,2)',omega,inertia_ratio,1)
199
133
Listing A.2: DeltaV_dt.m
1 function DeltaV = ...
DeltaV_dt(dt_list,omega,r0,rf,inertia_ratio,exp_coefficients)
2 % This function is used in optimizations to determine the optimal ...
dt_list
3
4 if nargin < 6
5 work_with_exponentials = 0;
6 else
7 work_with_exponentials = 1;
8 end
9
10 %Clear the data vectors
11 r_SVC_INT = [r0; 0; 0]; % [m]
12 r_SVC_TAR = r_SVC_INT; % A convenient assumption
13
14 I_TAR = diag(inertia_ratio);
15 omega_TAR_INT = deg2rad(omega); % rate of target in inertial frame
16
17 %linear velocity of servicer relative to static target in ...
inertial frame
18 v_SVC_INT = fast_cross(omega_TAR_INT,r_SVC_INT);
19 % Make sure this is consistent with other deltaV function
20
21 q_TAR_INT = [0; 0; 0; 1]; %quaternion from inertial frame to ...
target frame
22 q_UDP_TAR = [0; 0; 0; 1]; %quaternion from target frame to ...
inertial frame
23
24 % Initialize variables
25 initialize_zeros
26 num_iter = length(dt_list);
27
28 % create the time history
29 for i=1:num_iter
30 t(i+1) = t(i) + dt_list(i);
31 end
32
33 % Define radial distribution
34 if work_with_exponentials
35 rad_dist = exp_coefficients(1)*exp(-exp_coefficients(2)*t) + ...
36 exp_coefficients(3)*exp(-exp_coefficients(4)*t);
37 else % i.e. for full optimization
38 rad_dist = logspace(log10(r0),log10(rf),num_iter+1);
39 end
40 r = r0;
41
42 % Propagate the radial approach
43 for i = 1:num_iter
44 if r(i) < rf
45 break;
46 end
47
134
48 dt = dt_list(i);
49 tumbling_dynamics
50
51 % Calculate accelerations
52 acc_DV_calculations
53
54 % Normalize r to compare against rf
55 r(i+1) = norm(r_SVC_TAR(:,i+1));
56
57 t(i+1) = t(i) + dt;
58 end % end loop of simulating time until end of spiral
59
60 assignin('base','funcT',t)
61 assignin('base','funcR',rad_dist);
62
63 DV_TOT = DV_total(end);
64
65 DeltaV = DV_TOT;
66
67 end
135
26 #i n c l u d e <math . h>
27
28 #i f d e f SPH_MATLAB_SIM
29 #i n c l u d e " . . / S i m u l a t i o n / v a s S i m u l a t o r . h "
30 #i n c l u d e " mex . h "
31 #d e f i n e DEBUG( a r g ) m ex Pri nt f a r g
32 #e l s e
33 #d e f i n e DEBUG( a r g )
34 #e n d i f
35
36 // Real i n f o
37 f l o a t I_TAR [ 3 ] [ 3 ] = { { 0 . 0 2 8 8 5 6 0 9 3 5 8 3 8 8 3 0 0 0 f , - 0 . 0 0 0 2 7 1 7 6 0 4 2 6 0 2 9 4 2 1 f ...
, 0.001061424114444470 f } ,
38 { - 0 . 0 0 0 2 7 1 7 6 0 4 2 6 0 2 9 4 2 1 f , 0 . 0 5 5 9 8 6 6 0 2 5 4 4 4 4 9 5 0 0 f , ...
0.000183704942897512 f } ,
39 { 0 . 0 0 1 0 6 1 4 2 4 1 1 4 4 4 4 4 7 0 f , 0 . 0 0 0 1 8 3 7 0 4 9 4 2 8 9 7 5 1 2 f , ...
0.058822298355749900 f }};
40 // TODO: c a l c u l a t e t h i s i n v e r s e i n f u n c t i o n
41 f l o a t inv_I_TAR [ 3 ] [ 3 ] = { { 3 4 . 6 7 9 3 6 7 7 9 5 3 4 7 2 1 1 f , 0 . 1 7 0 3 8 9 6 1 1 6 0 6 0 6 6 f , ...
-0.626307024637702 f } ,
42 { 0.170389611606066 f , 17.862436235713918 f , -0.058859880828906 f } ,
43 { - 0 . 6 2 6 3 0 7 0 2 4 6 3 7 7 0 2 f , - 0 . 0 5 8 8 5 9 8 8 0 8 2 8 9 0 6 f , 1 7 . 0 1 1 8 4 1 0 5 6 9 0 8 0 8 6 f ...
}};
44
45 // a n g u l a r a c c e l e r a t i o n i n i t i a l
46 f l o a t omega_dot_TAR_INT[ 3 ] = { 0 . 0 f , 0 . 0 f , 0 . 0 f } ;
47
48 // q_dot i n i t i a l
49 f l o a t q_dot_TAR_INT[ 4 ] = { 1 . 0 f , 0 . 0 f , 0 . 0 f , 0 . 0 f } ;
50
51 float I_by_omega [ 3 ] ;
52 float new_omega_TAR_INT [ 3 ] ;
53 float new_omega_dot_TAR_INT [ 3 ] ;
54 float new_q_TAR_INT [ 4 ] ;
55 float new_q_dot_TAR_INT [ 4 ] ;
56 float int_new_q_dot_TAR_INT [ 4 ] ;
57 float cross_prod [ 3 ] ;
58 float int_q_dot [ 4 ] ;
59 float q_dot_TAR_INT [ 4 ] ;
60 float quat_term [ 4 ] ;
61 float quat_term3 [ 3 ] ;
62 float quat_term_vec_norm ;
63 float temp ;
64 float quat_exponential_term [ 4 ] ;
65 float quat_exp_sin [ 3 ] ;
66 float q_TAR_INT_conj [ 4 ] ;
67 float new_q_TAR_INT_conj [ 4 ] ;
68 float array_with_zero [ 4 ] ;
69 float dt_setup = - 1 . 0 f ;
70
71 // Back p r o p a g a t e
72 f l o a t rdot_SVC_TAR [ 3 ] = { 0 . 0 1 f , 0 . 0 f , 0 . 0 f } ; // s l o w a r r i v a l
73 float B[ 3 ] [ 3 ] ;
74 float C[ 3 ] [ 3 ] ;
136
75 i n t i , j , k , l ,m;
76 float A[ 6 ] [ 6 ] ;
77 float x [6];
78 f l o a t drdot [ 3 ] ;
79 f l o a t dxdt [ 6 ] ;
80 f l o a t new_r_SVC_TAR [ 3 ] ;
81 f l o a t new_rdot_SVC_TAR [ 3 ] ;
82 f l o a t new_r_SVC_INT [ 3 ] ;
83 f l o a t new_rdot_SVC_INT [ 3 ] ;
84 int counter ;
85 f l o a t q_UDP_INT [ 4 ] ;
86 float G[ 3 ] [ 3 ] ;
87 f l o a t dotproduct ;
88 f l o a t crossproduct ;
89 f l o a t temp_radial_profile [ 2 0 0 0 ] [ 3 ] ;
90 f l o a t x_factor ;
91 i n t non_zero =0;
92
93 /∗ f o r quat check ∗/
94 f l o a t z_rot [ 4 ] = { 0 . 0 f , 0 . 0 f , - 1 . 0 f , 0 . 0 f } ;
95 f l o a t checkTargetQuat [ 4 ] ;
96 f l o a t compWDesired ;
97 // f l o a t old_compWDesired = 0 . 0 f ;
98
99 /∗ ∗∗∗∗∗∗ Check i f q u a t e r n i o n i s a l i g n e d ∗∗∗∗∗∗ ∗/
100 void quaternionCheck ( f l o a t ∗ c t r l S t a t e , f l o a t ∗ tgtState , i n t f l a g ) {
101 // I s Chaser a l m o s t a l o n g r - bar o f Target ? I f not , i t w a i t s .
102 quatMult_noNorm ( checkTargetQuat , &c t r l S t a t e [QUAT_1] , z_rot ) ;
103
104 // Compare checkTargetQuat with t g t S t a t e [QUAT_2]
105 compWDesired = checkTargetQuat [ 1 ] - t g t S t a t e [QUAT_2 ] ; // TODO: ...
update t h i s s o t h a t i t i s f l e x i b l e f o r a x i s r - bar i s a l o n g
106
107 i f ( ( compWDesired < 0 . 0 5 f ) && ( compWDesired > - 0 . 0 5 f ) ) {
108 flag = 1;
109 }
110 }
111
112
113 /∗ ∗∗∗∗∗∗ Forward Propagate f o r TAR ' s q , qdot , omega , omegadot i n f o ...
∗∗∗∗∗∗ ∗/
114 v o i d f o r w a r d P r o p a g a t e ( f l o a t ∗ t g t S t a t e , f l o a t q_TAR_INT_array...
[ 2 0 0 0 ] [ 4 ] , f l o a t omega_TAR_INT_array [ 2 0 0 0 ] [ 3 ] , f l o a t ...
q_dot_TAR_INT_array [ 2 0 0 0 ] [ 4 ] , f l o a t omega_dot_TAR_INT_array...
[2000][3]){
115 // Forward p r o p a g a t e q_TAR_INT and omega_TAR_INT a s p e c i f i e d ...
number o f time c o n s t a n t s t o d e t e r m i n e when backwards ...
propagation should s t a r t
116 // I n p u t s : c u r r e n t Target ' s q u a t e r n i o n and a n g u l a r r a t e . I n e r t i a ...
from e s t i m a t i o n p r o c e s s .
117 // Outputs : f u t u r e q u a t e r n i o n and a n g u l a r r a t e s f o r s p e c i f i e d ...
number o f p e r i o d s
118
119 // r o t a t i o n r a t e
137
120 f l o a t omega_TAR_INT [ 3 ] ;
121 memcpy(&omega_TAR_INT [ 0 ] , &t g t S t a t e [RATE_X] , s i z e o f ( f l o a t ) ∗ 3 ) ; ...
// [ rad / s ]
122 omega_TAR_INT_array [ 0 ] [ 0 ] = omega_TAR_INT [ 0 ] ;
123 omega_TAR_INT_array [ 0 ] [ 1 ] = omega_TAR_INT [ 1 ] ;
124 omega_TAR_INT_array [ 0 ] [ 2 ] = omega_TAR_INT [ 2 ] ;
125
126 f l o a t q_TAR_INT [ 4 ] ;
127 memcpy(&q_TAR_INT [ 0 ] , &t g t S t a t e [QUAT_1] , s i z e o f ( f l o a t ) ∗ 3 ) ;
128 q_TAR_INT_array [ 0 ] [ 0 ] = q_TAR_INT [ 0 ] ;
129 q_TAR_INT_array [ 0 ] [ 1 ] = q_TAR_INT [ 1 ] ;
130 q_TAR_INT_array [ 0 ] [ 2 ] = q_TAR_INT [ 2 ] ;
131 q_TAR_INT_array [ 0 ] [ 3 ] = q_TAR_INT [ 3 ] ;
132
138
172 memset(&new_omega_TAR_INT, 0 , s i z e o f ( f l o a t ) ∗ 3 ) ;
173
197 /∗ C o n s t r u c t qdot e q u a t i o n ∗/
198 f o r ( i =0; i <3; i ++){
199 array_with_zero [ i ] = omega_TAR_INT [ i ] ;
200 }
201 array_with_zero [ 3 ] = 0 . 0 f ;
202 quatMult_noNorm ( int_q_dot , q_TAR_INT, array_with_zero ) ;
203
204 f o r ( i =0; i <4; i ++){
205 new_q_dot_TAR_INT [ i ] = 0 . 5 f ∗ int_q_dot [ i ] ;
206 int_new_q_dot_TAR_INT [ i ] = ( dt ) ∗new_q_dot_TAR_INT [ i ] ;
207 }
208
139
218
219 // Normalize quat_term3
220 temp = 0 ;
221 f o r ( j =0; j <3; j ++){
222 temp += quat_term3 [ j ] ∗ quat_term3 [ j ] ;
223 }
224 quat_term_vec_norm = s q r t f ( temp ) ;
225
140
261
262 // This s h o u l d o c c u r a f t e r e v e r y e s t i m a t i o n s t a g e .
263 // I n i t i a l l y , s e t u p d o e s not p r o v i d e e s t i m a t i o n knowledge o f ...
Target s o we ' l l u s e t r u e knowledge f i r s t
264 // Output : P r o f i l e f o r Chaser t o f o l l o w (r_SVC_INT)
265
266 // Trim a r r a y s down
267 f o r ( i =0; i <1999; i ++){
268 i f ( ( q_TAR_INT_array [ i ] [ 0 ] ! = 0 ) | | (q_TAR_INT_array [ i ] [ 1 ] ! = 0 ) ...
| | (q_TAR_INT_array [ i ] [ 2 ] ! = 0 ) | | (q_TAR_INT_array [ i ] [ 3 ] ! = 0 ) ) {
269 non_zero++;
270 }
271 }
272 i n t i d = non_zero - 1 ;
273
274 f l o a t dt = dt_setup ;
275
276 // r _ i n i t i a l = Chaser ' s c u r r e n t p o s i t i o n o f f s e t by t h e t a r g e t ' s ...
position
277 float r_initial [3];
278 f o r ( i =0; i <3; i ++){
279 r_initial [ i ] = ctrlState [ i ] - tgtState [ i ] ;
280 }
281
282 f l o a t q_TAR_INT [ 4 ] ;
283 memcpy(&q_TAR_INT [ 0 ] , &q_TAR_INT_array [ i d ] [ 0 ] , s i z e o f ( f l o a t ) ∗ 4 ) ;
284
285 // r o t a t i o n r a t e
286 f l o a t omega_TAR_INT [ 3 ] ;
287
288 // DCM t r a n s f o r m a t i o n f o r d e s i r e d o f f s e t from Target ' s CG
289 f l o a t dcm_init [ 3 ] [ 3 ] ;
290 dcm_from_quat ( dcm_init , q_TAR_INT) ;
291 f l o a t r_SVC_INT [ 3 ] ;
292 f l o a t r_SVC_TAR [ 3 ] ;
293 f l o a t vec [ 3 ] = { 0 . 4 f , 0 . 0 f , 0 . 0 f } ; // r _ s t a n d f o f
294 f o r ( i =0; i <3; i ++){
295 r_SVC_INT [ i ] = 0 . 0 f ;
296 f o r ( j =0; j <3; j ++){
297 r_SVC_INT [ i ] += dcm_init [ i ] [ j ] ∗ vec [ j ] ;
298 }
299 }
300 vecRotbyQuat (q_TAR_INT,r_SVC_TAR, r_SVC_INT) ;
301
141
310 r_temp += r_SVC_INT [ i ] ∗ r_SVC_INT [ i ] ;
311 r0_temp += r _ i n i t i a l [ i ] ∗ r _ i n i t i a l [ i ] ; // aka s t o p back ...
p r o p a g a t i o n once you g e t t o Chaser ' s c u r r e n t p o s i t i o n
312 }
313 r = s q r t f ( r_temp ) ;
314 f l o a t r0 ;
315 r 0 = s q r t f ( r0_temp ) ;
316
142
358 };
359 f l o a t wdot_skew [ 3 ] [ 3 ] = {
360 { 0 , -omega_dot_TAR_INT [ 2 ] , omega_dot_TAR_INT [ 1 ] } ,
361 {omega_dot_TAR_INT [ 2 ] , 0 , -omega_dot_TAR_INT [ 0 ] } ,
362 { -omega_dot_TAR_INT [ 1 ] , omega_dot_TAR_INT [ 0 ] , 0}
363 };
364
365 f o r ( i =0; i <3; i ++){
366 f o r ( j =0; j <3; j ++){
367 B [ i ] [ j ] = 2∗w_skew [ i ] [ j ] ;
368 C [ i ] [ j ] = ( - wdot_skew [ i ] [ j ] + w_skew [ i ] [ j ] ∗ w_skew [ i ] [ j ] ) /...
x_factor ;
369 }
370 }
371 f o r ( k=0; k <3; k++){
372 f o r ( l =0; l <3; l ++){
373 A[ k ] [ l ]= 0 ;
374 }
375 f o r (m=3; m<6; m++){
376 A[ k ] [m] = 1 ;
377 }
378 }
379 f o r ( k=3; k <6; k++){
380 f o r ( l =0; l <3; l ++){
381 A[ k ] [ l ]= C [ k - 3 ] [ l ] ;
382 }
383 f o r (m=3; m<6; m++){
384 A[ k ] [m] = B [ k - 3 ] [ m- 3 ] ;
385 }
386 }
387
388 f o r ( i =0; i <3; i ++){
389 x [ i ] = r_SVC_TAR[ i ] ;
390 x [ i +3] = rdot_SVC_TAR [ i ] ;
391 }
392
393 // dxdt = A∗x ;
394 f o r ( j =0; j <6; j ++){
395 f o r ( k=0; k <6; k++){
396 dxdt [ j ] += A[ j ] [ k ] ∗ x [ k ] ;
397 }
398 }
399
400 f o r ( i =0; i <3; i ++){
401 d r d o t [ i ] = dxdt [ i + 3 ] ;
402 }
403
404 //new_r_SVC_TAR = r_SVC_TAR + d r d o t ∗ dt
405 //rdot_SVC_TAR ( : , i +1) = (r_SVC_TAR( : , i ) - r_SVC_TAR( : , i +1) ) / ...
( dt ) ;
406 i =0;
407 f o r ( i =0; i <3; i ++){
408 new_r_SVC_TAR [ i ] = r_SVC_TAR[ i ] + d r d o t [ i ] ∗ ( dt ) ;
143
409 new_rdot_SVC_TAR [ i ] = (r_SVC_TAR[ i ] - new_r_SVC_TAR [ i ] ) / ( dt ) ...
;
410 }
411
412 f o r ( i =0; i <3; i ++){
413 new_q_TAR_INT_conj [ i ] = -new_q_TAR_INT [ i ] ;
414 }
415 new_q_TAR_INT_conj [ 3 ] = new_q_TAR_INT [ 3 ] ;
416
417 //r_SVC_INT ( : , i +1) = t r a n s _ v e c ( conj_quat (q_TAR_INT ( : , i +1) ) , ...
r_SVC_TAR( : , i +1) ) ;
418 vecRotbyQuat (new_q_TAR_INT_conj , new_r_SVC_INT , new_r_SVC_TAR) ;
419 vecRotbyQuat (new_q_TAR_INT_conj , new_rdot_SVC_INT ,
420 new_rdot_SVC_TAR) ;
421
422 c o u n t e r ++;
423 // TODO: add t g t S t a t e back h e r e i f no r a d i a l s h i f t i s r e q u i r e d
424 f o r ( i =0; i <3; i ++){
425 r a d i a l _ p r o f i l e [ 1 9 9 9 - c o u n t e r ] [ i ] = new_r_SVC_INT [ i ] ;
426 v e l o c i t y _ p r o f i l e [ 1 9 9 9 - c o u n t e r ] [ i ] = new_rdot_SVC_INT [ i ] ;
427 }
428
429 memcpy(&r_SVC_INT [ 0 ] , &new_r_SVC_INT [ 0 ] , s i z e o f ( f l o a t ) ∗ 3 ) ;
430 memcpy(&r_SVC_TAR [ 0 ] , &new_r_SVC_TAR [ 0 ] , s i z e o f ( f l o a t ) ∗ 3 ) ;
431 memcpy(&rdot_SVC_TAR [ 0 ] , &new_rdot_SVC_TAR [ 0 ] , s i z e o f ( f l o a t ) ...
∗3) ;
432
433 // r ( i +1) = norm (r_SVC_TAR( : , i +1) ) ;
434 f l o a t r_temp = 0 ;
435 f o r ( i =0; i <3; i ++){
436 r_temp += new_r_SVC_TAR [ i ] ∗new_r_SVC_TAR [ i ] ;
437 }
438 r = s q r t f ( r_temp ) ;
439 }
440
441
442 /∗ ∗∗∗∗∗∗∗∗∗ T r a j e c t o r y S h i f t ∗∗∗∗∗∗∗∗∗ ∗/
443 // TODO: Add e l s e s t a t e m e n t f o r i f s h i f t i s n ' t n e c e s s a r y but t o ...
add t g t S t a t e back i n
444 // 1999 - c o u n t e r e q u a l s CHASER ' s f i r s t s t e p . This n e e d s t o e q u a l ...
Chaser ' s c u r r e n t p o s i t i o n .
445 i f ( r a d i a l _ p r o f i l e [ 1 9 9 9 - c o u n t e r ] [ 0 ] != c t r l S t a t e [ 0 ] - t g t S t a t e [ 0 ] ) {...
// then f i n d r o t a t i o n matrix
446 // Make them u n i t v e c t o r s f i r s t
447 f l o a t rad_profile_mag = s q r t f ( r a d i a l _ p r o f i l e [ 1 9 9 9 - c o u n t e r ] [ 0 ] ∗
448 r a d i a l _ p r o f i l e [ 1 9 9 9 - c o u n t e r ] [ 0 ] + r a d i a l _ p r o f i l e [ 1 9 9 9 - ...
counter ] [ 1 ] ∗
449 r a d i a l _ p r o f i l e [ 1 9 9 9 - c o u n t e r ] [ 1 ] + r a d i a l _ p r o f i l e [ 1 9 9 9 - c o u n t e r ...
][2]∗
450 r a d i a l _ p r o f i l e [1999 - counter ] [ 2 ] ) ;
451 f l o a t unit_rad_profile [ 3 ] = { r a d i a l _ p r o f i l e [1999 - counter ] [ 0 ] /
452 rad_profile_mag , r a d i a l _ p r o f i l e [ 1 9 9 9 - c o u n t e r ] [ 1 ] / ...
rad_profile_mag ,
453 r a d i a l _ p r o f i l e [ 1 9 9 9 - c o u n t e r ] [ 2 ] / rad_profile_mag } ;
144
454 f l o a t ctrlState_mag = s q r t f ( ( c t r l S t a t e [ 0 ] ) ∗( c t r l S t a t e [ 0 ] ) +
455 ( c t r l S t a t e [ 1 ] ) ∗ ( c t r l S t a t e [ 1 ] ) + ( c t r l S t a t e [ 2 ] ) ∗ ( c t r l S t a t e ...
[2]) ) ;
456 f l o a t u n i t _ c t r l S t a t e [ 3 ] = { ( c t r l S t a t e [ 0 ] ) / ctrlState_mag ,
457 ( c t r l S t a t e [ 1 ] ) / ctrlState_mag , ( c t r l S t a t e [ 2 ] ) / c t r l S t a t e _ m a g } ;
458
459 // dot p r o d u c t
460 d o t p r o d u c t =0;
461 f o r ( i =0; i <3; i ++){
462 d o t p r o d u c t += u n i t _ r a d _ p r o f i l e [ i ] ∗ ( u n i t _ c t r l S t a t e [ i ]) ;
463 }
464 // c r o s s p r o d u c t magnitude
465 f l o a t s1 = unit_rad_profile [ 1 ] ∗ ( u n i t _ c t r l S t a t e [ 2 ] ) - ...
unit_rad_profile [ 2 ] ∗ ( unit_ctrlState [ 1 ] ) ;
466 f l o a t s2 = unit_rad_profile [ 2 ] ∗ ( u n i t _ c t r l S t a t e [ 0 ] ) - ...
unit_rad_profile [ 0 ] ∗ ( unit_ctrlState [ 2 ] ) ;
467 f l o a t s3 = unit_rad_profile [ 0 ] ∗ ( u n i t _ c t r l S t a t e [ 1 ] ) - ...
unit_rad_profile [ 1 ] ∗ ( unit_ctrlState [ 0 ] ) ;
468 crossproduct = s q r t f ( s1 ∗ s1 + s2 ∗ s2 + s3 ∗ s3 ) ;
469
470 // c o n s t r u c t G matrix
471 G[ 0 ] [ 0 ] = dotproduct ;
472 G[ 0 ] [ 1 ] = - crossproduct ;
473 G[ 0 ] [ 2 ] = 0.0 f ;
474 G[ 1 ] [ 0 ] = crossproduct ;
475 G[ 1 ] [ 1 ] = dotproduct ;
476 G[ 1 ] [ 2 ] = 0.0 f ;
477 G[ 2 ] [ 0 ] = 0.0 f ;
478 G[ 2 ] [ 1 ] = 0.0 f ;
479 G[ 2 ] [ 2 ] = 1.0 f ;
480
481 // C o n s t r u c t F , Finv
482 f l o a t midterm [ 3 ] = { u n i t _ c t r l S t a t e [ 0 ] - d o t p r o d u c t ∗...
unit_rad_profile [ 0 ] ,
483 u n i t _ c t r l S t a t e [ 1 ] - dotproduct ∗ unit_rad_profile [ 1 ] ,
484 u n i t _ c t r l S t a t e [ 2 ] - dotproduct ∗ unit_rad_profile [ 2 ] } ;
485 f l o a t midterm_mag = s q r t f ( midterm [ 0 ] ∗ midterm [ 0 ] +
486 midterm [ 1 ] ∗ midterm [ 1 ] + midterm [ 2 ] ∗ midterm [ 2 ] ) ;
487 float F[ 3 ] [ 3 ] ;
488 f l o a t Finv [ 3 ] [ 3 ] = {{ u n i t _ r a d _ p r o f i l e [ 0 ] , midterm [ 0 ] / ...
midterm_mag , s 1 } ,
489 { u n i t _ r a d _ p r o f i l e [ 1 ] , midterm [ 1 ] / midterm_mag , s 2 } ,
490 { u n i t _ r a d _ p r o f i l e [ 2 ] , midterm [ 2 ] / midterm_mag , s 3 } } ;
491 m a t r i x I n v e r s e (F , Finv ) ;
492
493 // c o n s t r u c t U
494 float U[ 3 ] [ 3 ] ;
495 f l o a t int_prod [ 3 ] [ 3 ] ;
496 f o r ( i =0; i <3; i ++){
497 f o r ( j =0; j <3; j ++){
498 int_prod [ i ] [ j ] = 0 . 0 f ;
499 f o r ( k=0; k <3; k++){
500 int_prod [ i ] [ j ] += G[ i ] [ k ] ∗ F [ k ] [ j ] ;
501 }
145
502 }
503 }
504 f o r ( i =0; i <3; i ++){
505 f o r ( j =0; j <3; j ++){
506 U[ i ] [ j ] = 0 . 0 f ;
507 f o r ( k=0; k <3; k++){
508 U[ i ] [ j ] += Finv [ i ] [ k ] ∗ int_prod [ k ] [ j ] ;
509 }
510 }
511 }
512
513
514 // c r e a t e temporary a r r a y t o h o l d c u r r e n t r a d i a l p r o f i l e
515 f o r ( i =0; i <2000; i ++){
516 f o r ( j =0; j <3; j ++){
517 temp_radial_profile [ i ] [ j ] = r a d i a l _ p r o f i l e [ i ] [ j ] ;
518 }
519 }
520
521 // re - w r i t e r a d i a l p r o f i l e with t h e r o t a t i o n i n p l a c e
522 f o r ( i =0; i <c o u n t e r ; i ++){
523 f o r ( j =0; j <3; j ++){
524 r a d i a l _ p r o f i l e [ 1 9 9 9 - c o u n t e r+i ] [ j ] = 0 . 0 f ;
525 f o r ( k=0; k <3; k++){
526 r a d i a l _ p r o f i l e [ 1 9 9 9 - c o u n t e r+i ] [ j ] += U[ j ] [ k ] ∗
527 t e m p _ r a d i a l _ p r o f i l e [ 1 9 9 9 - c o u n t e r+i ] [ k ] ;
528 }
529 r a d i a l _ p r o f i l e [ 1 9 9 9 - c o u n t e r+i ] [ j ] =
530 r a d i a l _ p r o f i l e [ 1 9 9 9 - c o u n t e r+i ] [ j ]+ t g t S t a t e [ j ] ;
531 }
532 }
533 }
534
535 }
536
537 v o i d quatMult_noNorm ( f l o a t ∗q3 , f l o a t ∗q1 , f l o a t ∗ q2 ) {
538 // q u a t e r n i o n m u l t i p l i c a t i o n ( s u c c e s s i v e r o t a t i o n ) , q2 onto q1
539 q3 [ 0 ] = q1 [ 0 ] ∗ q2 [ 3 ] + q1 [ 1 ] ∗ q2 [ 2 ] - q1 [ 2 ] ∗ q2 [ 1 ] + q1 [ 3 ] ∗ q2 [ 0 ] ;
540 q3 [ 1 ] = - q1 [ 0 ] ∗ q2 [ 2 ] + q1 [ 1 ] ∗ q2 [ 3 ] + q1 [ 2 ] ∗ q2 [ 0 ] + q1 [ 3 ] ∗ q2 [ 1 ] ;
541 q3 [ 2 ] = q1 [ 0 ] ∗ q2 [ 1 ] - q1 [ 1 ] ∗ q2 [ 0 ] + q1 [ 2 ] ∗ q2 [ 3 ] + q1 [ 3 ] ∗ q2 [ 2 ] ;
542 q3 [ 3 ] = - q1 [ 0 ] ∗ q2 [ 0 ] - q1 [ 1 ] ∗ q2 [ 1 ] - q1 [ 2 ] ∗ q2 [ 2 ] + q1 [ 3 ] ∗ q2 [ 3 ] ;
543 }
544
545 v o i d m a t r i x I n v e r s e ( f l o a t minv [ 3 ] [ 3 ] , f l o a t m[ 3 ] [ 3 ] ) {
546 // For 3 x3 m a t r i c e s
547 // F i r s t c a l c u l a t e t h e d e t e r m i n a n t o f m
548 f l o a t d e t = m[ 0 ] [ 0 ] ∗ (m[ 1 ] [ 1 ] ∗m[ 2 ] [ 2 ] - m[ 2 ] [ 1 ] ∗m[ 1 ] [ 2 ] ) -
549 m[ 0 ] [ 1 ] ∗ (m[ 1 ] [ 0 ] ∗m[ 2 ] [ 2 ] - m[ 1 ] [ 2 ] ∗m[ 2 ] [ 0 ] ) +
550 m[ 0 ] [ 2 ] ∗ (m[ 1 ] [ 0 ] ∗m[ 2 ] [ 1 ] - m[ 1 ] [ 1 ] ∗m[ 2 ] [ 0 ] ) ;
551
552 f l o a t i n v d e t = 1/ d e t ;
553
554 // f l o a t minv [ 3 ] [ 3 ] ;
555 minv [ 0 ] [ 0 ] = (m[ 1 ] [ 1 ] ∗ m[ 2 ] [ 2 ] - m[ 2 ] [ 1 ] ∗ m[ 1 ] [ 2 ] ) ∗ i n v d e t ;
146
556 minv [ 0 ] [ 1 ] = (m[ 0 ] [ 2 ] ∗ m[ 2 ] [ 1 ] - m[ 0 ] [ 1 ] ∗ m[ 2 ] [ 2 ] ) ∗ invdet ;
557 minv [ 0 ] [ 2 ] = (m[ 0 ] [ 1 ] ∗ m[ 1 ] [ 2 ] - m[ 0 ] [ 2 ] ∗ m[ 1 ] [ 1 ] ) ∗ invdet ;
558 minv [ 1 ] [ 0 ] = (m[ 1 ] [ 2 ] ∗ m[ 2 ] [ 0 ] - m[ 1 ] [ 0 ] ∗ m[ 2 ] [ 2 ] ) ∗ invdet ;
559 minv [ 1 ] [ 1 ] = (m[ 0 ] [ 0 ] ∗ m[ 2 ] [ 2 ] - m[ 0 ] [ 2 ] ∗ m[ 2 ] [ 0 ] ) ∗ invdet ;
560 minv [ 1 ] [ 2 ] = (m[ 1 ] [ 0 ] ∗ m[ 0 ] [ 2 ] - m[ 0 ] [ 0 ] ∗ m[ 1 ] [ 2 ] ) ∗ invdet ;
561 minv [ 2 ] [ 0 ] = (m[ 1 ] [ 0 ] ∗ m[ 2 ] [ 1 ] - m[ 2 ] [ 0 ] ∗ m[ 1 ] [ 1 ] ) ∗ invdet ;
562 minv [ 2 ] [ 1 ] = (m[ 2 ] [ 0 ] ∗ m[ 0 ] [ 1 ] - m[ 0 ] [ 0 ] ∗ m[ 2 ] [ 1 ] ) ∗ invdet ;
563 minv [ 2 ] [ 2 ] = (m[ 0 ] [ 0 ] ∗ m[ 1 ] [ 1 ] - m[ 1 ] [ 0 ] ∗ m[ 0 ] [ 1 ] ) ∗ invdet ;
564
565 }
566
567 v o i d dcm_from_quat ( f l o a t dcm [ 3 ] [ 3 ] , f l o a t ∗ quat ) {
568 // Find t h e d i r e c t i o n c o s i n e matrix from a q u a t e r n i o n .
569 f l o a t q1 = quat [ 0 ] ;
570 f l o a t q2 = quat [ 1 ] ;
571 f l o a t q3 = quat [ 2 ] ;
572 f l o a t q0 = quat [ 3 ] ; // s c a l a r v a l u e
573
574 dcm [ 0 ] [ 0 ] = q0 ∗ q0+q1 ∗q1 - q2 ∗q2 - q3 ∗ q3 ;
575 dcm [ 0 ] [ 1 ] = 2 ∗ ( q1 ∗ q2+q0 ∗ q3 ) ;
576 dcm [ 0 ] [ 2 ] = 2 ∗ ( q1 ∗q3 - q0 ∗ q2 ) ;
577 dcm [ 1 ] [ 0 ] = 2 ∗ ( q1 ∗ q2 - q0 ∗ q3 ) ;
578 dcm [ 1 ] [ 1 ] = ( q0 ∗q0 - q1 ∗ q1+q2 ∗q2 - q3 ∗ q3 ) ;
579 dcm [ 1 ] [ 2 ] = 2 ∗ ( q2 ∗ q3+q0 ∗ q1 ) ;
580 dcm [ 2 ] [ 0 ] = 2 ∗ ( q1 ∗ q3+q0 ∗ q2 ) ;
581 dcm [ 2 ] [ 1 ] = 2 ∗ ( q2 ∗q3 - q0 ∗ q1 ) ;
582 dcm [ 2 ] [ 2 ] = ( q0 ∗q0 - q1 ∗q1 - q2 ∗ q2+q3 ∗ q3 ) ;
583
584 }
147
148
Appendix B
0 0
-0.05 6 7 -0.05 6 7
14 16 18 20 22 24 14 16 18 20 22 24
0.05 2 3 0.05 2 3
0 0
-0.05 8 9 -0.05 8 9
14 16 18 20 22 24 14 16 18 20 22 24
0.05 4 5 0.05 4 5
0 0
-0.05 10 11 -0.05 10 11
14 16 18 20 22 24 14 16 18 20 22 24
Test time, s Test time, s
Raw IMU data for Sphere logical ID 1 Raw IMU data for Sphere logical ID 2
0.05 0 1 0.05 0 1
0 0
-0.05 6 7 -0.05 6 7
26 28 30 32 34 36 26 28 30 32 34 36
0.05 2 3 0.05 2 3
0 0
-0.05 8 9 -0.05 8 9
26 28 30 32 34 36 26 28 30 32 34 36
0.05 4 5 0.05 4 5
0 0
-0.05 10 11 -0.05 10 11
26 28 30 32 34 36 26 28 30 32 34 36
Test time, s Test time, s
149
B.2 Thruster Characterization Functions
10 if sphnum == 1
11 time = imu_sph_1.gyro{2}.Time;
12 time_ind = find(time≥37.25&time≤50.7);
13 sdata(:,2) = time(time_ind);
14 time_x = imu_sph_1.gyro{1}.Time;
15 sph1_gyro_x = interp1(time_x,imu_sph_1.gyro{1}.Data,time);
16 sdata(:,3) = smooth(sph1_gyro_x(time_ind),7);
17 sph1_gyro_y = imu_sph_1.gyro{2}.Data;
18 sdata(:,4) = smooth(sph1_gyro_y(time_ind),7);
19 time_z = imu_sph_1.gyro{3}.Time;
20 sph1_gyro_z = interp1(time_z,imu_sph_1.gyro{3}.Data,time);
21 sdata(:,5) = smooth(sph1_gyro_z(time_ind),7);
22 time_x_a = imu_sph_1.accel{1}.Time;
23 sph1_accel_x = interp1(time_x_a,imu_sph_1.accel{1}.Data,time);
24 sdata(:,6) = smooth(sph1_accel_x(time_ind),7);
25 time_y_a = imu_sph_1.accel{2}.Time;
26 sph1_accel_y = interp1(time_y_a,imu_sph_1.accel{2}.Data,time);
27 sdata(:,7) = smooth(sph1_accel_y(time_ind),7);
28 time_z_a = imu_sph_1.accel{3}.Time;
29 sph1_accel_z = interp1(time_z_a,imu_sph_1.accel{3}.Data,time);
30 sdata(:,8) = smooth(sph1_accel_z(time_ind),7);
31 elseif sphnum == 2
32 time = imu_sph_2.gyro{2}.Time;
33 time_ind = find(time≥37.25&time≤50.7);
34 sdata(:,2) = time(time_ind);
35 time_x = imu_sph_2.gyro{1}.Time;
36 sph2_gyro_x = interp1(time_x,imu_sph_2.gyro{1}.Data,time);
37 sdata(:,3) = smooth(sph2_gyro_x(time_ind),7);
38 sph2_gyro_y = imu_sph_2.gyro{2}.Data;
39 sdata(:,4) = smooth(sph2_gyro_y(time_ind),7);
40 time_z = imu_sph_2.gyro{3}.Time;
41 sph2_gyro_z = interp1(time_z,imu_sph_2.gyro{3}.Data,time);
42 sdata(:,5) = smooth(sph2_gyro_z(time_ind),7);
43 time_x_a = imu_sph_2.accel{1}.Time;
44 sph2_accel_x = interp1(time_x_a,imu_sph_2.accel{1}.Data,time);
45 sdata(:,6) = smooth(sph2_accel_x(time_ind),7);
46 time_y_a = imu_sph_2.accel{2}.Time;
47 sph2_accel_y = interp1(time_y_a,imu_sph_2.accel{2}.Data,time);
48 sdata(:,7) = smooth(sph2_accel_y(time_ind),7);
150
49 time_z_a = imu_sph_2.accel{3}.Time;
50 sph2_accel_z = interp1(time_z_a,imu_sph_2.accel{3}.Data,time);
51 sdata(:,8) = smooth(sph2_accel_z(time_ind),7);
52 end
53
54 load('2018_01_17_13_18_53_P526_T18_Rcv');
55
56 raw_data = data{1,sphnum}.DebugUnsignedVal; % thruster data
57 thr_data_on = [];
58 thr_data_off = [];
59 pulses = struct();
60 % Sort thruster data into on and off
61 for c = 1:length(raw_data)
62 if 40932 ̸= raw_data(1,c)
63 neg_thr = dec2bin(raw_data(14,c),6);
64 thr_data_on(13,end+1) = raw_data(1,c)/10;
65 thr_data_off(13,end+1) = raw_data(1,c)/10;
66 for thr = 1:6
67 if strcmp(neg_thr(end+1-thr),'0')
68 thr_data_on(thr,end) = ...
(raw_data(2*thr,c))/1000+raw_data(1,c)/10;
69 thr_data_off(thr,end) = ...
(raw_data(2*thr+1,c))/1000+raw_data(1,c)/10;
70 thr_data_on(thr+6,end) = raw_data(1,c)/10;
71 thr_data_off(thr+6,end) = raw_data(1,c)/10;
72 else
73 thr_data_on(thr,end) = raw_data(1,c)/10;
74 thr_data_off(thr,end) = raw_data(1,c)/10;
75 thr_data_on(thr+6,end) = ...
(raw_data(2*thr,c))/1000+raw_data(1,c)/10;
76 thr_data_off(thr+6,end) = ...
(raw_data(2*thr+1,c))/1000+raw_data(1,c)/10;
77 end
78 end
79 end
80 end
81
82
83
84 for t = 75:2:97 %Hard-coded for longest duration of thrust pulses ...
in T18 of TS97
85 x = [-inf*ones(1,3) ones(1,3)*inf];
86 thrusters = zeros(12,1);
87 base_data = [];
88 for thr = 1:12
89 if thr_data_on(thr,t)̸=thr_data_off(thr,t)
90 thrusters(thr) = 1;
91 % Modify this according to typical pulse length
92 x(1) = max(x(1),thr_data_on(thr,t) + 0); %Pre-pulse start
93 x(2) = max(x(2),thr_data_on(thr,t) + 0.2); %Pre-pulse end
94 x(3) = max(x(3),thr_data_on(thr,t) + 0.2); %During ...
pulse start
95 x(4) = min(x(4),thr_data_off(thr,t) + 0.1); %During ...
pulse end
151
96 x(5) = min(x(5),thr_data_off(thr,t)+ 0.1); ...
%Post-pulse start
97 x(6) = min(x(6),thr_data_off(thr,t) + 0.3); ...
%Post-pulse end
98 end
99 end
100
101 if sum(x̸=[-inf*ones(1,3) ones(1,3)*inf])==6
102 pulse_time = (sdata(:,2)≥x(1))&(sdata(:,2)≤x(6));
103 pulse_data = sdata(pulse_time,:);
104 if ¬isempty(pulse_data)
105 pre_pulse_ind = ...
find(pulse_data(:,2)≥x(1)&pulse_data(:,2)≤x(2));
106 during_pulse_ind = ...
find(pulse_data(:,2)≥x(3)&pulse_data(:,2)≤x(4));
107 post_pulse_ind = ...
find(pulse_data(:,2)≥x(5)&pulse_data(:,2)≤x(6));
108 if ¬isempty(pre_pulse_ind) && ¬...
isempty(during_pulse_ind) && ¬isempty(post_pulse_ind)
109
152
144 during_pulse_ind;post_pulse_ind],8),...
145 'Color',[0 0 0.5])
146 title('Cleaned Accelerometer Data')
147 xlabel('Time (s)')
148 ylabel('Measured Acceleration (m/s^2)')
149 legend({'a_x','a_y','a_z'},...
150 'Location','EastOutside')
151 [p1,z] = ginput(1);
152 fake_time = [p1 p1+.16];
153 fake_z = [z z];
154 plot(fake_time,fake_z,'-*k');
155 [p2,y] = ginput(1);
156 else
157 figure
158 subplot(2,2,1)
159 plot(pulse_data(:,2),pulse_data(:,3),...
160 'Color',[0 1 0])
161 hold on
162 plot(base_data(:,2),base_data(:,3),...
163 'Color',[0 0.5 0])
164 plot(pulse_data(:,2),pulse_data(:,4),...
165 'Color',[1 0 0])
166 plot(base_data(:,2),base_data(:,4),...
167 'Color',[0.5 0 0])
168 plot(pulse_data(:,2),pulse_data(:,5),...
169 'Color',[0 0 1])
170 plot(base_data(:,2),base_data(:,5),...
171 'Color',[0 0 0.5])
172 title('Raw Gyro Data and Baseline Estimate')
173 xlabel('Time (s)')
174 ylabel('Measured Angular Velocity (rad/s)')
175 legend({'\omega_x','\omega_x base','\omega_y',...
176 '\omega_y base','\omega_z','\omega_z ...
base'},...
177 'Location','EastOutside')
178
179 subplot(2,2,2)
180 plot(pulse_data(:,2),pulse_data(:,6),...
181 'Color',[0 1 0])
182 hold on
183 plot(base_data(:,2),base_data(:,6),...
184 'Color',[0 0.5 0])
185 plot(pulse_data(:,2),pulse_data(:,7),...
186 'Color',[1 0 0])
187 plot(base_data(:,2),base_data(:,7),...
188 'Color',[0.5 0 0])
189 plot(pulse_data(:,2),pulse_data(:,8),...
190 'Color',[0 0 1])
191 plot(base_data(:,2),base_data(:,8),...
192 'Color',[0 0 0.5])
193 title('Raw Accelerometer Data and Baseline ...
Estimate')
194 xlabel('Time (s)')
195 ylabel('Measured Acceleration (m/s^2)')
153
196 legend({'a_x','a_x base','a_y','a_y base',...
197 'a_z','a_z base'},'Location','EastOutside')
198
199 %extract the raw angular rate data (assuming ...
no bias)
200 raw_omega = pulse_data(during_pulse_ind,3:5);
201
202
154
247 during_pulse_ind_g = ...
find(pulse_data(:,2)≥p1&pulse_data(:,2)≤p2);
248 pre_pulse_ind_g = ...
find(pulse_data(:,2)≥x(1)&pulse_data(:,2)≤p1);
249 post_pulse_ind_g = ...
find(pulse_data(:,2)≥p2&pulse_data(:,2)≤x(6));
250
251 raw_omega_g = ...
old_pulse_data_omega(during_pulse_ind_g,:);
252 end
253
254 if user_input
255 pulses(end+1).thruster = thrusters;
256 % accel = average of accel data "during pulse ...
period"
257 pulses(end).accel = ...
mean(pulse_data(during_pulse_ind_g,6:8));
258 % alpha = (final gyro data - initial gyro ...
data)/(tf -
259 % ti) for "during pulse period"
260 pulses(end).alpha = ...
(pulse_data(during_pulse_ind_g(end),3:5)...
261 -pulse_data(during_pulse_ind_g(1),3:5))/...
262 (pulse_data(during_pulse_ind_g(end),2)-...
263 pulse_data(during_pulse_ind_g(1),2));
264 %delta_omega = avg of gryo data before pulse ...
- avg of
265 %gyro data after pulse
266 pulses(end).delta_omega = ...
mean(pulse_data(post_pulse_ind_g,3:5))-...
267 mean(pulse_data(pre_pulse_ind_g,3:5));
268 pulses(end).omega = mean(raw_omega_g);
269 else
270 pulses(end+1).thruster = thrusters;
271 pulses(end).accel = ...
mean(pulse_data(during_pulse_ind,6:8));
272 pulses(end).alpha = ...
(pulse_data(during_pulse_ind(end),3:5)...
273 -pulse_data(during_pulse_ind(1),3:5))/...
274 (pulse_data(during_pulse_ind(end),2)-...
275 pulse_data(during_pulse_ind(1),2));
276 pulses(end).delta_omega = ...
mean(pulse_data(post_pulse_ind,3:5))-...
277 mean(pulse_data(pre_pulse_ind,3:5));
278 pulses(end).omega = mean(raw_omega);
279 end
280 end
281 end
282 end
283 end
284
285 pulses(1) = [];
286 if sphnum == 1
287 filename = 'T18';
155
288 else
289 filename = 'T18_sph2';
290 end
291
292 save(['pulses_' filename],'pulses','filename')
156
46 a_meas = zeros(length(pulses),3);
47 alpha_meas = zeros(length(pulses),3);
48 omega_meas = zeros(length(pulses),3);
49 A_thrust_x = zeros(length(pulses),4);
50 A_thrust_y = zeros(length(pulses),4);
51 A_thrust_z = zeros(length(pulses),4);
52 Ax = zeros(length(pulses),4);
53 Ay = zeros(length(pulses),4);
54 Az = zeros(length(pulses),4);
55 bx = zeros(length(pulses),1);
56 by = zeros(length(pulses),1);
57 bz = zeros(length(pulses),1);
58 for p = 1:length(pulses)
59 a_meas(p,:) = pulses(p).accel;
60 if sum(pulses(p).thruster)>0
61 % This extracts which force direction the specific pulse ...
was in.
62 A_thrust = 0.94^(sum(pulses(p).thruster)-1)*...
63 (pulses(p).thruster*ones(1,3))'.*Minv(1:3,:);
64 else
65 A_thrust = zeros(3,12);
66 end
67 alpha_meas(p,:) = pulses(p).alpha; ...
%pulses(p).delta_omega/0.36; %
68 omega_meas(p,:) = pulses(p).delta_omega/2;
69 alpha_cross = skewSym(pulses(p).alpha); ...
%skewSym(pulses(p).delta_omega/0.36); %
70 omega_cross = skewSym(pulses(p).delta_omega/2);
71 A_cross = alpha_cross + omega_cross*omega_cross;
72 prod_x = A_cross(1,:)*rgc_xaccel;
73 prod_y = A_cross(2,:)*rgc_yaccel;
74 prod_z = A_cross(3,:)*rgc_zaccel;
75
76 A_thrust_x(p,:) = A_thrust(1,[1,2,7,8]);
77 A_thrust_y(p,:) = A_thrust(2,[3,4,9,10]);
78 A_thrust_z(p,:) = A_thrust(3,[5,6,11,12]);
79
80 Ax(p,:) = A_thrust_x(p,:);
81 Ay(p,:) = A_thrust_y(p,:);
82 Az(p,:) = A_thrust_z(p,:);
83 bx(p,1) = a_meas(p,1) - prod_x;
84 by(p,1) = a_meas(p,2) - prod_y;
85 bz(p,1) = a_meas(p,3) - prod_z;
86 end
87
88 %% Find the solution
89 %For the x-axis accelerometer
90 sol_xaccel = Ax\bx;
91 thrust_xaccel = sol_xaccel*mass;
92
157
97 %For the z-axis accelerometer
98 sol_zaccel = Az\bz;
99 thrust_zaccel = sol_zaccel*mass;
100
101 %% Compute the thruster force from individual axes estimation
102 thrust = [thrust_xaccel(1:2); thrust_yaccel(1:2);...
103 thrust_zaccel(1:2); thrust_xaccel(3:4);...
104 thrust_yaccel(3:4); thrust_zaccel(3:4)];
105
106 %% Create results structure
107 results.Ax = Ax;
108 results.Ay = Ay;
109 results.Az = Az;
110 results.bx = bx;
111 results.by = by;
112 results.bz = bz;
113 results.a_meas = a_meas;
114 results.alpha_meas = alpha_meas;
115 results.omega_meas = omega_meas;
116 results.thrust = thrust;
117
118 %% Save results
119 save(['results_' filename],'results')
158
Listing B.4: revise_pulses.m
1 function revise_pulses(sphnum)
2 % Allows user input to re-do the pulse extraction for selected ...
pulses.
3
4 user_input = 1;
5
6 if sphnum == 1
7 load('saved_imu_1.mat');
8 load('pulses_T18.mat');
9 time = imu_sph_1.gyro{2}.Time;
10 time_ind = find(time≥37.25&time≤50.7);
11 sdata(:,2) = time(time_ind);
12 time_x = imu_sph_1.gyro{1}.Time;
13 sph1_gyro_x = interp1(time_x,imu_sph_1.gyro{1}.Data,time);
14 sdata(:,3) = smooth(sph1_gyro_x(time_ind),7);
15 sph1_gyro_y = imu_sph_1.gyro{2}.Data;
16 sdata(:,4) = smooth(sph1_gyro_y(time_ind),7);
17 time_z = imu_sph_1.gyro{3}.Time;
18 sph1_gyro_z = interp1(time_z,imu_sph_1.gyro{3}.Data,time);
19 sdata(:,5) = smooth(sph1_gyro_z(time_ind),7);
20 time_x_a = imu_sph_1.accel{1}.Time;
21 sph1_accel_x = interp1(time_x_a,imu_sph_1.accel{1}.Data,time);
22 sdata(:,6) = smooth(sph1_accel_x(time_ind),7);
23 time_y_a = imu_sph_1.accel{2}.Time;
24 sph1_accel_y = interp1(time_y_a,imu_sph_1.accel{2}.Data,time);
25 sdata(:,7) = smooth(sph1_accel_y(time_ind),7);
26 time_z_a = imu_sph_1.accel{3}.Time;
27 sph1_accel_z = interp1(time_z_a,imu_sph_1.accel{3}.Data,time);
28 sdata(:,8) = smooth(sph1_accel_z(time_ind),7);
29 else
30 load('saved_imu_2.mat');
31 load('pulses_T18_sph2.mat');
32 time = imu_sph_2.gyro{2}.Time;
33 time_ind = find(time≥37.25&time≤50.7);
34 sdata(:,2) = time(time_ind);
35 time_x = imu_sph_2.gyro{1}.Time;
36 sph2_gyro_x = interp1(time_x,imu_sph_2.gyro{1}.Data,time);
37 sdata(:,3) = smooth(sph2_gyro_x(time_ind),7);
38 sph2_gyro_y = imu_sph_2.gyro{2}.Data;
39 sdata(:,4) = smooth(sph2_gyro_y(time_ind),7);
40 time_z = imu_sph_2.gyro{3}.Time;
41 sph2_gyro_z = interp1(time_z,imu_sph_2.gyro{3}.Data,time);
42 sdata(:,5) = smooth(sph2_gyro_z(time_ind),7);
43 time_x_a = imu_sph_2.accel{1}.Time;
44 sph2_accel_x = interp1(time_x_a,imu_sph_2.accel{1}.Data,time);
45 sdata(:,6) = smooth(sph2_accel_x(time_ind),7);
46 time_y_a = imu_sph_2.accel{2}.Time;
47 sph2_accel_y = interp1(time_y_a,imu_sph_2.accel{2}.Data,time);
48 sdata(:,7) = smooth(sph2_accel_y(time_ind),7);
159
49 time_z_a = imu_sph_2.accel{3}.Time;
50 sph2_accel_z = interp1(time_z_a,imu_sph_2.accel{3}.Data,time);
51 sdata(:,8) = smooth(sph2_accel_z(time_ind),7);
52 end
53
54 load('2018_01_17_13_18_53_P526_T18_Rcv');
55
56 raw_data = data{1,sphnum}.DebugUnsignedVal; % This is thruster data!
57 thr_data_on = [];
58 thr_data_off = [];
59 counter = 1;
60
61 % Sort thruster data into on and off
62 for c = 1:length(raw_data)
63 if 40932 ̸= raw_data(1,c)
64 neg_thr = dec2bin(raw_data(14,c),6);
65 thr_data_on(13,end+1) = raw_data(1,c)/10;
66 thr_data_off(13,end+1) = raw_data(1,c)/10;
67 for thr = 1:6
68 if strcmp(neg_thr(end+1-thr),'0')
69 thr_data_on(thr,end) = ...
(raw_data(2*thr,c))/1000+raw_data(1,c)/10;
70 thr_data_off(thr,end) = ...
(raw_data(2*thr+1,c))/1000+raw_data(1,c)/10;
71 thr_data_on(thr+6,end) = raw_data(1,c)/10;
72 thr_data_off(thr+6,end) = raw_data(1,c)/10;
73 else
74 thr_data_on(thr,end) = raw_data(1,c)/10;
75 thr_data_off(thr,end) = raw_data(1,c)/10;
76 thr_data_on(thr+6,end) = ...
(raw_data(2*thr,c))/1000+raw_data(1,c)/10;
77 thr_data_off(thr+6,end) = ...
(raw_data(2*thr+1,c))/1000+raw_data(1,c)/10;
78 end
79 end
80 end
81 end
82
160
pulse end
98 x(5) = min(x(5),thr_data_off(thr,t)+ 0.1); ...
%Post-pulse start
99 x(6) = min(x(6),thr_data_off(thr,t) + 0.3); ...
%Post-pulse end
100 end
101 end
102
161
144 plot(pulse_data([pre_pulse_ind;during_pulse_ind;...
145 post_pulse_ind],2),pulse_data([pre_pulse_ind;...
146 during_pulse_ind;post_pulse_ind],8),...
147 'Color',[0 0 0.5])
148 title('Cleaned Accelerometer Data')
149 xlabel('Time (s)')
150 ylabel('Measured Acceleration (m/s^2)')
151 legend({'a_x','a_y','a_z'},'Location','EastOutside')
152 [p1,z] = ginput(1);
153 fake_time = [p1 p1+.16];
154 fake_z = [z z];
155 plot(fake_time,fake_z,'-*k');
156 [p2,y] = ginput(1);
157 else
158 figure
159 subplot(2,2,1)
160 plot(pulse_data(:,2),pulse_data(:,3),'Color',[0 ...
1 0])
161 hold on
162 plot(base_data(:,2),base_data(:,3),'Color',[0 ...
0.5 0])
163 plot(pulse_data(:,2),pulse_data(:,4),'Color',[1 ...
0 0])
164 plot(base_data(:,2),base_data(:,4),'Color',[0.5 ...
0 0])
165 plot(pulse_data(:,2),pulse_data(:,5),'Color',[0 ...
0 1])
166 plot(base_data(:,2),base_data(:,5),'Color',[0 ...
0 0.5])
167 title('Raw Gyro Data and Baseline Estimate')
168 xlabel('Time (s)')
169 ylabel('Measured Angular Velocity (rad/s)')
170 legend({'\omega_x','\omega_x base','\omega_y',...
171 '\omega_y base','\omega_z','\omega_z ...
base'},...
172 'Location','EastOutside')
173
174 subplot(2,2,2)
175 plot(pulse_data(:,2),pulse_data(:,6),'Color',[0 ...
1 0])
176 hold on
177 plot(base_data(:,2),base_data(:,6),'Color',[0 ...
0.5 0])
178 plot(pulse_data(:,2),pulse_data(:,7),'Color',[1 ...
0 0])
179 plot(base_data(:,2),base_data(:,7),'Color',[0.5 ...
0 0])
180 plot(pulse_data(:,2),pulse_data(:,8),'Color',[0 ...
0 1])
181 plot(base_data(:,2),base_data(:,8),'Color',[0 ...
0 0.5])
182 title('Raw Accelerometer Data and Baseline ...
Estimate')
183 xlabel('Time (s)')
162
184 ylabel('Measured Acceleration (m/s^2)')
185 legend({'a_x','a_x base','a_y','a_y base',...
186 'a_z','a_z base'},'Location','EastOutside')
187
188 %extract the raw angular rate data (assuming ...
no bias)
189 raw_omega = pulse_data(during_pulse_ind,3:5);
190
163
235 during_pulse_ind_g = ...
find(pulse_data(:,2)≥p1&pulse_data(:,2)≤p2);
236 pre_pulse_ind_g = ...
find(pulse_data(:,2)≥x(1)&pulse_data(:,2)≤p1);
237 post_pulse_ind_g = ...
find(pulse_data(:,2)≥p2&pulse_data(:,2)≤x(6));
238
239 raw_omega_g = ...
old_pulse_data_omega(during_pulse_ind_g,:);
240 end
241
242 if user_input %strcmp(valid,'Yes')
243 pulses(thr_to_revise(counter)).thruster = ...
thrusters;
244 pulses(thr_to_revise(counter)).accel = ...
mean(pulse_data(during_pulse_ind_g,6:8));
245 pulses(thr_to_revise(counter)).alpha = ...
(pulse_data(during_pulse_ind_g(end),3:5)...
246 -pulse_data(during_pulse_ind_g(1),3:5))/...
247 (pulse_data(during_pulse_ind_g(end),2)-...
248 pulse_data(during_pulse_ind_g(1),2));
249 pulses(thr_to_revise(counter)).delta_omega = ...
250 mean(pulse_data(post_pulse_ind_g,3:5))- ...
251 mean(pulse_data(pre_pulse_ind_g,3:5));
252 pulses(thr_to_revise(counter)).omega = ...
mean(raw_omega_g);
253 counter = counter+1;
254 else
255 pulses(thr_to_revise(counter)).thruster = ...
thrusters;
256 pulses(thr_to_revise(counter)).accel = ...
mean(pulse_data(during_pulse_ind,6:8));
257 pulses(thr_to_revise(counter)).alpha = ...
(pulse_data(during_pulse_ind(end),3:5)...
258 -pulse_data(during_pulse_ind(1),3:5))/...
259 (pulse_data(during_pulse_ind(end),2)-...
260 pulse_data(during_pulse_ind(1),2));
261 pulses(thr_to_revise(counter)).delta_omega = ...
262 mean(pulse_data(post_pulse_ind,3:5))-...
263 mean(pulse_data(pre_pulse_ind,3:5));
264 pulses(thr_to_revise(counter)).omega = ...
mean(raw_omega);
265 counter = counter+1;
266 end
267 end
268 end
269 end
270 end
271
272 % Re-save pulses file
273 if sphnum == 1
274 filename = 'T18';
275 else
276 filename = 'T18_sph2';
164
277 end
278 save(['pulses_' filename],'pulses','filename')
165
20 * http://ssl.mit.edu/spheres/
21 *
22 * Copyright 2018 Massachusetts Institute of Technology
23 *
24 **********************************************************
25 * Sliding Mode Controller - PID *
26 * By: Hailee Hettrick *
27 **********************************************************
28 * Last modified: 10/14/2018 *
29 * *
30 **********************************************************
31 */
32
33 #include <math.h>
34 #include "ctrl_pid_smc.h"
35 #include "spheres_constants.h"
36 #include "ctrl_position.h"
37 #include "spheres_physical_parameters.h"
38 #include "control.h"
39
40 #ifdef SPH_MATLAB_SIM
41 #include "mex.h"
42 #define DEBUG(arg) mexPrintf arg
43 #else
44 #define DEBUG(arg)
45 #endif
46
47 // Constants
48 float lambda = 0.085f;
49 float lambda_att = 0.1f;
50 float gamma1 = 60.0f;
51 float gamma2 = 80.0f;
52 float gamma3 = 4.0f;
53 float gamma4 = 2.0f;
54 float Kp = 1000.0f;
55 float Kp_att = 50.0f;
56 float P = 10.0f;
57 float P_att = 10.0f;
58 int i, j;
59 int n = 2;
60
61 // zero initialization
62 float u_hat[2] = {0.0f, 0.0f};
63 float u_pid[2] = {0.0f, 0.0f};
64 float xr_ddot[2] = {0.0f,0.0f};
65 float Y[4] = {0.0f, 0.0f, 0.0f, 0.0f};
66 float Y_att[3] = {0.0f, 0.0f, 0.0f};
67 float theta_tilde[3] ={0.0f, 0.0f, 0.0f};
68 float theta[3] ={0.0f, 0.0f, 0.0f};
69 float u_hat_att[3] = {0.0f, 0.0f,0.0f};
70 float u_pid_att[3] = {0.0f, 0.0f,0.0f};
71 float u_pd_att[3] = {0.0f, 0.0f, 0.0f};
72
73 // saturation
166
74 float p = 0.001f; // defines the boundary layer //this helps ...
with chattering but the corresponding translation parameters ...
don't work with it
75 float dist = 1.0f;
76 float k = 2.0f;
77 float delta[3] = {0.0f, 0.0f, 0.0f};
78
79 void sat(float, float, float);
80
81 // x, y translation
82 void ctrl_PID_SMC_position(float s[], float s_dot[], float ...
s_int[], float old_s[], float delta_t, float Ki_hat_dot[], ...
float old_Ki_hat_dot[], float Kd_hat_dot[], float ...
old_Kd_hat_dot[], float a_hat_dot[], float old_a_hat_dot[], ...
float *ctrlStateError, float *prev_ctrlStateError, float ...
*ctrlControl, float *ctrlState, float Ki_hat[], float ...
Kd_hat[], float a_hat[]){ //add more inputs
83
84 // compute s_int
85 for(i=0; i<n; i++){
86 s_int[i] = s_int[i] + delta_t*(old_s[i] + s[i])/2;
87 }
88
89 // compute s
90 for(i=0; i<n; i++){
91 s[i] = -(ctrlStateError[i+VEL_X] + lambda*ctrlStateError[i]);
92 }
93
94 // compute s_dot
95 for(i=0; i<n; i++){
96 s_dot[i] = -((ctrlStateError[i+VEL_X] - ...
prev_ctrlStateError[i+VEL_X])/(delta_t) + ...
lambda*ctrlStateError[i+VEL_X]);
97 }
98
99 // construct Y for x
100 Y[0] = ctrlState[VEL_X];
101 Y[1] = ctrlState[POS_X];
102 // construct Y for y
103 Y[2] = ctrlState[VEL_Y];
104 Y[3] = ctrlState[POS_Y];
105
106 // adaptation laws
107 for(i=0; i<n; i++){
108 Ki_hat_dot[i] = gamma1*s[i]*s_int[i];
109 Kd_hat_dot[i] = gamma2*s[i]*s_dot[i];
110 }
111
112 //is below correct?
113 for(i=0; i<2; i++){
114 a_hat_dot[i] = 0.0f;
115 a_hat_dot[i+2] = 0.0f;
116 for(j=0; j<2; j++){
117 // for x
167
118 a_hat_dot[i] = a_hat_dot[i] - P*Y[j]*s[0];
119 // for y
120 a_hat_dot[i+2] = a_hat_dot[i+2] - P*Y[j+2]*s[1];
121 }
122 }
123
124 // integrate
125 for(i=0; i<n; i++){
126 Ki_hat[i] = Ki_hat[i] + delta_t*(old_Ki_hat_dot[i] + ...
Ki_hat_dot[i])/2;
127 Kd_hat[i] = Kd_hat[i] + delta_t*(old_Kd_hat_dot[i] + ...
Kd_hat_dot[i])/2;
128 }
129
168
160 theta_tilde[0] = atan2( ...
2*(ctrlStateError[QUAT_4]*ctrlStateError[QUAT_1] + ...
ctrlStateError[QUAT_2]*ctrlStateError[QUAT_3]), ...
1-2*(ctrlStateError[QUAT_1]*ctrlStateError[QUAT_1] + ...
ctrlStateError[QUAT_2]*ctrlStateError[QUAT_2]) );
161 theta_tilde[1] = asin( ...
2*(ctrlStateError[QUAT_4]*ctrlStateError[QUAT_2] - ...
ctrlStateError[QUAT_3]*ctrlStateError[QUAT_1]) );
162 theta_tilde[2] = atan2( ...
2*(ctrlStateError[QUAT_4]*ctrlStateError[QUAT_3] + ...
ctrlStateError[QUAT_1]*ctrlStateError[QUAT_2]), ...
1-2*(ctrlStateError[QUAT_2]*ctrlStateError[QUAT_2] + ...
ctrlStateError[QUAT_3]*ctrlStateError[QUAT_3]) );
163
169
193 Kd_hat_dot_att[i] = gamma4*s_att[i]*s_dot_att[i];
194 }
195
196 a_hat_dot_att[0] = -P_att * Y_att[0] * s_att[0];
197 a_hat_dot_att[1] = -P_att * Y_att[1] * s_att[0];
198 a_hat_dot_att[2] = -P_att * Y_att[2] * s_att[0];
199 a_hat_dot_att[3] = -P_att * Y_att[0] * s_att[1];
200 a_hat_dot_att[4] = -P_att * Y_att[1] * s_att[1];
201 a_hat_dot_att[5] = -P_att * Y_att[2] * s_att[1];
202 a_hat_dot_att[6] = -P_att * Y_att[0] * s_att[2];
203 a_hat_dot_att[7] = -P_att * Y_att[1] * s_att[2];
204 a_hat_dot_att[8] = -P_att * Y_att[2] * s_att[2];
205
206 // integrate
207 for(i=0; i<3; i++){
208 Ki_hat_att[i] = Ki_hat_att[i] + ...
delta_t*(old_Ki_hat_dot_att[i] + Ki_hat_dot_att[i])/2;
209 Kd_hat_att[i] = Kd_hat_att[i] + ...
delta_t*(old_Kd_hat_dot_att[i] + Kd_hat_dot_att[i])/2;
210 a_hat_att[i] += delta_t*(old_a_hat_dot_att[i] + ...
a_hat_dot_att[i])/2;
211 }
212
213 // u_hat = Y_att*a_hat_att
214 u_hat_att[0] = Y_att[0]*a_hat_att[0] + Y_att[0]*a_hat_att[1] ...
+ Y_att[0]*a_hat_att[2];
215 u_hat_att[1] = Y_att[1]*a_hat_att[3] + Y_att[1]*a_hat_att[4] ...
+ Y_att[1]*a_hat_att[5];
216 u_hat_att[2] = Y_att[2]*a_hat_att[6] + Y_att[2]*a_hat_att[7] ...
+ Y_att[2]*a_hat_att[8];
217
218 // construct u_pid
219 for(i=0; i<3; i++){
220 u_pid_att[i] = Kp_att*(s_att[i])+ ...
Kd_hat_att[i]*(s_dot_att[i])+ ...
Ki_hat_att[i]*(s_int_att[i]);
221 }
222
170
Appendix C
171
32 % simplification for a sphere
33 MOITarget_kgm2 = (2/5) * MassTarget_kg * rho^2 * eye(3);
34 PosTargetToChaserInInertial_m = PosDPtoChaserCMInInertial_m - ...
PosDPtoTargetCMInInertial_m;
35 VelTargetToChaserInInertial_mps = QuatRotate(QuatCHAToInertial, ...
VelChaserInCHA_mps')' ...
36 - QuatRotate(QuatTARToInertial,VelTargetInitInTAR_mps')';
37 AngMomTargetInTAR_kgm2ps = MOITarget_kgm2 * AngVelTargetInTAR_rps;
38
39 % Aggregated system
40 PosDPtoCMCInInertial_m = (MassChaser_kg * ...
PosDPtoChaserCMInInertial_m + ...
41 MassTarget_kg * PosDPtoTargetCMInInertial_m) / (MassChaser_kg ...
+ MassTarget_kg);
42 RSkewSymMatrixChaser_m = [0, -PosDPtoChaserCMInInertial_m(3), ...
PosDPtoChaserCMInInertial_m(2); ...
PosDPtoChaserCMInInertial_m(3), 0, ...
-PosDPtoChaserCMInInertial_m(1); ...
43 -PosDPtoChaserCMInInertial_m(2), ...
PosDPtoChaserCMInInertial_m(1), 0];
44 RSkewSymMatrixTarget_m = [0, -PosDPtoTargetCMInInertial_m(3), ...
PosDPtoTargetCMInInertial_m(2); ...
PosDPtoTargetCMInInertial_m(3), 0, ...
-PosDPtoTargetCMInInertial_m(1); ...
45 -PosDPtoTargetCMInInertial_m(2), ...
PosDPtoTargetCMInInertial_m(1), 0];
46 MOICMC_kgm2 = (MOIChaser_kgm2 - MassChaser_kg * ...
RSkewSymMatrixChaser_m*RSkewSymMatrixChaser_m) + ...
47 (MOITarget_kgm2 - MassTarget_kg * ...
RSkewSymMatrixTarget_m*RSkewSymMatrixTarget_m);
48
49 PosCMCtoTargetCMInInertial_m = -PosDPtoCMCInInertial_m + ...
PosDPtoTargetCMInInertial_m;
50
51 % Constants
52 MassRatio = MassChaser_kg / MassTarget_kg;
53
54 % Relationships
55 VelocityCMCInInertial_mps = (MassChaser_kg * ...
QuatRotate(QuatCHAToInertial, VelChaserInCHA_mps')' + ...
56 MassTarget_kg * QuatRotate(QuatTARToInertial, ...
VelTargetInitInTAR_mps')') / ...
57 (MassChaser_kg + MassTarget_kg);
58 %VelTarget_mps = VelTargetInitial_mps - VelocityCMC_mps;
59
60 %%% After dock
61 AngVelCMCInInertial_rps = (MOICMC_kgm2) \ ...
(QuatRotate(QuatTARToInertial, AngMomTargetInTAR_kgm2ps')' ...
62 + QuatRotate(QuatCHAToInertial, AngMomChaserInCHA_kgm2ps')' + ...
63 cross(MassChaser_kg * (1 + MassRatio)^(-1) * ...
PosTargetToChaserInInertial_m, ...
VelTargetToChaserInInertial_mps));
64 VelPostDockTargetInInertial_mps = VelocityCMCInInertial_mps + ...
65 cross(AngVelCMCInInertial_rps, PosCMCtoTargetCMInInertial_m);
172
66
67 % want to minimize this impulsive force if Target is fragile
68 ForceImpulsiveInInertial_N = simplify(MassTarget_kg * ...
(VelPostDockTargetInInertial_mps - ...
69 QuatRotate(QuatTARToInertial, VelTargetInitInTAR_mps')') / dt);
70 TorqueImpulsiveInInertial_Nm =simplify( MOITarget_kgm2 * ...
(AngVelCMCInInertial_rps - ...
71 QuatRotate(QuatTARToInertial, AngVelTargetInTAR_rps')') / dt ...
- ...
72 cross(PosDPtoTargetCMInInertial_m, ...
ForceImpulsiveInInertial_N) );
173
-PosDPtoChaserCMInInertial_m(1); ...
29 -PosDPtoChaserCMInInertial_m(2), ...
PosDPtoChaserCMInInertial_m(1), 0];
30 RSkewSymMatrixTarget_m = [0, -PosDPtoTargetCMInInertial_m(3), ...
PosDPtoTargetCMInInertial_m(2); ...
PosDPtoTargetCMInInertial_m(3), 0, ...
-PosDPtoTargetCMInInertial_m(1); ...
31 -PosDPtoTargetCMInInertial_m(2), ...
PosDPtoTargetCMInInertial_m(1), 0];
32 MOICMC_kgm2 = (Chaser.MOI_kgm2 - Chaser.mass_kg * ...
RSkewSymMatrixChaser_m*RSkewSymMatrixChaser_m) + ...
33 (Target.MOI_kgm2 - Target.mass_kg * ...
RSkewSymMatrixTarget_m*RSkewSymMatrixTarget_m);
34
40 % Relationships
41 VelocityCMCInInertial_mps = (Chaser.mass_kg * ...
QuatRotate(QuatCHAToInertial, VelChaserInCHA_mps')' + ...
42 Target.mass_kg * QuatRotate(QuatTARToInertial, ...
VelTargetInitInTAR_mps')') / ...
43 (Chaser.mass_kg + Target.mass_kg);
44
45 %%% Post dock
46 AngVelCMCInInertial_rps = (MOICMC_kgm2) \ ...
(QuatRotate(QuatTARToInertial, AngMomTargetInTAR_kgm2ps')' ...
47 + QuatRotate(QuatCHAToInertial, AngMomChaserInCHA_kgm2ps')' + ...
48 cross(Chaser.mass_kg * (1 + MassRatio)^(-1) * ...
PosTargetToChaserInInertial_m, ...
VelTargetToChaserInInertial_mps));
49 VelPostDockTargetInInertial_mps = VelocityCMCInInertial_mps + ...
50 cross(AngVelCMCInInertial_rps, PosCMCtoTargetCMInInertial_m);
51
52 % Impulsive Force and Torque
53 ForceImpulsiveInInertial_N = (Target.mass_kg * ...
(VelPostDockTargetInInertial_mps - ...
54 QuatRotate(QuatTARToInertial, VelTargetInitInTAR_mps')') / dt);
55 TorqueImpulsiveInInertial_Nm = ( Target.MOI_kgm2 * ...
(AngVelCMCInInertial_rps - ...
56 QuatRotate(QuatTARToInertial, AngVelTargetInTAR_rps')') / dt ...
- ...
57 cross(PosDPtoTargetCMInInertial_m, ...
ForceImpulsiveInInertial_N) );
174
Listing C.3: SetupTargetParams.m
1 function Target = SetupTargetParams(mass, CM2DPDistance, ...
CMToEdgeY_m, CMToEdgeZ_m, TargetShapeType, AngVelVec_rad)
2
3 % Coordinates
4 i = [1 0 0];
5 j = [0 1 0];
6 k = [0 0 1];
7
8 % Target mass
9 Target.mass_kg = mass;
10 % Distance from Target's CM to the docking port interface
11 Target.CM2DPinX_m = CM2DPDistance;
12
13 % Distances from CM to edges
14 Target.CMToEdgeZ_m = CMToEdgeZ_m;
15 Target.CMToEdgeY_m = CMToEdgeY_m;
16 Target.CMToEdgeX_m = Target.CM2DPinX_m;
17
18 % Set up inertia matrix based on shape type
19 if strcmp(TargetShapeType, 'cylinder')
20 Target.MOI_kgm2 = [1/2*Target.mass_kg*Target.CMToEdgeY_m^2, ...
0, 0;...
21 0, 1/12*Target.mass_kg*(3*Target.CMToEdgeY_m^2 + ...
Target.CMToEdgeX_m^2), 0;...
22 0, 0, 1/12*Target.mass_kg*(3*Target.CMToEdgeY_m^2 + ...
Target.CMToEdgeX_m^2)];
23 elseif strcmp(TargetShapeType, 'sphere')
24 Target.MOI_kgm2 = ...
(2/5)*Target.mass_kg*Target.CMToEdgeX_m^2*eye(3);
25 elseif strcmp(TargetShapeType, 'rect prism')
26 Target.MOI_kgm2 = (1/12)*Target.mass_kg*...
27 [((2*Target.CMToEdgeY_m)^2+(2*Target.CMToEdgeZ_m)^2), 0, ...
0;...
28 0, ((2*Target.CMToEdgeZ_m)^2+(2*Target.CMToEdgeX_m)^2), 0;...
29 0, 0, ((2*Target.CMToEdgeY_m)^2+(2*Target.CMToEdgeX_m)^2)];
30 end
31
32 % Simplified notation for following calcultions
33 Ixx = Target.MOI_kgm2(1,1); Iyy = Target.MOI_kgm2(2,2); Izz = ...
Target.MOI_kgm2(3,3);
34
35 % Initial Conditions
36 % Initial angles should always be equal to 0 since the assumption ...
is that
37 % the global frame = the body frame at the start of this phase; ...
so they are
38 % not included as an option for ICs
39 Target.roll1d_0 = AngVelVec_rad(1); %wx
40 Target.pitch1d_0 = AngVelVec_rad(2); %wy
41 Target.yaw1d_0 = AngVelVec_rad(3); %wz
42
43 % Initial angular accelerations
175
44 Target.roll1dd_0 = (Iyy-Izz)*Target.pitch1d_0*Target.yaw1d_0/Ixx;
45 Target.pitch1dd_0 = (Izz-Ixx)*Target.roll1d_0*Target.yaw1d_0/Iyy;
46 Target.yaw1dd_0 = (Ixx-Iyy)*Target.pitch1d_0*Target.roll1d_0/Izz;
47
48 % Angular velocity construction in Target
49 Target.BodyToInertialRot = FindRotMat(0, 0, 0);
50 omega_123 = [Target.roll1d_0; Target.pitch1d_0; Target.yaw1d_0];
51 Target.omega_xyz = Target.BodyToInertialRot*omega_123;
52
53 % Notation in inertial frame for determining ICs
54 %r1_xyz = [(-Target.CM2DPinX_m);0;0];
55 r1_xyz = [0;0;0];
56 v1_xyz = cross(Target.omega_xyz, r1_xyz);
57
58 Target.x1_0 = dot(r1_xyz,i);
59 Target.x1d_0 = dot(v1_xyz,i); % Change to 0 for no translation
60 Target.y1_0 = dot(r1_xyz,j);
61 Target.y1d_0 = dot(v1_xyz,j); % Change to 0 for no translation
62 Target.z1_0 = dot(r1_xyz,k);
63 Target.z1d_0 = dot(v1_xyz,k); % Change to 0 for no translation
64
65 Target.shape = TargetShapeType;
66
67 end
176
23 elseif strcmp(ChaserShapeType, 'sphere')
24 Chaser.MOI_kgm2 = ...
(2/5)*Chaser.mass_kg*Chaser.CMToEdgeX_m^2*eye(3);
25 elseif strcmp(ChaserShapeType, 'rect prism')
26 Chaser.MOI_kgm2 = (1/12)*Chaser.mass_kg*...
27 [((2*Chaser.CMToEdgeY_m)^2+(2*Chaser.CMToEdgeZ_m)^2), 0, ...
0;...
28 0, ((2*Chaser.CMToEdgeZ_m)^2+(2*Chaser.CMToEdgeX_m)^2), 0;...
29 0, 0, ((2*Chaser.CMToEdgeY_m)^2+(2*Chaser.CMToEdgeX_m)^2)];
30 end
31
32 % Set up initial conditions
33 R = (Target.CM2DPinX_m+Chaser.CM2DPinX_m);
34 r2_xyz = (Target.BodyToInertialRot*[R;0;0]);
35 v2_xyz = cross(Target.omega_xyz, r2_xyz);
36
37 Chaser.x2_0 = dot(r2_xyz,i) + Target.x1_0;
38 Chaser.x2d_0 = dot(v2_xyz,i) + Target.x1d_0;
39 Chaser.y2_0 = dot(r2_xyz,j) + Target.y1_0;
40 Chaser.y2d_0 = dot(v2_xyz,j)+ Target.y1d_0;
41 Chaser.z2_0 = dot(r2_xyz,k) + Target.z1_0;
42 Chaser.z2d_0 = dot(v2_xyz,k) + Target.z1d_0;
43 Chaser.shape = ChaserShapeType;
44
45 end
177
17 y1 = zeros(2,1); y1(1) = Target.y1_0; y1d = zeros(2,1);
18 y1d(1) = Target.y1d_0; y1dd = zeros(2,1); y1dd(1) = 0;
19 z1 = zeros(2,1); z1(1) = Target.z1_0; z1d = zeros(2,1);
20 z1d(1) = Target.z1d_0; z1dd = zeros(2,1); z1dd(1) = 0;
21 x2 = zeros(2,1); x2(1) = Chaser.x2_0; x2d = zeros(2,1);
22 x2d(1) = Chaser.x2d_0; x2dd = zeros(2,1); x2dd(1) = 0;
23 y2 = zeros(2,1); y2(1) = Chaser.y2_0; y2d = zeros(2,1);
24 y2d(1) = Chaser.y2d_0; y2dd = zeros(2,1); y2dd(1) = 0;
25 z2 = zeros(2,1); z2(1) = Chaser.z2_0; z2d = zeros(2,1);
26 z2d(1) = Chaser.z2d_0; z2dd = zeros(2,1); z2dd(1) = 0;
27 BodyToInertialRot = zeros(3,3,n); BodyToInertialRot(:,:,1) = ...
FindRotMat(0, 0, 0);
28 CurrentB2IRot = BodyToInertialRot;
29 CentAccInBody_mpsps = zeros(3,2);
30 AngAccInBody_mpsps = zeros(3,2);
31 Mx = zeros(2,1); Fz = zeros(2,1); Fth = zeros(2,1);
32 if isfield(Chaser,'roll1dd_user')
33 roll1dd_user = Chaser.roll1dd_user;
34 pitch1dd_user = Chaser.pitch1dd_user;
35 yaw1dd_user = Chaser.yaw1dd_user;
36 end
37
38 t_wait = 1;
39 i = 1;
40 tol = 0.001;
41 h = tspan(2)-tspan(1); %assumes linspace
42 R = (Target.CM2DPinX_m + Chaser.CM2DPinX_m);
43 Ixx = Target.MOI_kgm2(1,1); Iyy = Target.MOI_kgm2(2,2); Izz = ...
Target.MOI_kgm2(3,3);
44 rollstopped = 0;
45 RInBody = R*[1;0;0];
46
178
67 yaw1dd_slowdown = ...
NegativeQuadraticTerm(Target,...
68 Target.yaw1d_0, t_wait, tspan(i));
69 roll1dd_slowdown = ...
NegativeQuadraticTerm(Target,...
70 Target.roll1d_0, t_wait, tspan(i));
71 pitch1dd_slowdown = ...
NegativeQuadraticTerm(Target,...
72 Target.pitch1d_0, t_wait, tspan(i));
73 elseif strcmp(term_type, 'PosLinear')
74 yaw1dd_slowdown = PositiveLinearTerm(Target,...
75 Target.yaw1d_0, t_wait, tspan(i));
76 roll1dd_slowdown = PositiveLinearTerm(Target,...
77 Target.roll1d_0, t_wait, tspan(i));
78 pitch1dd_slowdown = PositiveLinearTerm(Target,...
79 Target.pitch1d_0, t_wait, tspan(i));
80 elseif strcmp(term_type, 'NegLinear')
81 yaw1dd_slowdown = NegativeLinearTerm(Target,...
82 Target.yaw1d_0, t_wait, tspan(i));
83 roll1dd_slowdown = NegativeLinearTerm(Target,...
84 Target.roll1d_0, t_wait, tspan(i));
85 pitch1dd_slowdown = NegativeLinearTerm(Target,...
86 Target.pitch1d_0, t_wait, tspan(i));
87 elseif strcmp(term_type, 'Constant')
88 yaw1dd_slowdown = ConstantAccTerm(Target,...
89 Target.yaw1d_0);
90 roll1dd_slowdown = ConstantAccTerm(Target,...
91 Target.roll1d_0);
92 pitch1dd_slowdown = ConstantAccTerm(Target,...
93 Target.pitch1d_0);
94 end
95 roll1dd(i) = roll1dd_slowdown + roll1dd(i);
96 pitch1dd(i) = pitch1dd_slowdown + pitch1dd(i);
97 yaw1dd(i) = yaw1dd_slowdown + yaw1dd(i);
98 else
99 %Target may be nutating
100 if abs(roll1d(i)) > tol/10
101 if strcmp(term_type, 'NegQuadratic')
102 roll1dd_slowdown = ...
NegativeQuadraticTerm(Target,...
103 Target.roll1d_0, t_wait, tspan(i));
104 elseif strcmp(term_type, 'PosLinear')
105 roll1dd_slowdown = ...
PositiveLinearTerm(Target,...
106 Target.roll1d_0, t_wait, tspan(i));
107 elseif strcmp(term_type, 'NegLinear')
108 roll1dd_slowdown = ...
NegativeLinearTerm(Target,...
109 Target.roll1d_0, t_wait, tspan(i));
110 elseif strcmp(term_type, 'Constant')
111 roll1dd_slowdown = ConstantAccTerm(Target,...
112 Target.roll1d_0);
113 end
114 roll1dd(i) = roll1dd_slowdown + roll1dd(i);
179
115 end
116 if abs(roll1d(i)) ≤ tol/10
117 % slow down ang vel in other axes now
118 if rollstopped == 0
119 % save off these ang vels
120 Target.yaw1d_0 = yaw1d(i);
121 Target.pitch1d_0 = pitch1d(i);
122 end
123 if abs(pitch1d(i)) > tol
124 if strcmp(term_type, 'NegQuadratic')
125 pitch1dd_slowdown = ...
NegativeQuadraticTerm(Target,...
126 Target.pitch1d_0, t_wait, tspan(i));
127 elseif strcmp(term_type, 'PosLinear')
128 pitch1dd_slowdown = ...
PositiveLinearTerm(Target,...
129 Target.pitch1d_0, t_wait, tspan(i));
130 elseif strcmp(term_type, 'NegLinear')
131 pitch1dd_slowdown = ...
NegativeLinearTerm(Target,...
132 Target.pitch1d_0, t_wait, tspan(i));
133 elseif strcmp(term_type, 'Constant')
134 pitch1dd_slowdown = ...
ConstantAccTerm(Target,...
135 Target.pitch1d_0);
136 end
137 pitch1dd(i) = pitch1dd_slowdown + ...
pitch1dd(i);
138 end
139 if abs(yaw1d(i)) > tol
140 if strcmp(term_type, 'NegQuadratic')
141 yaw1dd_slowdown = ...
NegativeQuadraticTerm(Target,...
142 Target.yaw1d_0, t_wait, tspan(i));
143 elseif strcmp(term_type, 'PosLinear')
144 yaw1dd_slowdown = ...
PositiveLinearTerm(Target,...
145 Target.yaw1d_0, t_wait, tspan(i));
146 elseif strcmp(term_type, 'NegLinear')
147 yaw1dd_slowdown = ...
NegativeLinearTerm(Target,...
148 Target.yaw1d_0, t_wait, tspan(i));
149 elseif strcmp(term_type, 'Constant')
150 yaw1dd_slowdown = ...
ConstantAccTerm(Target,...
151 Target.yaw1d_0);
152 end
153 yaw1dd(i) = yaw1dd_slowdown + yaw1dd(i);
154 end
155 rollstopped = 1;
156 end
157 end
158 end
159
180
160 % Always occur post t_wait
161 if abs(y1d(i)) > tol
162 ydd_trans = ConstantAccTerm(Target, Target.y1d_0);
163 end
164 if abs(x1d(i)) > tol
165 xdd_trans = ConstantAccTerm(Target, Target.x1d_0);
166 end
167 if abs(z1d(i)) > tol
168 zdd_trans = ConstantAccTerm(Target, Target.z1d_0);
169 end
170 end
171
172 % Quaternion to DCM
173 if i̸=1
174 BodyToInertialRot(:,:,i) = quat2dcm([qw(i), qx(i), qy(i), ...
qz(i)]);
175 BodyToInertialRot(:,:,i) = BodyToInertialRot(:,:,i)';
176 CurrentB2IRot(:,:,i) = BodyToInertialRot(:,:,i);
177 end
178 omega_123 = [roll1d(i); pitch1d(i); yaw1d(i)];
179 alpha_123 = [roll1dd(i); pitch1dd(i); yaw1dd(i)];
180
181 % Necessary for maintaining synchronous motion
182 CentAccInBody_mpsps(:,i) = cross(omega_123, cross(omega_123, ...
RInBody));
183 AngAccInBody_mpsps(:,i) = cross(alpha_123, RInBody);
184
185 CentAccInInertial_mpsps = ...
CurrentB2IRot(:,:,i)*CentAccInBody_mpsps(:,i);
186 AngAccInInertial_mpsps = ...
CurrentB2IRot(:,:,i)*AngAccInBody_mpsps(:,i);
187 TotalAccInInertial_mpsps = CentAccInInertial_mpsps + ...
AngAccInInertial_mpsps;
188
189 x2dd(i) = TotalAccInInertial_mpsps(1) + xdd_trans;
190 y2dd(i) = TotalAccInInertial_mpsps(2) + ydd_trans;
191 z2dd(i) = TotalAccInInertial_mpsps(3) + zdd_trans;
192
181
205 Mx(i) = Hdot(1);
206 Fz(i) = -Hdot(2)/R;
207 Fth(i) = Hdot(3)/R;
208
209 % Update timer
210 i = i+1;
211 if i>n
212 break;
213 end
214
215 % update velocity terms
216 x1d(i) = x1d(i-1) + x1dd(i-1)*h; y1d(i) = y1d(i-1) + y1dd(i-1)*h;
217 z1d(i) = z1d(i-1) + z1dd(i-1)*h;
218 nextstep = CurrentB2IRot(:,:,i-1)*cross(omega_123, RInBody);
219 x2d(i) = x1d(i) + nextstep(1); y2d(i) = y1d(i) + nextstep(2);
220 z2d(i) = z1d(i) + nextstep(3);
221
222 % Update position terms
223 x1(i) = x1(i-1) + x1d(i)*h; y1(i) = y1(i-1) + y1d(i)*h;
224 z1(i) = z1(i-1) + z1d(i)*h;
225 nextstep = CurrentB2IRot(:,:,i-1)*RInBody;
226 x2(i) = x1(i) + nextstep(1); y2(i) = y1(i) + nextstep(2);
227 z2(i) = z1(i) + nextstep(3);
228
229 % update angular velocity
230 yaw1d(i) = yaw1d(i-1) + yaw1dd(i-1)*h;
231 pitch1d(i) = pitch1d(i-1) + pitch1dd(i-1)*h;
232 roll1d(i) = roll1d(i-1) + roll1dd(i-1)*h;
233
234 %update angles, delta angle
235 yaw1(i) = yaw1(i-1) + yaw1d(i)*h;
236 pitch1(i) = pitch1(i-1) + pitch1d(i)*h;
237 roll1(i) = roll1(i-1) + roll1d(i)*h;
238
239 %update quaternion
240 qw(i) = qw(i-1) + qwdot(i-1)*h; qx(i) = qx(i-1) + qxdot(i-1)*h;
241 qy(i) = qy(i-1) + qydot(i-1)*h; qz(i) = qz(i-1) + qzdot(i-1)*h;
242
243 end
244 if i≤n
245 tspan = tspan(1:i);
246 end
247
248 % Pack output
249 out.roll1 = roll1; out.pitch1 = pitch1; out.yaw1 = yaw1;
250 out.roll1d = roll1d; out.pitch1d = pitch1d; out.yaw1d = ...
yaw1d;
251 out.roll1dd = roll1dd; out.pitch1dd = pitch1dd; out.yaw1dd = ...
yaw1dd;
252 out.x1 = x1; out.y1 = y1; out.z1 = z1;
253 out.x2 = x2; out.y2 = y2; out.z2 = z2;
254 out.x1d = x1d; out.y1d = y1d; out.z1d = z1d;
255 out.x2d = x2d; out.y2d = y2d; out.z2d = z2d;
256 out.x1dd = x1dd; out.y1dd = y1dd; out.z1dd = z1dd;
182
257 out.x2dd = x2dd; out.y2dd = y2dd; out.z2dd = z2dd;
258 out.CurrentB2IRot = CurrentB2IRot;
259 out.qw = qw; out.qx = qx; out.qy = qy; out.qz = qz;
260
261 %% Calculate loads/moments
262 TotalForceInBody_N = Chaser.mass_kg*(CentAccInBody_mpsps + ...
263 AngAccInBody_mpsps);
264 out.ShearLoadY_N = TotalForceInBody_N(2,:) - Fth';
265 out.ShearLoadZ_N = TotalForceInBody_N(3,:) - Fz';
266
267 out.Torsion_Nm = Chaser.MOI_kgm2(1,1)*roll1dd - ...
268 (Chaser.MOI_kgm2(2,2)-Chaser.MOI_kgm2(3,3)).*...
269 pitch1d(1:length(roll1dd)).*yaw1d(1:length(roll1dd)) - Mx;
270 out.BendingMomY_Nm = Chaser.MOI_kgm2(2,2)*pitch1dd - ...
271 (Chaser.MOI_kgm2(3,3)-Chaser.MOI_kgm2(1,1)).*...
272 roll1d(1:length(pitch1dd)).*yaw1d(1:length(pitch1dd));
273 out.BendingMomZ_Nm = Chaser.MOI_kgm2(3,3)*yaw1dd - ...
274 (Chaser.MOI_kgm2(1,1)-Chaser.MOI_kgm2(2,2)).*...
275 pitch1d(1:length(yaw1dd)).*roll1d(1:length(yaw1dd));
276
277 p = length(out.ShearLoadY_N);
278 out.int.ShearLoadY_N = cumtrapz(tspan(1:p), abs(out.ShearLoadY_N));
279 out.int.ShearLoadZ_N = cumtrapz(tspan(1:p), abs(out.ShearLoadZ_N));
280 out.int.Torsion_Nm = cumtrapz(tspan(1:p), abs(out.Torsion_Nm));
281 out.int.BendingMomY_Nm = cumtrapz(tspan(1:p), ...
abs(out.BendingMomY_Nm));
282 out.int.BendingMomZ_Nm = cumtrapz(tspan(1:p), ...
abs(out.BendingMomZ_Nm));
283 out.int.TotalLM = out.int.ShearLoadY_N(end) + ...
out.int.ShearLoadZ_N(end) + ...
284 out.int.Torsion_Nm(end) + out.int.BendingMomY_Nm(end)...
285 + out.int.BendingMomZ_Nm(end);
286
287 %% Calculate deltaV
288 n = length(yaw1dd);
289 t = tspan(1:n);
290
291 out.DeltaVRoll_mps = cumtrapz(t, roll1dd);
292 out.DeltaVPitch_mps = cumtrapz(t, pitch1dd);
293 out.DeltaVYaw_mps = cumtrapz(t, yaw1dd);
294 out.TotalDeltaV_mps = out.DeltaVRoll_mps(end) + ...
295 out.DeltaVPitch_mps(end) + out.DeltaVYaw_mps(end);
296
297 end
298
299 function current_acc = ConstantAccTerm(p,init_vel)
300 current_acc = (0 - init_vel) / p.deltaT;
301 end
302
303 function current_acc = ...
NegativeLinearTerm(p,init_vel,t_wait,current_time)
304 a = init_vel/(p.deltaT)^2;
305 current_acc = -2*a*(current_time-t_wait);
306 end
183
307
308 function current_acc = ...
PositiveLinearTerm(p,init_vel,t_wait,current_time)
309 a = init_vel/(p.deltaT)^2;
310 current_acc = 2*a*(current_time-(p.deltaT+t_wait));
311 end
312
313 function current_acc = ...
NegativeQuadraticTerm(p,init_vel,t_wait,current_time)
314 a = init_vel/(p.deltaT)^3;
315 current_acc = -3*a*(current_time-t_wait)^2;
316 end
184
28
29
185
80 guess.phase.integral = 0.01;
81
186
21 u3 = input.phase.control(:,3); %yawddot
22
23 % dynamics
24 qwdot = -1/2 * (rolldot.*qx + pitchdot.*qy + yawdot.*qz);
25 qxdot = 1/2 * (rolldot.*qw + pitchdot.*qz - yawdot.*qy);
26 qydot = 1/2 * (pitchdot.*qw + yawdot.*qx - rolldot.*qz);
27 qzdot = 1/2 * (yawdot.*qw + rolldot.*qy - pitchdot.*qx);
28 quatdot = [qwdot, qxdot, qydot, qzdot];
29
30 rollddot = u1;
31 pitchddot = u2;
32 yawddot = u3;
33 angacc = [rollddot, pitchddot, yawddot];
34
35 dx = xdot;
36 dy = ydot;
37 dz = zdot;
38 dtrans = [dx, dy, dz];
39
40 % Need to solve for accelerations
41 RInBody = input.auxdata.R*[1;0;0];
42 omega = [rolldot'; pitchdot'; yawdot'];
43 alpha = [rollddot'; pitchddot'; yawddot'];
44 [¬, c] = size(omega);
45 for i=1:c
46 CentAccInBody_mpsps(:,i) = cross(omega(:,i), ...
cross(omega(:,i), RInBody));
47 AngAccInBody_mpsps(:,i) = cross(alpha(:,i), RInBody);
48 dcm = quat2dcm([qw(i) qx(i) qy(i) qz(i)]);
49 CentAccInInertial_mpsps = dcm*CentAccInBody_mpsps(:,i);
50 AngAccInInertial_mpsps = dcm*AngAccInBody_mpsps(:,i);
51 TotalAccInInertial_mpsps(:,i) = CentAccInInertial_mpsps + ...
AngAccInInertial_mpsps;
52 end
53
54 xddot = TotalAccInInertial_mpsps(1,:)';
55 yddot = TotalAccInInertial_mpsps(2,:)';
56 zddot = TotalAccInInertial_mpsps(3,:)';
57 ddtrans = [xddot, yddot, zddot];
58
59 phaseout.dynamics = [quatdot, angacc, dtrans, ddtrans];
60
61 % Path constraint
62 phaseout.path = sqrt(x.^2 + y.^2 + z.^2);
63 %% Find integrand
64 t = input.phase.time;
65 n = length(t);
66
67 for i=1:n
68 normU(i) = norm([u1(i), u2(i), u3(i)]);
69 end
70
71 %% Find Hdot
72 R = input.auxdata.R;
187
73 for i=1:n
74 omega_123 = [rolldot(i); pitchdot(i); yawdot(i)];
75 alpha_123 = [rollddot(i); pitchddot(i); yawddot(i)];
76 int_product = input.auxdata.I_CMCwrtTAR*omega_123;
77 Hdot = input.auxdata.I_CMCwrtTAR*alpha_123 + cross(omega_123, ...
int_product);
78 Mx(i) = Hdot(1);
79 Fz(i) = -Hdot(2)/R;
80 Fth(i) = Hdot(3)/R;
81 end
82
83 %% Find Loads - dims are wrong
84 TotalForceInBody_N = input.auxdata.mass_C*(CentAccInBody_mpsps + ...
AngAccInBody_mpsps);
85 ShearLoadY_N = TotalForceInBody_N(2,:)' - Fth';
86 ShearLoadZ_N = TotalForceInBody_N(3,:)' - Fz';
87
88 %% Find Moments
89 I_C = input.auxdata.I_C;
90 Torsion = I_C(1,1)*rolldot - (I_C(2,2) - ...
I_C(3,3))*pitchdot.*yawdot - Mx';
91 BendingMomY_Nm = I_C(2,2)*pitchddot - ...
(I_C(3,3)-I_C(1,1))*rolldot.*yawdot;
92 BendingMomZ_Nm = I_C(3,3)*yawddot - ...
(I_C(1,1)-I_C(2,2))*pitchdot.*rolldot;
93
94 % Integrand
95 phaseout.integrand = normU' + (ShearLoadY_N) + ...
96 (ShearLoadZ_N) + (Torsion) + (BendingMomY_Nm) + (BendingMomZ_Nm);
97
98 end
12 % Output
13 % output.objective -- scalar
14 % output.eventgroup(eventnumber).event -- row
15
16 output.objective = input.phase.integral;
17
18 end
188
Bibliography
189
[13] “Orbital express astro.” http://www.astronautix.com/o/
orbitalexpressastro.html.
[15] J.-C. Liou and N. L. Johnson, “Risks in space from orbiting debris,” 2006.
[16] C. Bonnal, J.-M. Ruault, and M.-C. Desjean, “Active debris removal: Recent
progress and current trends,” Acta Astronautica, vol. 85, pp. 51–60, 2013.
[17] M. Shan, J. Guo, and E. Gill, “Review and comparison of active space debris
capturing and removal methods,” Progress in Aerospace Sciences, vol. 80, pp. 18–
32, 2016.
[19] R. Rembala and C. Ower, “Robotic assembly and maintenance of future space
stations based on the iss mission operations experience,” Acta Astronautica,
vol. 65, no. 7-8, pp. 912–920, 2009.
[22] S. Mohan, Reconfiguration methods for on-orbit servicing, assembly, and opera-
tions with application to space telescopes. PhD thesis, Massachusetts Institute of
Technology, 2007.
[24] W. J. Larson and J. R. Wertz, “Space mission analysis and design,” tech. rep.,
Torrance, CA (United States); Microcosm, Inc., 1992.
[26] D. King, “Space servicing: past, present and future,” in Proceedings of the 6th
International Symposium on Artificial Intelligence and Robotics & Automation
in Space: i-SAIRAS, pp. 18–22, 2001.
190
[28] C. Jewison, B. McCarthy, D. Sternberg, D. Strawser, and C. Fang, “Resource
Aggregated Reconfigurable Control and Risk-Allocative Path Planning for On-
orbit Assembly and Servicing of Satellites,” tech. rep., AIAA SciTech 2014, 2013.
[29] A. Saenz-Otero, Design Principles for the Development of Space Technology Mat-
uration Laboratories Aboard the International Space Station. PhD thesis, Mas-
sachusetts Institute of Technology, Cambridge, MA, 2005.
[33] A. Miele, M. Weeks, and M. Ciarcia, “Optimal trajectories for spacecraft ren-
dezvous,” Journal of optimization theory and applications, vol. 132, no. 3,
pp. 353–376, 2007.
[34] D.-R. Lee and H. Pernicka, “Integrated system for autonomous proximity oper-
ations and docking,” International Journal of Aeronautical and Space Sciences,
vol. 12, no. 1, pp. 43–56, 2011.
[38] D. C. Sternberg et al., Optimal docking to tumbling objects with uncertain prop-
erties. PhD thesis, Massachusetts Institute of Technology, 2017.
[39] J.-J. E. Slotine and W. Li, Applied Nonlinear Control. Prentice-Hall Upper
Saddle River, NJ, 1 ed., 1991.
191
[41] Y. M. Sam, J. H. Osman, and M. R. A. Ghani, “A class of proportional-integral
sliding mode control with application to active suspension system,” Systems &
control letters, vol. 51, no. 3-4, pp. 217–223, 2004.
[42] I. Eker, “Sliding mode control with pid sliding surface and experimental applica-
tion to an electromechanical plant,” ISA transactions, vol. 45, no. 1, pp. 109–118,
2006.
[43] L. Zhao and Y. Jia, “Finite-time attitude tracking control for a rigid spacecraft
using time-varying terminal sliding mode techniques,” International Journal of
Control, vol. 88, no. 6, pp. 1150–1162, 2015.
[46] S. Nicosia and P. Tomei, “Model reference adaptive control algorithms for indus-
trial robots,” Automatica, vol. 20, no. 5, pp. 635–644, 1984.
[54] J.-J. Slotine and J. Coetsee, “Adaptive sliding controller synthesis for non-linear
systems,” International Journal of Control, vol. 43, no. 6, pp. 1631–1651, 1986.
192
[55] J.-J. Slotine and S. S. Sastry, “Tracking control of non-linear systems using
sliding surfaces, with application to robot manipulators,” International journal
of control, vol. 38, no. 2, pp. 465–492, 1983.
[58] J. Li, Y. Pan, and K. D. Kumar, “Formation flying control of small satellites,”
in AIAA Guidance, Navigation, and Control Conference, p. 8296, 2010.
[59] Q. Hu and B. Xiao, “Fault-tolerant sliding mode attitude control for flexible
spacecraft under loss of actuator effectiveness,” Nonlinear Dynamics, vol. 64,
no. 1-2, pp. 13–23, 2011.
[61] T.-C. Nguyen-Huynh and I. Sharf, “Adaptive reactionless motion for space ma-
nipulator when capturing an unknown tumbling target,” in 2011 IEEE Interna-
tional Conference on Robotics and Automation, pp. 4202–4207, IEEE, 2011.
[62] Y.-w. Zhang, L.-p. Yang, Y.-w. Zhu, H. Huang, and W.-w. Cai, “Nonlinear 6-
dof control of spacecraft docking with inter-satellite electromagnetic force,” Acta
Astronautica, vol. 77, pp. 97–108, 2012.
[63] J. G. Katz, “Estimation and control of flexible space structures for autonomous
on-orbit assembly,” Master’s thesis, Massachusetts Institute of Technology, 2009.
[67] C. Grubin, “Docking dynamics for rigid-body spacecraft,” AIAA Journal, vol. 2,
no. 1, pp. 5–12, 1964.
193
[68] M. A. Patterson and A. V. Rao, “Gpops-ii: A matlab software for solving
multiple-phase optimal control problems using hp-adaptive gaussian quadrature
collocation methods and sparse nonlinear programming,” ACM Transactions on
Mathematical Software (TOMS), vol. 41, no. 1, p. 1, 2014.
194